Ant build 打包失败,BUILD FAILED
新手构建失败,绝对目录下面src目录肯定是有的。是不是配置,用的eclipse(Version:LunaServiceRelease2(4.4.2))自带的Ant。con...
新手
构建失败,绝对目录下面src目录肯定是有的。是不是配置,用的eclipse(Version: Luna Service Release 2 (4.4.2))自带的Ant。
console提示信息:
------------------------------
Buildfile: F:\EclipseWorkspace\ListContrl\build.xml
init:
compile:
BUILD FAILED
F:\EclipseWorkspace\ListContrl\build.xml:31: srcdir "F:\EclipseWorkspace\ListContrl\${src}" does not exist!
Total time: 476 milliseconds
end-----------------
我的Demo:
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project
name="antTestDemo"
basedir="."
default="run" >
<property
name="scr"
value="src" />
<property
name="dest"
value="classes" />
<property
name="test_jar"
value="test.jar" />
<target name="init" >
<mkdir dir="${dest}" />
</target>
<target
name="compile"
depends="init" >
<javac
destdir="${dest}"
includeantruntime="on"
srcdir="${src}" />
</target>
<target
name="build"
depends="compile" >
<jar
destdir="${dest}"
jarfile="${test_jar}" />
</target>
<target
name="run"
depends="build" >
<java
classname="com.chris.listcontrl"
classpath="${test_jar}" />
</target>
<target name="clean" >
<delete dir="${dest}" />
<delete file="${test_jar}" />
</target>
<target
name="rerun"
depends="run,clean" >
<ant target="run" />
<ant target="clean" />
</target>
</project>
end--- 展开
构建失败,绝对目录下面src目录肯定是有的。是不是配置,用的eclipse(Version: Luna Service Release 2 (4.4.2))自带的Ant。
console提示信息:
------------------------------
Buildfile: F:\EclipseWorkspace\ListContrl\build.xml
init:
compile:
BUILD FAILED
F:\EclipseWorkspace\ListContrl\build.xml:31: srcdir "F:\EclipseWorkspace\ListContrl\${src}" does not exist!
Total time: 476 milliseconds
end-----------------
我的Demo:
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project
name="antTestDemo"
basedir="."
default="run" >
<property
name="scr"
value="src" />
<property
name="dest"
value="classes" />
<property
name="test_jar"
value="test.jar" />
<target name="init" >
<mkdir dir="${dest}" />
</target>
<target
name="compile"
depends="init" >
<javac
destdir="${dest}"
includeantruntime="on"
srcdir="${src}" />
</target>
<target
name="build"
depends="compile" >
<jar
destdir="${dest}"
jarfile="${test_jar}" />
</target>
<target
name="run"
depends="build" >
<java
classname="com.chris.listcontrl"
classpath="${test_jar}" />
</target>
<target name="clean" >
<delete dir="${dest}" />
<delete file="${test_jar}" />
</target>
<target
name="rerun"
depends="run,clean" >
<ant target="run" />
<ant target="clean" />
</target>
</project>
end--- 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询