You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by faisalloe <fa...@gmail.com> on 2008/01/28 10:08:11 UTC

pom.xml jar scope

i have a problem with pom file.

i have servlet.jar which is already available in tomcat lib folder, i want
to use this jar only to compile and produce class files but not in project's
lib folder.

i think there is tag named
<scope>compile</scope>
but it didn't worked it still copy jar file into lib folder.
can any one i prevent copying jar file into lib folder and only to use for
compilation!
-- 
View this message in context: http://www.nabble.com/pom.xml-jar-scope-tp15131075s177p15131075.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: pom.xml jar scope

Posted by Wendy Smoak <ws...@gmail.com>.
On Jan 29, 2008 7:00 AM, faisalloe <fa...@gmail.com> wrote:
>
> NOp it didn't worked out

We *always* need more information than "it didn't work".  By this I
assume you mean that the jar is still getting included in WEB-INF/lib.

Using provided scope _should_ work.

Make sure you run 'mvn clean' to delete anything left over from prior
builds, and then try 'mvn install' again.

If it still doesn't work, show us the dependency snippet from your
pom, and explain what's going wrong.

-- 
Wendy

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


RE: pom.xml jar scope

Posted by faisalloe <fa...@gmail.com>.

NOp it didn't worked out




nicklist wrote:
> 
> Try with scope 'provided'.
> 
> See [1] for a explanation of the different scopes.
> 
> Hth,
> 
> Nick Stolwijk
> 
> [1]
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> 
> 
> -----Original Message-----
> From: faisalloe [mailto:faisalloe@gmail.com]
> Sent: Mon 1/28/2008 10:08 AM
> To: users@maven.apache.org
> Subject: pom.xml jar scope
>  
> 
> i have a problem with pom file.
> 
> i have servlet.jar which is already available in tomcat lib folder, i want
> to use this jar only to compile and produce class files but not in
> project's
> lib folder.
> 
> i think there is tag named
> <scope>compile</scope>
> but it didn't worked it still copy jar file into lib folder.
> can any one i prevent copying jar file into lib folder and only to use for
> compilation!
> -- 
> View this message in context:
> http://www.nabble.com/pom.xml-jar-scope-tp15131075s177p15131075.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/pom.xml-jar-scope-tp15131075s177p15159796.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: pom.xml jar scope

Posted by ni...@planet.nl.
Try with scope 'provided'.

See [1] for a explanation of the different scopes.

Hth,

Nick Stolwijk

[1] http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html


-----Original Message-----
From: faisalloe [mailto:faisalloe@gmail.com]
Sent: Mon 1/28/2008 10:08 AM
To: users@maven.apache.org
Subject: pom.xml jar scope
 

i have a problem with pom file.

i have servlet.jar which is already available in tomcat lib folder, i want
to use this jar only to compile and produce class files but not in project's
lib folder.

i think there is tag named
<scope>compile</scope>
but it didn't worked it still copy jar file into lib folder.
can any one i prevent copying jar file into lib folder and only to use for
compilation!
-- 
View this message in context: http://www.nabble.com/pom.xml-jar-scope-tp15131075s177p15131075.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: pom.xml jar scope

Posted by MK Tan <mk...@gmail.com>.
try change it to
<scope>provided</scope>

HTH,

On Jan 28, 2008 5:08 PM, faisalloe <fa...@gmail.com> wrote:

>
> i have a problem with pom file.
>
> i have servlet.jar which is already available in tomcat lib folder, i want
> to use this jar only to compile and produce class files but not in
> project's
> lib folder.
>
> i think there is tag named
> <scope>compile</scope>
> but it didn't worked it still copy jar file into lib folder.
> can any one i prevent copying jar file into lib folder and only to use for
> compilation!
> --
> View this message in context:
> http://www.nabble.com/pom.xml-jar-scope-tp15131075s177p15131075.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>