You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Robert Einsle <ro...@einsle.de> on 2009/04/08 11:22:05 UTC

Packaging of "provided" Dependencie in war

Hy List,

i've configured dependencies (libraries) als Scope "provided", and would
aspect they are not packed to the destination war-File.

--- cut ---
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1</version>
      <scope>provided</scope>
    </dependency>
--- cut ---

but these 3 Libraries are in my destination war-File.



How can i configure this Dependencies in right way that they are
provided for compile, but are not in my destination war-File??

Thanks a lot.

Robert

Re: Packaging of "provided" Dependencie in war

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Robert,

Robert Einsle wrote at Mittwoch, 8. April 2009 15:39:

> Hy Kyle,
> 
> i tried it several Times.
> 
> But i will try again *gg*
> 
> and ... mail-1.4.jar, activation-1.1.jar and servlet-api-2.2.jar are in
> WEB-INF/lib-directory ob war-File.
> 
> I tried this time run Mavon from outside of eclipse on command-line.

You don't have other wars as dependencies, don't you? Otherwise they might
be applied as overlays and these can inject those jars.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Packaging of "provided" Dependencie in war

Posted by Robert Einsle <ro...@einsle.de>.
Hy Kyle,

i tried it several Times.

But i will try again *gg*

and ... mail-1.4.jar, activation-1.1.jar and servlet-api-2.2.jar are in
WEB-INF/lib-directory ob war-File.

I tried this time run Mavon from outside of eclipse on command-line.

Robert

Kyle Bober schrieb:
> Restarting you development environment will not remove the maven target
> directory and artifacts. Try running the following Maven command 'mvn clean
> package'  and check the contents of the
> target/<war_file_directory>/WEB-INF/lib
>
> -Kyle
>
> On Wed, Apr 8, 2009 at 9:27 AM, Robert Einsle <ro...@einsle.de> wrote:
>
>   
>> Hy,
>>
>> i think i run it several times, incl restart of my Developementenvironment.
>>
>> Robert
>>
>> Kyle Bober schrieb:
>>     
>>> That should work the way you have it configured. Did you run the clean
>>> goal after you changed the dependency scope to provided. This will
>>> make sure that a previous build that may have contained the
>>> dependencies is completely removed.
>>>
>>> -Kyle
>>>
>>> On Wed, Apr 8, 2009 at 5:22 AM, Robert Einsle <robert@einsle.de
>>> <ma...@einsle.de>> wrote:
>>>
>>>     Hy List,
>>>
>>>     i've configured dependencies (libraries) als Scope "provided", and
>>>     would aspect they are not packed to the destination war-File.
>>>
>>>     --- cut ---
>>>         <dependency>
>>>           <groupId>javax.servlet</groupId>
>>>           <artifactId>servlet-api</artifactId>
>>>           <version>2.2</version>
>>>           <scope>provided</scope>
>>>         </dependency>
>>>         <dependency>
>>>           <groupId>javax.mail</groupId>
>>>           <artifactId>mail</artifactId>
>>>           <version>1.4</version>
>>>           <scope>provided</scope>
>>>         </dependency>
>>>         <dependency>
>>>           <groupId>javax.activation</groupId>
>>>           <artifactId>activation</artifactId>
>>>           <version>1.1</version>
>>>           <scope>provided</scope>
>>>         </dependency>
>>>     --- cut ---
>>>
>>>     but these 3 Libraries are in my destination war-File.
>>>
>>>
>>>
>>>     How can i configure this Dependencies in right way that they are
>>>     provided for compile, but are not in my destination war-File??
>>>
>>>     Thanks a lot.
>>>
>>>     Robert
>>>
>>>
>>>
>>>
>>> --
>>> -Act as if it were impossible to fail
>>>       
>
>
>
>   

Re: Packaging of "provided" Dependencie in war

Posted by Kyle Bober <ky...@gmail.com>.
Restarting you development environment will not remove the maven target
directory and artifacts. Try running the following Maven command 'mvn clean
package'  and check the contents of the
target/<war_file_directory>/WEB-INF/lib

-Kyle

On Wed, Apr 8, 2009 at 9:27 AM, Robert Einsle <ro...@einsle.de> wrote:

> Hy,
>
> i think i run it several times, incl restart of my Developementenvironment.
>
> Robert
>
> Kyle Bober schrieb:
> > That should work the way you have it configured. Did you run the clean
> > goal after you changed the dependency scope to provided. This will
> > make sure that a previous build that may have contained the
> > dependencies is completely removed.
> >
> > -Kyle
> >
> > On Wed, Apr 8, 2009 at 5:22 AM, Robert Einsle <robert@einsle.de
> > <ma...@einsle.de>> wrote:
> >
> >     Hy List,
> >
> >     i've configured dependencies (libraries) als Scope "provided", and
> >     would aspect they are not packed to the destination war-File.
> >
> >     --- cut ---
> >         <dependency>
> >           <groupId>javax.servlet</groupId>
> >           <artifactId>servlet-api</artifactId>
> >           <version>2.2</version>
> >           <scope>provided</scope>
> >         </dependency>
> >         <dependency>
> >           <groupId>javax.mail</groupId>
> >           <artifactId>mail</artifactId>
> >           <version>1.4</version>
> >           <scope>provided</scope>
> >         </dependency>
> >         <dependency>
> >           <groupId>javax.activation</groupId>
> >           <artifactId>activation</artifactId>
> >           <version>1.1</version>
> >           <scope>provided</scope>
> >         </dependency>
> >     --- cut ---
> >
> >     but these 3 Libraries are in my destination war-File.
> >
> >
> >
> >     How can i configure this Dependencies in right way that they are
> >     provided for compile, but are not in my destination war-File??
> >
> >     Thanks a lot.
> >
> >     Robert
> >
> >
> >
> >
> > --
> > -Act as if it were impossible to fail
>



-- 
-Act as if it were impossible to fail

Re: Packaging of "provided" Dependencie in war

Posted by Robert Einsle <ro...@einsle.de>.
Hy,

i think i run it several times, incl restart of my Developementenvironment.

Robert

Kyle Bober schrieb:
> That should work the way you have it configured. Did you run the clean
> goal after you changed the dependency scope to provided. This will
> make sure that a previous build that may have contained the
> dependencies is completely removed.
>
> -Kyle
>
> On Wed, Apr 8, 2009 at 5:22 AM, Robert Einsle <robert@einsle.de
> <ma...@einsle.de>> wrote:
>
>     Hy List,
>
>     i've configured dependencies (libraries) als Scope "provided", and
>     would aspect they are not packed to the destination war-File.
>
>     --- cut ---
>         <dependency>
>           <groupId>javax.servlet</groupId>
>           <artifactId>servlet-api</artifactId>
>           <version>2.2</version>
>           <scope>provided</scope>
>         </dependency>
>         <dependency>
>           <groupId>javax.mail</groupId>
>           <artifactId>mail</artifactId>
>           <version>1.4</version>
>           <scope>provided</scope>
>         </dependency>
>         <dependency>
>           <groupId>javax.activation</groupId>
>           <artifactId>activation</artifactId>
>           <version>1.1</version>
>           <scope>provided</scope>
>         </dependency>
>     --- cut ---
>
>     but these 3 Libraries are in my destination war-File.
>
>
>
>     How can i configure this Dependencies in right way that they are
>     provided for compile, but are not in my destination war-File??
>
>     Thanks a lot.
>
>     Robert
>
>
>
>
> -- 
> -Act as if it were impossible to fail

Re: Packaging of "provided" Dependencie in war

Posted by Kyle Bober <ky...@gmail.com>.
That should work the way you have it configured. Did you run the clean goal
after you changed the dependency scope to provided. This will make sure that
a previous build that may have contained the dependencies is completely
removed.

-Kyle

On Wed, Apr 8, 2009 at 5:22 AM, Robert Einsle <ro...@einsle.de> wrote:

>  Hy List,
>
> i've configured dependencies (libraries) als Scope "provided", and would
> aspect they are not packed to the destination war-File.
>
> --- cut ---
>     <dependency>
>       <groupId>javax.servlet</groupId>
>       <artifactId>servlet-api</artifactId>
>       <version>2.2</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>javax.mail</groupId>
>       <artifactId>mail</artifactId>
>       <version>1.4</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>javax.activation</groupId>
>       <artifactId>activation</artifactId>
>       <version>1.1</version>
>       <scope>provided</scope>
>     </dependency>
> --- cut ---
>
> but these 3 Libraries are in my destination war-File.
>
>
>
> How can i configure this Dependencies in right way that they are provided
> for compile, but are not in my destination war-File??
>
> Thanks a lot.
>
> Robert
>



-- 
-Act as if it were impossible to fail