Permalink
Browse files

create an 'eclipse' target for ant.

This target will create a .classpath file which tells eclipse where all
the source/jar dependencies are. If you run 'ant eclipse' or use eclipse
to run the 'eclipse' target, then refresh your project, you will be all
set up.
Add a description to the 'coverage' ant target
  • Loading branch information...
1 parent 55ff0a5 commit 34397dd0d21294f44e50a2724ee7c8b3d40ef0f7 @rolfl rolfl committed Aug 3, 2011
Showing with 29 additions and 3 deletions.
  1. +29 −3 build.xml
View
@@ -82,6 +82,8 @@ For instructions on how to build JDOM, please view the README.txt file.
<property name="package.dir" value="./package"/>
+ <property name="coverage.out" value="${build}/coverage" />
+
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
@@ -343,12 +345,36 @@ For instructions on how to build JDOM, please view the README.txt file.
</junit>
</target>
- <target name="coverage" depends="coverage.setup, junit">
- <mkdir dir="${build}/coverage" />
- <cobertura-report srcdir="${core.build}" destdir="${build}/coverage" datafile="${cobertura.datafile}"/>
+ <target name="coverage" depends="coverage.setup, junit"
+ description="Run the code coverage tool.">
+ <mkdir dir="${coverage.out}" />
+ <cobertura-report srcdir="${core.build}" destdir="${coverage.out}" datafile="${cobertura.datafile}"/>
+ <echo message="See ${coverage.out}/index.html for results." />
</target>
+ <target name="eclipse" description="Set up your eclipse project (source folders, jars, etc.)">
+ <echo file="./.classpath" xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="core/src/java"/>
+ <classpathentry kind="src" path="core/package"/>
+ <classpathentry kind="src" path="core/samples"/>
+ <classpathentry kind="src" path="test/src/java"/>
+ <classpathentry kind="src" path="test/resources"/>
+ <classpathentry kind="src" path="contrib/src/java" excluding="org/jdom/contrib/ids/doc-files/|org/jdom/contrib/input/scanner/doc-files/|org/jdom2/contrib/ids/doc-files/|org/jdom2/contrib/ids/doc-files/|org/jdom2/contrib/input/scanner/doc-files/|org/jdom2/contrib/input/scanner/doc-files/|org/jdom2/contrib/schema/"/>
+ <classpathentry kind="src" path="contrib/samples"/>
+ <classpathentry kind="src" path="contrib/src/java/org/jdom2/contrib/ids/doc-files"/>
+ <classpathentry kind="src" path="contrib/src/java/org/jdom2/contrib/input/scanner/doc-files"/>
+ <classpathentry kind="lib" path="lib/junit-4.8.2.jar"/>
+ <classpathentry kind="lib" path="lib/xercesImpl.jar"/>
+ <classpathentry kind="lib" path="lib/jaxen-1.1.3.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="ebuild"/>
+</classpath>
+]]>
+ </echo>
+ </target>
+
</project>
<!-- End of file -->

0 comments on commit 34397dd

Please sign in to comment.