You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Will <to...@yahoo.com> on 2006/04/07 11:33:44 UTC

[m2] existing JAR in WEB-INF/lib without dependency

I know it's not the usual or recommended case, but is
this possible somehow:

I've got a web app, which has already a JAR in the
source directory under ....WEB-INF/lib 
I do not want the JAR to be picked from the maven
repository, and thus I did not define the dependency.
How can I make that JAR (or better all existing JARs
in the WEB-INF/lib) visible to the compiler classpath?

Tom


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [m2] existing JAR in WEB-INF/lib without dependency

Posted by Wayne Fay <wa...@gmail.com>.
Use something like:

<dependency>
     <groupId>abc</groupId>
     <artifactId>xyz</artifactId>
     <version>1.0</version>
     <scope>system</scope>
     <systemPath>${basedir}/lib/abc-xyz-1.0.jar</systemPath>
</dependency>

However you are far better off simply using "mvn install:install-file"
to add the file to your local user repository! Scope system gives
strange results some times with dependencies...

Wayne

On 4/7/06, Alexandre Poitras <al...@gmail.com> wrote:
> Declare it using a "system" dependency. Note the jar won't be packaged
> inside the project generated jar.
>
> On 4/7/06, Thomas Will <to...@yahoo.com> wrote:
> > I know it's not the usual or recommended case, but is
> > this possible somehow:
> >
> > I've got a web app, which has already a JAR in the
> > source directory under ....WEB-INF/lib
> > I do not want the JAR to be picked from the maven
> > repository, and thus I did not define the dependency.
> > How can I make that JAR (or better all existing JARs
> > in the WEB-INF/lib) visible to the compiler classpath?
> >
> > Tom
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Alexandre Poitras
> Québec, Canada
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] existing JAR in WEB-INF/lib without dependency

Posted by Alexandre Poitras <al...@gmail.com>.
Declare it using a "system" dependency. Note the jar won't be packaged
inside the project generated jar.

On 4/7/06, Thomas Will <to...@yahoo.com> wrote:
> I know it's not the usual or recommended case, but is
> this possible somehow:
>
> I've got a web app, which has already a JAR in the
> source directory under ....WEB-INF/lib
> I do not want the JAR to be picked from the maven
> repository, and thus I did not define the dependency.
> How can I make that JAR (or better all existing JARs
> in the WEB-INF/lib) visible to the compiler classpath?
>
> Tom
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Alexandre Poitras
Québec, Canada

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