You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paolo Donà <pa...@aplexa.com> on 2005/06/22 12:19:57 UTC
m2: war includes everything
Hi Guys,
I've got a problem with M2 :
I cannot prevent dependencies from being included in a .war file (it's a
web project)
doing "m2 package" it always copies every dependency under /WEB-INF/lib
I tried to add an exclusion for dependecies I don't wanna pack. But I
couldn't get it to work.
here a snippet of my pom.xml
<dependency>
<groupId>servletapi</groupId>
<artifactId>servletapi</artifactId>
<version>2.4.public_draft</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>servletapi</artifactId>
<groupId>servletapi</groupId>
</exclusion>
</exclusions>
</dependency>
This one get to :
[INFO]
----------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO] Reason: Failed to parse model from file
'C:\shared\prj\tdraw\prova\pom.xml'.
Error: 'TEXT must be immediately followed by END_TAG and not START_TAG
(position: START_TAG seen ...<exclusions>\n
<exclusion>... @42:28) '
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Jun 22 12:11:57 CEST 2005
[INFO] Final Memory: 0M/1M
[INFO]
----------------------------------------------------------------------------
Someone already digged into this problem?
Paolo
Re: m2: war includes everything
Posted by Brett Porter <br...@gmail.com>.
the exclusions tag is new to alpha-3. The site has been published
ahead of its release tomorrow.
Cheers,
Brett
On 6/22/05, Paolo Donà <pa...@aplexa.com> wrote:
> Sorry, I missed the "Dependency Scope" thread.
> So the scope "provided" should solve my problems.
> I still don't understand why my pom breaks.
>
> Paolo
>
> Paolo Donà wrote:
>
> > Hi Guys,
> > I've got a problem with M2 :
> > I cannot prevent dependencies from being included in a .war file (it's
> > a web project)
> > doing "m2 package" it always copies every dependency under /WEB-INF/lib
> >
> > I tried to add an exclusion for dependecies I don't wanna pack. But I
> > couldn't get it to work.
> >
> > here a snippet of my pom.xml
> >
> > <dependency>
> > <groupId>servletapi</groupId>
> > <artifactId>servletapi</artifactId>
> > <version>2.4.public_draft</version>
> > <scope>compile</scope>
> > <exclusions>
> > <exclusion>
> > <artifactId>servletapi</artifactId>
> > <groupId>servletapi</groupId>
> > </exclusion>
> > </exclusions>
> > </dependency>
> >
> > This one get to :
> >
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] BUILD FAILURE
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Reason: Failed to parse model from file
> > 'C:\shared\prj\tdraw\prova\pom.xml'.
> > Error: 'TEXT must be immediately followed by END_TAG and not START_TAG
> > (position: START_TAG seen ...<exclusions>\n
> > <exclusion>... @42:28) '
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Total time: < 1 second
> > [INFO] Finished at: Wed Jun 22 12:11:57 CEST 2005
> > [INFO] Final Memory: 0M/1M
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> >
> > Someone already digged into this problem?
> >
> > Paolo
> >
> >
> >------------------------------------------------------------------------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: m2: war includes everything
Posted by Paolo Donà <pa...@aplexa.com>.
Sorry, I missed the "Dependency Scope" thread.
So the scope "provided" should solve my problems.
I still don't understand why my pom breaks.
Paolo
Paolo Don� wrote:
> Hi Guys,
> I've got a problem with M2 :
> I cannot prevent dependencies from being included in a .war file (it's
> a web project)
> doing "m2 package" it always copies every dependency under /WEB-INF/lib
>
> I tried to add an exclusion for dependecies I don't wanna pack. But I
> couldn't get it to work.
>
> here a snippet of my pom.xml
>
> <dependency>
> <groupId>servletapi</groupId>
> <artifactId>servletapi</artifactId>
> <version>2.4.public_draft</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <artifactId>servletapi</artifactId>
> <groupId>servletapi</groupId>
> </exclusion>
> </exclusions>
> </dependency>
>
> This one get to :
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] BUILD FAILURE
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Reason: Failed to parse model from file
> 'C:\shared\prj\tdraw\prova\pom.xml'.
> Error: 'TEXT must be immediately followed by END_TAG and not START_TAG
> (position: START_TAG seen ...<exclusions>\n
> <exclusion>... @42:28) '
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Jun 22 12:11:57 CEST 2005
> [INFO] Final Memory: 0M/1M
> [INFO]
> ----------------------------------------------------------------------------
>
>
> Someone already digged into this problem?
>
> Paolo
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>