当前位置:编程学习 > JAVA >>

关于ANT的问题

我利用ant脚本构建工程,现出现一个我始终看不明白的错误,望高人指点
为了直观我把build.properties的内容和log错误信息内容贴在下面,build.xml的内容将贴在后面
其中build.properties内容是:project.perfix=carefx
product.name=WebFramework
product.version=2.0
user.name=Fusion_SDE
company.name=Carefx China

thirdParty.include.jar=*.jar
carefxParty.include.jar=*.jar
internalParty.include.jar=*.jar
ruleParty.include.jar=*.jar
activexParty.include.jar=*.jar

internal.include.jar=*-src.jar
internal.nosrc.jar=*-nosrc.jar
internal.fus.jar=*-fus.jar

IndexEntryPointClass=net.carefx.fc.web.index.Index
EditorIndexEntryPointClass=net.carefx.fc.web.index.EditorIndex
gwt.sdk=D:/gwt-2.1.0
gxt.sdk=D:/gxt-2.2.0 

log错误信息是:
compile:
     [echo] compile
    [javac] D:\workspace_01\WebFramework\build.xml:231: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 398 source files to D:\workspace_01\WebFramework\war\WEB-INF\classes
    [javac] D:\workspace_01\WebFramework\main\java\net\kinghis\client\enums\ActivexButton.java:4: 软件包 net.kinghis.activex.client.data 不存在
   错误信息意思是找不到我设置的第三方jar包,可我明明设置了路径。。。奇怪。。。求指点,先谢过了。 --------------------编程问答-------------------- <?xml version="1.0" encoding="UTF-8"?>
<project name="${product.name}" default="dev" basedir="./" xmlns:axis="antlib:org.apache.axis">
<!--typedef resource="org/tigris/subversion/svnant/svnantlib.xml" /--> 
<record name="webframework.log"/>
<taskdef resource="proguard/ant/task.properties" classpath="${ant.library.dir}/proguard.jar"/>
<!--<ant inheritall="false" antfile="build-fus.xml"></ant>-->
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<!--
<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"/>
-->

<property environment="evn"/>
<echo message="JAVA_HOEM:${evn.JAVA_HOME}"/>
<echo message="GWT_HOEM:${evn.GWT_HOME}"/>
<echo message="GXT_HOEM:${evn.GXT_HOME}"/>
<echo message="BUILD_SERVER:${evn.BUILD_SERVER}"/>
<target name="check-evn-set" unless="evn.JAVA_HOME">
<fail message="JAVA_HOME must be set!" />
</target> 

<!---->
<property file="build.properties" />


<!-- Product name -->
<property name="product.name" value="${product.name}" />

<property name="jar.name" value="${project.perfix}-${product.name}" />
<property name="war.name" value="${project.perfix}-${product.name}" />

<!-- What version are we building -->
<property name="product.version" value="${product.version}" />
<property name="user.name" value="${user.name}" />
<property name="company.name" value="${company.name}" />


<!--
     The directories where all the source information is located
     that is used to populate the target directory.
    -->
<property name="sourceDir" location="." />

<property name="javaSrcDir" location="${sourceDir}/main/java" />
<property name="javaResource" location="${sourceDir}/main/resource" />

<property name="testSrcDir" location="${sourceDir}/test/java" />
<property name="testResource" location="${sourceDir}/test/resource" />

<property name="exampleSrcDir" location="${sourceDir}/example/java" />
<property name="exampleResource" location="${sourceDir}/example/resource" />

<property name="webroot" location="${sourceDir}/war" />

<!--
     The directory where all the intermediate stuff ends up.
     The target directory should contain all of the content that
     other dependent build might need.
    -->
<property name="targetDir" location="${sourceDir}/target" />
<property name="targetTmp" location="${targetDir}/" />

<property name="targetClasses" location="${webroot}/WEB-INF/classes" />
<property name="targetLib" location="${webroot}/WEB-INF/lib" />

<property name="targetArtifact" location="${targetTmp}/artifact" />
<property name="targetDoc" location="${targetTmp}/javadoc" />

<property name="testClasses" location="${targetTmp}/classes/test" />
<property name="testReport" location="${targetTmp}/report" />

<!-- this property is used by the label target to record 
         module and build information -->
<property name="build.info.dir" location="${targetDir}/${product.name}" /> --------------------编程问答-------------------- <if>
<equals arg1="${evn.BUILD_SERVER}" arg2="true"/>
<then>
<echo message="Set build property for BuildServer Machine"/>
<property name="thirdParty" location="./lib/third" />
<property name="carefxParty" location="./lib/carefx" />
<property name="ruleParty" location="./lib/rule" />
<property name="activexParty" location="./lib/activex" />
<property name="internalParty" location="./lib/internal" />


<property name="thirdParty.include.jar" value="**/*.jar" />   
<property name="carefxParty.include.jar" value="**/*.jar" />
<property name="ruleParty.include.jar" value="**/*.jar" />
<property name="activexParty.include.jar" value="**/*.jar" />
<property name="internalParty.include.jar" value="**/*.jar" />

</then>
<else>
<echo message="Set build property for Dev Machine"/>
<property name="thirdParty" location="../Jar/third" />
<property name="carefxParty" location="../Jar/carefx" />
<property name="ruleParty" location="../Jar/rule" />
<property name="activexParty" location="../Jar/activex" />
<property name="internalParty" location="../Deploy" />    
</else>
</if>
<mkdir dir="${thirdParty}"/>
<mkdir dir="${carefxParty}"/>
<mkdir dir="${ruleParty}"/>
<mkdir dir="${activexParty}"/>
<mkdir dir="${internalParty}"/>


<!-- Configure path to GWT SDK -->
<property name="project.name" value="${product.name}" />
<!--
<property name="gwt.sdk" location="${evn.GWT_HOME}" />
<property name="gxt.sdk" location="${evn.GXT_HOME}" />
-->
<property name="gwt.sdk" location="${gwt.sdk}" />
<property name="gxt.sdk" location="${gxt.sdk}" /> --------------------编程问答-------------------- <path id="compile.libs.path">

<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<!--
<fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
-->
<fileset dir="${thirdParty}" includes="${thirdParty.include.jar}" />
<fileset dir="${carefxParty}" includes="${carefxParty.include.jar}" />
<fileset dir="${ruleParty}" includes="${ruleParty.include.jar}" />
<fileset dir="${activexParty}" includes="${iactivexParty.include.jar}" />
<fileset dir="${internalParty}" includes="${internalParty.src.jar}" />
</path>

<path id="classpath.run">
<path refid="compile.libs.path" />
<pathelement path="${targetClasses}"/>
</path>

    <path id="classpath.test">
        <path refid="compile.libs.path" />
<pathelement path="${testClasses}"/>
    </path>



<!-- The main target.  Causes everything to happen -->
<target name="main" depends="init,clean,copy,compile,jar,doc" />

<target name="dev" depends="dev.init,dev.build,dev.publish" />
<target name="dev.init" depends="init" />
<target name="dev.build" depends="clean,copy,compile,gwtc,jar,doc,war" />
<target name="dev.publish" depends="deploy" />


<target name="bs" depends="bs.init,bs.build,bs.publish" />
<target name="bs.init" depends="init" />
<target name="bs.build" depends="clean,copy,compile,gwtc,jar,doc,war" />
<!-- build in server needn't deploy target  -->
<target name="bs.publish" depends="" />
补充:Java ,  Java相关
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,