You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Sommers, Elizabeth" <So...@Pragmatics.com> on 2006/01/24 19:09:10 UTC

War task

I am trying to build a war.  The files that should be included in the lib
are in a fileset defined by

<path id="managed.class.path">
    <fileset dir="${M2_REPO}">
      <include name="log4j/log4j/1.2.6/log4j-1.2.6.jar"/>
      <include
name="springframework/spring-web/1.2.5/spring-web-1.2.5.jar"/>
      <include name="net/sourceforge/jexcelapi/jxl/2.5.7/jxl-2.5.7.jar"/>
      <include name="c3p0/c3p0/0.9.0/c3p0-0.9.0.jar"/>
	...
     </fileset>
</path>
I can't figure out how to include this.

I am getting an error of 
 managed.class.path  doesn't denote a zipfileset or a fileset


My war target is 
<target name="war" description="Create payload webapp">
	
		<mkdir dir="${sys.dir}" />
		<delete file="${sys.dir}/${project.distname}.war" />
		<war warfile="${sys.dir}/${project.distname}.war"
webxml="docroot/WEB-INF/web.xml">
			<lib refid="managed.class.path" />
			<lib dir="${sys.dir}">
				<include name="${project.distname}.jar" />
			</lib>
			<webinf dir="docroot/WEB-INF">
				<include name="**/*" />
				<exclude name="**/web.xml" />
			</webinf>
			<!-- enable for deploy to tomcat: -->
			<!--metainf dir="docroot/META-INF">
				<include name="**/*"/>
				</metainf-->
			<fileset dir="docroot">
				<include name="css/**/*.css" />
				<include name="images/**/*" />
				<include name="javascript/*.js" />
				<include name="*.jsp" />
			</fileset>
		</war>
	</target>


Thanks
Liz Sommers
sommers@pragmatics.com



____________________________ 
http://www.pragmatics.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: War task

Posted by Steve Loughran <st...@apache.org>.
Sommers, Elizabeth wrote:
> I am trying to build a war.  The files that should be included in the lib
> are in a fileset defined by
> 
> <path id="managed.class.path">
>     <fileset dir="${M2_REPO}">
>       <include name="log4j/log4j/1.2.6/log4j-1.2.6.jar"/>
>       <include
> name="springframework/spring-web/1.2.5/spring-web-1.2.5.jar"/>
>       <include name="net/sourceforge/jexcelapi/jxl/2.5.7/jxl-2.5.7.jar"/>
>       <include name="c3p0/c3p0/0.9.0/c3p0-0.9.0.jar"/>
> 	...
>      </fileset>
> </path>
> I can't figure out how to include this.
> 
> I am getting an error of 
>  managed.class.path  doesn't denote a zipfileset or a fileset


You need to copy all JARs you need into a directory, flattening as you 
go. that is, if you want the app server classloader to find them.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org