thufir

build impl

Sep 4th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-ja$
  2. <j2seproject1:jar manifest="${manifest.file}"/>
  3. </target>
  4. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" n$
  5. <j2seproject1:jar manifest="${manifest.file}">
  6. <j2seproject1:manifest>
  7. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  8. </j2seproject1:manifest>
  9. </j2seproject1:jar>
  10. <echo level="info">To run this application from the command line without Ant, try:</echo>
  11. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  12. <property location="${dist.jar}" name="dist.jar.resolved"/>
  13. <pathconvert property="run.classpath.with.dist.jar">
  14. <path path="${run.classpath}"/>
  15. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  16. </pathconvert>
  17. <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  18. </target>
  19. <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifes$
  20. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  21. <touch file="${tmp.manifest.file}" verbose="false"/>
  22. </target>
  23. <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest$
  24. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  25. <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
  26. </target>
  27. <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" i$
  28. <manifest file="${tmp.manifest.file}" mode="update">
  29. <attribute name="Main-Class" value="${main.class}"/>
  30. </manifest>
  31. </target>
Advertisement
Add Comment
Please, Sign In to add comment