You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniel Kehoe <ke...@fortuity.com> on 2003/02/10 20:03:58 UTC

obtaining jars from src/webapp/WEB-INF/lib

> "Daniel Kehoe" <ke...@fortuity.com> wrote on 09/02/2003 06:15:49 PM:
> Is there no possibility for obtaining jars from src/webapp/WEB-INF/lib?
> That way I can use either ant or maven with the same directory layout.

On Sun, 9 Feb 2003 18:43:07 +1100, dion@multitask.com.au said:
> Sure, place them in src/webapp/WEB-INF/lib, and list them as dependencies 
> in your project.xml.

dIon, could you clarify?

I tried adding this to project.xml but it didn't work (I get "package
does not exist" compile errors):
<dependency>
    <id>something</id>
    <version>1.0</version>
    <jar>something.jar</jar>
    <url>file://./src/webapp/WEB-INF/lib/</url>
</dependency>

I'd really like maven to use the jars I've got in src/webapp/WEB-INF/lib/
rather than setting up a separate repository.
-- 
  Daniel
  kehoe@fortuity.com

Re: obtaining jars from src/webapp/WEB-INF/lib

Posted by di...@multitask.com.au.
Daniel,

the way we do it here, is to list the jars that you would normally place 
in WEB-INF/lib as dependencies, and to each dependent jar file, 
add the following:

      <properties>
        <war.bundle.jar>true<war.bundle.jar>
      </properties>
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


"Daniel Kehoe" <ke...@fortuity.com> wrote on 11/02/2003 09:39:30 AM:

> Thank you Colin, that was very helpful and I appreciate it.
> 
> For benefit of anyone searching the archives in the future, this works.
> Add this to your project.properties file:
> maven.jar.override=on
> maven.jar.something=${basedir}/src/webapp/WEB-INF/lib/something.jar
> (where you substitute the name of your jar for "something")
> You still need to specify the dependency in your project.xml, such as
> <dependency>
>     <id>something</id>
>     <version>1.0</version>
>     <jar>something.jar</jar>
> </dependency>
> 
> On Mon, 10 Feb 2003 14:16:48 -0500, "Colin Sampaleanu"
> <co...@exis.com> said:
> > This should generally be a short-term solution 
> > though, it's a lot nicer to have jars in the repository...
> 
> The repository is a nice feature. But I'm making a web app example that
> inexperienced developers can use. Maven raises the bar very high: it is
> still in beta, it is riddled with undocumented features (see above), and
> the repository feature makes use impractical for developers at the 
bottom
> of a dial-up connection (I got 28MB on disk with no warning how much 
disk
> space I'd need or how long the process would take -- I'm glad I have
> broadband!). *I* want to use Maven (because I can generate 
documentation,
> javadocs, and test reports at one go -- thank you!) but I can't expect
> everyone to install Maven just to build a simple web app. Ant will do 
for
> that.
> 
> Daniel
> kehoe@fortuity.com
> 
> 
> > Daniel Kehoe wrote:
> > 
> > >>"Daniel Kehoe" <ke...@fortuity.com> wrote on 09/02/2003 06:15:49 PM:
> > >>Is there no possibility for obtaining jars from 
src/webapp/WEB-INF/lib?
> > >>That way I can use either ant or maven with the same directory 
layout.
> > >> 
> > >>
> > >
> > >On Sun, 9 Feb 2003 18:43:07 +1100, dion@multitask.com.au said:
> > > 
> > >
> > >>Sure, place them in src/webapp/WEB-INF/lib, and list them as 
dependencies 
> > >>in your project.xml.
> > >> 
> > >>
> > >
> > >dIon, could you clarify?
> > >
> > >I tried adding this to project.xml but it didn't work (I get "package
> > >does not exist" compile errors):
> > ><dependency>
> > >    <id>something</id>
> > >    <version>1.0</version>
> > >    <jar>something.jar</jar>
> > >    <url>file://./src/webapp/WEB-INF/lib/</url>
> > ></dependency>
> > >
> > >I'd really like maven to use the jars I've got in 
src/webapp/WEB-INF/lib/
> > >rather than setting up a separate repository.
> > > 
> > >
> > You need to use a jar override, so maven doesn't look in the repo, but 

> > in the override location. These is a sample of this in the touchstone 
> > build in the source... This should generally be a short-term solution 
> > though, it's a lot nicer to have jars in the repository...
> > 
> -- 
>   Daniel
>   kehoe@fortuity.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
turbine-maven-user-help@jakarta.apache.org
> 

> ForwardSourceID:NT000AF6EE 

Re: obtaining jars from src/webapp/WEB-INF/lib

Posted by Daniel Kehoe <ke...@fortuity.com>.
Thank you Colin, that was very helpful and I appreciate it.

For benefit of anyone searching the archives in the future, this works.
Add this to your project.properties file:
maven.jar.override=on
maven.jar.something=${basedir}/src/webapp/WEB-INF/lib/something.jar
(where you substitute the name of your jar for "something")
You still need to specify the dependency in your project.xml, such as
<dependency>
    <id>something</id>
    <version>1.0</version>
    <jar>something.jar</jar>
</dependency>

On Mon, 10 Feb 2003 14:16:48 -0500, "Colin Sampaleanu"
<co...@exis.com> said:
> This should generally be a short-term solution 
> though, it's a lot nicer to have jars in the repository...

The repository is a nice feature. But I'm making a web app example that
inexperienced developers can use. Maven raises the bar very high: it is
still in beta, it is riddled with undocumented features (see above), and
the repository feature makes use impractical for developers at the bottom
of a dial-up connection (I got 28MB on disk with no warning how much disk
space I'd need or how long the process would take -- I'm glad I have
broadband!). *I* want to use Maven (because I can generate documentation,
javadocs, and test reports at one go -- thank you!) but I can't expect
everyone to install Maven just to build a simple web app. Ant will do for
that.

Daniel
kehoe@fortuity.com


> Daniel Kehoe wrote:
> 
> >>"Daniel Kehoe" <ke...@fortuity.com> wrote on 09/02/2003 06:15:49 PM:
> >>Is there no possibility for obtaining jars from src/webapp/WEB-INF/lib?
> >>That way I can use either ant or maven with the same directory layout.
> >>    
> >>
> >
> >On Sun, 9 Feb 2003 18:43:07 +1100, dion@multitask.com.au said:
> >  
> >
> >>Sure, place them in src/webapp/WEB-INF/lib, and list them as dependencies 
> >>in your project.xml.
> >>    
> >>
> >
> >dIon, could you clarify?
> >
> >I tried adding this to project.xml but it didn't work (I get "package
> >does not exist" compile errors):
> ><dependency>
> >    <id>something</id>
> >    <version>1.0</version>
> >    <jar>something.jar</jar>
> >    <url>file://./src/webapp/WEB-INF/lib/</url>
> ></dependency>
> >
> >I'd really like maven to use the jars I've got in src/webapp/WEB-INF/lib/
> >rather than setting up a separate repository.
> >  
> >
> You need to use a jar override, so maven doesn't look in the repo, but 
> in the override location. These is a sample of this in the touchstone 
> build in the source... This should generally be a short-term solution 
> though, it's a lot nicer to have jars in the repository...
> 
-- 
  Daniel
  kehoe@fortuity.com

Re: obtaining jars from src/webapp/WEB-INF/lib

Posted by Colin Sampaleanu <co...@exis.com>.
Daniel Kehoe wrote:

>>"Daniel Kehoe" <ke...@fortuity.com> wrote on 09/02/2003 06:15:49 PM:
>>Is there no possibility for obtaining jars from src/webapp/WEB-INF/lib?
>>That way I can use either ant or maven with the same directory layout.
>>    
>>
>
>On Sun, 9 Feb 2003 18:43:07 +1100, dion@multitask.com.au said:
>  
>
>>Sure, place them in src/webapp/WEB-INF/lib, and list them as dependencies 
>>in your project.xml.
>>    
>>
>
>dIon, could you clarify?
>
>I tried adding this to project.xml but it didn't work (I get "package
>does not exist" compile errors):
><dependency>
>    <id>something</id>
>    <version>1.0</version>
>    <jar>something.jar</jar>
>    <url>file://./src/webapp/WEB-INF/lib/</url>
></dependency>
>
>I'd really like maven to use the jars I've got in src/webapp/WEB-INF/lib/
>rather than setting up a separate repository.
>  
>
You need to use a jar override, so maven doesn't look in the repo, but 
in the override location. These is a sample of this in the touchstone 
build in the source... This should generally be a short-term solution 
though, it's a lot nicer to have jars in the repository...