java - Ant doesn't build second jar -
i have intellij project trying create 2 jars. have setup buildfile , run build artifacts. however, first jar comes up. try more information ran command line command: ant -buildfile buildfile.xml
in result following:
artifact.jar1:jar:
[mkdir] created dir: ~/projects/proj1/__artifacts_temp/jar1_jar
[jar] building jar: ~/projects/proj1/__artifacts_temp/jar1.jar
[copy] copying 1 file ~/projects/proj1/__artifacts_temp/jar1_jar
artifact.jar2:jar:
[mkdir] created dir: ~/projects/proj1/__artifacts_temp/jar2_jar
[jar] building jar: ~/projects/proj1/__artifacts_temp/1/jar2.jar
[copy] copying 1 file ~/projects/proj1/__artifacts_temp/jar2_jar
so looks both jars created. however... next output more discouraging.
build.all.artifacts:
[copy] copying 1 file ~/projects/proj1
[delete] deleting directory ~/projects/proj1/__artifacts_temp
i have absolutely no idea why copy 1 of jars back. thoughts or ideas on how more information appreciated.
edit: here build.all.artifacts section of build script looks like
<target name="build.all.artifacts" depends="artifact.jar1:jar, artifact.jar2:jar" description="build artifacts"> <mkdir dir="${artifact.output.jar1:jar}"/> <copy todir="${artifact.output.jar1:jar}"> <fileset dir="${artifact.temp.output.jar1:jar}"/> </copy> <mkdir dir="${artifact.output.jar2:jar}"/> <copy todir="${artifact.output.jar2:jar}"> <fileset dir="${artifact.temp.output.jar2:jar}"/> </copy> <!-- delete temporary files --> <delete dir="${artifacts.temp.dir}"/> </target>
check buildfile.xml, there should <copy> task first jar , not second.
update: try using <fileset dir="${artifact.temp.output.jar2:jar}" erroronmissingdir="true"/>
see if there's wrong path. try print paths check if correct:
<echo>${artifact.output.jar2:jar}</echo> <echo>${artifact.temp.output.jar2:jar}</echo>
Comments
Post a Comment