2016-08-05 3 views
0

Это мой муравей build.xml для Java Web Project. Я способен генерировать файлы классов из следующего кодаАнт-вызов для войны

<?xml version="1.0" encoding="UTF-8"?><project basedir="." default="build" name="manager"> 
<property environment="env"/> 
<property name="ECLIPSE_HOME" value="C:/Program Files (x86)/IBM/SDP"/> 
<property name="debuglevel" value="source,lines,vars"/> 
<property name="target" value="1.2"/> 
<property name="source" value="1.3"/> 
<path id="Web App Libraries.libraryclasspath"> 
    <pathelement location="WebContent/WEB-INF/lib/activation.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/antlr.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/avalon-framework-cvs-20020806.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/batik.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-beanutils.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-collections-3.2.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-collections.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-digester.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-fileupload.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-io-1.4.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-lang-2.4.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-lang.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-logging.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/commons-validator.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/cos.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/crypt.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/dbbeans.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/ezmorph-1.0.3.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/fop.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/itext-1.4.3.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jai_codec.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jai_core.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jakarta-oro.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jakarta-poi-1.10.0-dev-20030222.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jaxen-full.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jcommon-1.0.17-junit.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jcommon-1.0.17.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jcommon-xml-1.0.6.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jfreechart-1.0.15.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/json-lib-2.1-jdk13.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jspsql.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jstl.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/junit.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/jxl.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/log4j-1.2.13.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/mail.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/quartz-1.8.4.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/rowset.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/saxpath.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/servlet.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/slf4j-api-1.6.0.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/slf4j-log4j12-1.6.0.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/standard.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/struts.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/taglibs-application.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/taglibs-page.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/taglibs-request.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/taglibs-response.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/taglibs-session.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/xalan-2.4.1.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/xalan.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/xercesImpl-2.2.1.jar"/> 
    <pathelement location="WebContent/WEB-INF/lib/xml-apis.jar"/> 
</path> 
<path id="EAR Libraries.libraryclasspath"/> 
<path id="WebSphere Application Server v7.0 [WebSphere Application Server v7.0].libraryclasspath"> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/lib/bootstrap.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/lib/j2ee.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/lib/mail-impl.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/lib/rsadbutils.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.jaxb.tools.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.jaxws.tools.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.admin.core.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.admin.services.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.ejbportable.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.emf.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.jpa.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.portletcontainer.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.prereq.commonj-twm.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.prereq.soap.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.prereq.vajava.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.prereq.wsdl4j.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.runtime.dist.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.runtime.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.sib.server.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.sip.container.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.sip.interface.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.wccm.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.webcontainer.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.ws.wsadie/marshall.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/com.ibm.wsfp.main.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.common.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.commonj.sdo.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.ecore.change.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.ecore.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.ecore.sdo.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/plugins/org.eclipse.emf.ecore.xmi.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/profiles/was70profile1/installedConnectors/wmq.jmsra.rar/com.ibm.mq.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/profiles/was70profile1/installedConnectors/wmq.jmsra.rar/com.ibm.mqjms.jar"/> 
    <pathelement location="${ECLIPSE_HOME}/runtimes/base_v7/profiles/was70profile1/installedConnectors/wmq.jmsra.rar/dhbcore.jar"/> 
</path> 
<path id="manager.classpath"> 
    <pathelement location="WebContent/WEB-INF/classes"/> 
    <path refid="Web App Libraries.libraryclasspath"/> 
    <path refid="EAR Libraries.libraryclasspath"/> 
    <path refid="WebSphere Application Server v7.0 [WebSphere Application Server v7.0].libraryclasspath"/> 
</path> 
<target name="init"> 
    <mkdir dir="WebContent/WEB-INF/classes"/> 
    <copy includeemptydirs="false" todir="WebContent/WEB-INF/classes"> 
     <fileset dir="src" excludes="**/*.launch, **/*.java"/> 
    </copy> 
    <copy includeemptydirs="false" todir="WebContent/WEB-INF/classes"> 
     <fileset dir=".apt_generated" excludes="**/*.launch, **/*.java"/> 
    </copy> 
</target> 

<target name="clean"> 
    <delete dir="WebContent/WEB-INF/classes"/> 
</target> 

<target depends="clean" name="cleanall"/> 

<target depends="build-subprojects,build-project" name="build"/> 

<target name="build-subprojects"/> 

<target depends="init" name="build-project"> 
    <echo message="${ant.project.name}: ${ant.file}"/> 
    <javac debug="true" debuglevel="${debuglevel}" destdir="WebContent/WEB-INF/classes" source="${source}" target="${target}"> 
     <src path="src"/> 
     <classpath refid="manager.classpath"/> 
    </javac> 
    <javac debug="true" debuglevel="${debuglevel}" destdir="WebContent/WEB-INF/classes" source="${source}" target="${target}"> 
     <src path=".apt_generated"/> 
     <classpath refid="manager.classpath"/> 
    </javac> 
</target> 

<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> 

<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> 
    <copy todir="${ant.library.dir}"> 
     <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> 
    </copy> 
    <unzip dest="${ant.library.dir}"> 
     <patternset includes="jdtCompilerAdapter.jar"/> 
     <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> 
    </unzip> 
</target> 

<target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> 
    <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> 
    <antcall target="build"/> 
</target> 

<target name="war" depends="build"> 
    <war destfile="manager.war" webxml="WebContent/WEB-INF/web.xml"> 
     <fileset dir="WebContent"> 
      <include name="**/*.*"/> 
     </fileset>       
    </war>        
</target> 

<target name="GetStringFromClipboard (1)"> 
    <java classname="GetStringFromClipboard" failonerror="true" fork="yes"> 
     <classpath refid="manager.classpath"/> 
    </java> 
</target> 
<target name="Main"> 
    <java classname="Main" failonerror="true" fork="yes"> 
     <classpath refid="manager.classpath"/> 
    </java> 
</target> 
<target name="MoveFileExample (1)"> 
    <java classname="MoveFileExample" failonerror="true" fork="yes"> 
     <classpath refid="manager.classpath"/> 
    </java> 
</target> 
<target name="MoveFileExample2"> 
    <java classname="MoveFileExample2" failonerror="true" fork="yes"> 
     <classpath refid="manager.classpath"/> 
    </java> 
</target>    

Но если я выполнить муравей он вызывает Строить-подпроекты, первонач, строить-проекты и строить, но не называет войну. Как добавить это к последовательности вызовов.

ответ

0

Изменено

<project basedir="." default="build" name="manager"> 

в

<project basedir="." default="war" name="manager"> 
Смежные вопросы