You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Darren Hartford <dh...@ghsinc.com> on 2005/10/25 20:10:08 UTC

[m2] ant WAR tasks and

Hey all,
Trying to do something pretty simple I thought - use the <artifact> task
to create the classpath, then for WAR task (and similar tasks) simply
add the classpath as the <lib> param:

	  <artifact:dependencies filesetid="maven.dependency.fileset"
pathId="maven.dependency.classpath">
	      <pom refid="pom"/>
	   </artifact:dependencies>


	    <war destfile="target/mypackage.war"
webxml="src/webapp/WEB-INF/web.xml">
	    	<classes dir="${pom.build.outputDirectory}"/>
	    	<webinf dir="src/webapp/WEB-INF" includes="*.xml"/>
	    	<lib refid="${maven.dependency.classpath}"/>
	    </war>

But, that doesn't work - has anyone experienced this that could show a
working example (I've tried quite a few variations and filesets already
without success so please test)?

http://ant.apache.org/manual/CoreTasks/war.html
'lib' section

Thanky, kinda urgent as in a bind as I made a poor assumption this would
be easy :-(
-D


P.s. When using the filesetId, it does not complain but the lib
directory will have three-level subdirs below \lib.

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


Re: [m2] ant WAR tasks and

Posted by Brett Porter <br...@gmail.com>.
Please see the documentation on the website which shows how to use the
fileset with a mapper to do what you expect.

- Brett

On 10/26/05, Darren Hartford <dh...@ghsinc.com> wrote:
> Hey all,
> Trying to do something pretty simple I thought - use the <artifact> task
> to create the classpath, then for WAR task (and similar tasks) simply
> add the classpath as the <lib> param:
>
>           <artifact:dependencies filesetid="maven.dependency.fileset"
> pathId="maven.dependency.classpath">
>               <pom refid="pom"/>
>            </artifact:dependencies>
>
>
>             <war destfile="target/mypackage.war"
> webxml="src/webapp/WEB-INF/web.xml">
>                 <classes dir="${pom.build.outputDirectory}"/>
>                 <webinf dir="src/webapp/WEB-INF" includes="*.xml"/>
>                 <lib refid="${maven.dependency.classpath}"/>
>             </war>
>
> But, that doesn't work - has anyone experienced this that could show a
> working example (I've tried quite a few variations and filesets already
> without success so please test)?
>
> http://ant.apache.org/manual/CoreTasks/war.html
> 'lib' section
>
> Thanky, kinda urgent as in a bind as I made a poor assumption this would
> be easy :-(
> -D
>
>
> P.s. When using the filesetId, it does not complain but the lib
> directory will have three-level subdirs below \lib.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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