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/09 03:59:23 UTC

using lib.repo

I've set my project.properties to use
maven.lib.repo=src/webapp/WEB-INF/lib

I'd like needed jars to be picked up from there. But it doesn't seem to
work. "maven war" gives me "package does not exist" compile errors (in
the CVS HEAD version).

Have I got the syntax wrong?
-- 
  Daniel
  kehoe@fortuity.com

Re: using lib.repo

Posted by di...@multitask.com.au.
Just a reminder that if you list your dependencies in project.xml and mark 
them with a 'war.bundle.jar' property they will automatically appear in 
WEB-INF/lib of your war.
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Ben Walding <be...@walding.com> wrote on 09/02/2003 06:36:18 PM:

> It's probably going to be easier to flatten the structure than 
> reconstitute it.
> 
> So I'd move the packages to the package/jars/package-version.jar format 
> and then if you detect an ant build, flatten in into 
src/webapp/WEB-INF/lib
> otherwise copy it across to the maven repository.
> 
> Daniel Kehoe wrote:
> 
> >>Daniel Kehoe wrote:
> >> 
> >>
> >>>src/webapp/WEB-INF/lib
> >>>I'd like needed jars to be picked up from there. 
> >>> 
> >>>
> >
> >On Sun, 09 Feb 2003 13:33:57 +1000, "Ben Walding" <be...@walding.com> 
said:
> > 
> >
> >>Normally, you leave maven.lib.repo alone.   Unless you WEB-INF/lib is 
in 
> >>the same structure as the repository, then it won't do what you want.
> >> 
> >>
> >
> >I realize an advantage of maven is the common repository. But I'd like 
to
> >make maven optional for developers who build my app. I'll use maven
> >because it can run junit and build site documents. Not everyone will
> >install maven just to build my app. I already have a bullet-proof ant
> >script that compiles and installs using the jars in
> >src/webapp/WEB-INF/lib. 
> >
> >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.
> > 
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
turbine-maven-user-help@jakarta.apache.org
> 

> ForwardSourceID:NT000AEEBE 

Re: using lib.repo

Posted by Ben Walding <be...@walding.com>.
It's probably going to be easier to flatten the structure than 
reconstitute it.

So I'd move the packages to the package/jars/package-version.jar format 
and then if you detect an ant build, flatten in into src/webapp/WEB-INF/lib
otherwise copy it across to the maven repository.

Daniel Kehoe wrote:

>>Daniel Kehoe wrote:
>>    
>>
>>>src/webapp/WEB-INF/lib
>>>I'd like needed jars to be picked up from there. 
>>>      
>>>
>
>On Sun, 09 Feb 2003 13:33:57 +1000, "Ben Walding" <be...@walding.com> said:
>  
>
>>Normally, you leave maven.lib.repo alone.   Unless you WEB-INF/lib is in 
>>the same structure as the repository, then it won't do what you want.
>>    
>>
>
>I realize an advantage of maven is the common repository. But I'd like to
>make maven optional for developers who build my app. I'll use maven
>because it can run junit and build site documents. Not everyone will
>install maven just to build my app. I already have a bullet-proof ant
>script that compiles and installs using the jars in
>src/webapp/WEB-INF/lib. 
>
>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.
>  
>



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...





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

Posted by Daniel Kehoe <ke...@fortuity.com>.
> "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: using lib.repo

Posted by di...@multitask.com.au.
Sure, place them in src/webapp/WEB-INF/lib, and list them as dependencies 
in your project.xml.
--
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 09/02/2003 06:15:49 PM:

> > Daniel Kehoe wrote:
> > >src/webapp/WEB-INF/lib
> > >I'd like needed jars to be picked up from there. 
> 
> On Sun, 09 Feb 2003 13:33:57 +1000, "Ben Walding" <be...@walding.com> 
said:
> > Normally, you leave maven.lib.repo alone.   Unless you WEB-INF/lib is 
in 
> > the same structure as the repository, then it won't do what you want.
> 
> I realize an advantage of maven is the common repository. But I'd like 
to
> make maven optional for developers who build my app. I'll use maven
> because it can run junit and build site documents. Not everyone will
> install maven just to build my app. I already have a bullet-proof ant
> script that compiles and installs using the jars in
> src/webapp/WEB-INF/lib. 
> 
> 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.
> -- 
>   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:NT000AEEB6 

Re: using lib.repo

Posted by Daniel Kehoe <ke...@fortuity.com>.
> Daniel Kehoe wrote:
> >src/webapp/WEB-INF/lib
> >I'd like needed jars to be picked up from there. 

On Sun, 09 Feb 2003 13:33:57 +1000, "Ben Walding" <be...@walding.com> said:
> Normally, you leave maven.lib.repo alone.   Unless you WEB-INF/lib is in 
> the same structure as the repository, then it won't do what you want.

I realize an advantage of maven is the common repository. But I'd like to
make maven optional for developers who build my app. I'll use maven
because it can run junit and build site documents. Not everyone will
install maven just to build my app. I already have a bullet-proof ant
script that compiles and installs using the jars in
src/webapp/WEB-INF/lib. 

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.
-- 
  Daniel
  kehoe@fortuity.com

maven project.properties documentation

Posted by Daniel Kehoe <ke...@fortuity.com>.
I've found it difficult to find online documentation about maven
project.properties.

There's a reference in the Maven directory layout document
(http://jakarta.apache.org/turbine/maven/reference/dirlayout.html):
"This file can be used to override Maven default properties (defined in
${maven.home}/bin/driver.properties )."
I haven't found bin/driver.properties.

Googling for "Maven project properties documentation" gives links to the
directory layout document and an out-of-date document on someone else's
web site 
(http://www.ingrid.org/jajakarta/turbine/jp/turbine/maven/reference/properties.html).

Seems there should be a link from the Maven Reference Documentation page
and in the Maven directory layout document. 

Hoping this suggestion makes it easier for others to get started with
Maven.
-- 
  Daniel
  kehoe@fortuity.com

Re: maven and forrest

Posted by Jeff Turner <je...@apache.org>.
On Sun, Feb 09, 2003 at 07:29:27PM +1100, dion@multitask.com.au wrote:
> Jeff Turner <je...@apache.org> wrote on 09/02/2003 07:18:55 PM:
> 
> > PS, while I'm here: anyone up for a JIRA Maven plugin? :)  It's one tiny
> > RSS stylesheet..
> > 
> > http://xml.apache.org/forrest/forrest-issues.html
> Sure.
> 
> Just point us to your source....

Involves fiddling with the settings at:

http://jira.werken.com/secure/IssueNavigator.jspa

Then when you have an acceptable subset of the total issues, click on the
'XML' link to get an RSS view.  Forrest uses
http://issues.cocoondev.org/jira/secure/IssueNavigator.jspa?pid=10000&resolutionIds=-1&view=rss&reset=true

Actually, looks like there's a bug in the werken.com JIRA:

Fatal error in
file:/usr/local/jira-1.4.3/atlassian-jira-1.4.3/atlassian-jira-web/secure/views/navigator/navigator-rss.jsp
at line 1516: Reference to undefined entity "ΓΈ".

I'll submit a bug report.


--Jeff

> --
> dIon Gillard, Multitask Consulting
> Blog:      http://www.freeroller.net/page/dion/Weblog
> Work:      http://www.multitask.com.au
> 

Re: maven and forrest

Posted by di...@multitask.com.au.
Jeff Turner <je...@apache.org> wrote on 09/02/2003 07:18:55 PM:

> PS, while I'm here: anyone up for a JIRA Maven plugin? :)  It's one tiny
> RSS stylesheet..
> 
> http://xml.apache.org/forrest/forrest-issues.html
Sure.

Just point us to your source....
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au



Re: maven and forrest

Posted by Jeff Turner <je...@apache.org>.
On Sat, Feb 08, 2003 at 11:19:42PM -0800, Daniel Kehoe wrote:
> Is there a maven plug-in for forrest?

Nope, though it's somewhere on my todo list, if no-one more Maven-savvy
jumps in.

> Or an easy way to integrate site docs generated by both maven and
> forrest?

As long as all tools produce XML, it shouldn't be hard to style them with
Forrest to get a common L&F.

> I like the structure of forrest for documentation and I'd like to combine
> it with documents generated by maven.

Just curious: does 'the structure of forrest' mean the directory layout?
Isn't this configurable with properties in Maven?

I'd suggest: stick to Maven, and Forrest will (eventually) come to you.

--Jeff

PS, while I'm here: anyone up for a JIRA Maven plugin? :)  It's one tiny
RSS stylesheet..

http://xml.apache.org/forrest/forrest-issues.html

> -- 
>   Daniel
>   kehoe@fortuity.com
> 

Re: maven and forrest

Posted by di...@multitask.com.au.
Several people have mentioned this is possible from the forrest team.

I haven't been able to find out how this is accomplished from the forrest 
web site, other than invoking the ant scripts.

Nicola Ken Barozzi may know, as he has stated that "there is no 
technological reason why Forrest cannot include Maven-generated docs in 
the site".

See http://marc.theaimsgroup.com/?l=james-dev&m=104374560229993&w=2
--
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 09/02/2003 06:19:42 PM:

> Is there a maven plug-in for forrest? Or an easy way to integrate site
> docs generated by both maven and forrest?
> 
> I like the structure of forrest for documentation and I'd like to 
combine
> it with documents generated by maven.
> 
> -- 
>   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:NT000AEEAE 

Re: maven and forrest

Posted by di...@multitask.com.au.
Several people have mentioned this is possible from the forrest team.

I haven't been able to find out how this is accomplished from the forrest 
web site, other than invoking the ant scripts.

Nicola Ken Barozzi may know, as he has stated that "there is no 
technological reason why Forrest cannot include Maven-generated docs in 
the site".

See http://marc.theaimsgroup.com/?l=james-dev&m=104374560229993&w=2
--
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 09/02/2003 06:19:42 PM:

> Is there a maven plug-in for forrest? Or an easy way to integrate site
> docs generated by both maven and forrest?
> 
> I like the structure of forrest for documentation and I'd like to 
combine
> it with documents generated by maven.
> 
> -- 
>   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:NT000AEEAE 

maven and forrest

Posted by Daniel Kehoe <ke...@fortuity.com>.
Is there a maven plug-in for forrest? Or an easy way to integrate site
docs generated by both maven and forrest?

I like the structure of forrest for documentation and I'd like to combine
it with documents generated by maven.

-- 
  Daniel
  kehoe@fortuity.com

Re: using lib.repo

Posted by Ben Walding <be...@walding.com>.
Normally, you leave maven.lib.repo alone.   Unless you WEB-INF/lib is in 
the same structure as the repository, then it won't do what you want.

If you're trying to get jars included in your war file, see 
http://jakarta.apache.org/turbine/maven/reference/plugins/war/properties.html

If the jars you're wanting in your war file don't exist in the maven 
repository, move them out of WEB-INF/lib and into say 
<project>/packages/war-base/jars/war-base-version.jar (the same format 
as the repository)

Then as a preGoal to java:compile copy the war files up to your local 
repository eg. along the lines of the following

    <goal name="environment">
        <property environment="env"/>
        <fail unless="env.MAVEN_HOME" message="Please set the MAVEN_HOME 
environment variable to the location of your Maven installation"/>
    </goal>
 
    <preGoal name="java:compile">
        <attainGoal name="environment"/>
        <copy todir="${env.MAVEN_HOME}/repository">
            <fileset dir="packages">
                <include name="**/*.jar"/>
            </fileset>   
        </copy>
    </preGoal>

I'll be doing up a faq entry for this kind of thing shortly.

Daniel Kehoe wrote:

>I've set my project.properties to use
>maven.lib.repo=src/webapp/WEB-INF/lib
>
>I'd like needed jars to be picked up from there. But it doesn't seem to
>work. "maven war" gives me "package does not exist" compile errors (in
>the CVS HEAD version).
>
>Have I got the syntax wrong?
>  
>