Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit eca77a3

Browse files
committed
build distribution ZIP
1 parent a5523f1 commit eca77a3

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

build.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
<property name="testSrcDir" location="src/test/java"/>
1919
<property name="testClassesDir" location="target/test-classes"/>
2020
<property name="testReportsDir" location="target/test-reports"/>
21+
<property name="distribZipFile" location="target/base64coder.zip"/>
2122
<property name="jUnitVersionToDownload" value="4.7"/>
2223

23-
<target name="buildAll" description="Compiles and generates the API docs."
24+
<target name="buildAll" description="Compiles, builds the JAR and generates the API docs."
2425
depends="buildJar, javaDoc"/>
2526

26-
<target name="buildJar" description="Compiles the Java source and builds the JAR file.">
27+
<target name="buildJar" description="Compiles the main Java sources and builds the JAR file.">
2728
<delete dir="${classesDir}" failonerror="true"/>
2829
<mkdir dir="${classesDir}"/>
2930
<javac srcdir="${srcDir}" deprecation="true" includeAntRuntime="false" debug="true" debuglevel="lines,source"
@@ -66,8 +67,7 @@
6667
<delete dir="${javaDocDir}" failonerror="true"/>
6768
</target>
6869

69-
<target name="test" description="Runs the JUnit tests."
70-
depends="compileTest, getJUnitJar">
70+
<target name="test" description="Runs the JUnit tests." depends="compileTest, getJUnitJar">
7171
<delete dir="${testReportsDir}" failonerror="true"/>
7272
<mkdir dir="${testReportsDir}"/>
7373
<junit haltonfailure="true">
@@ -93,4 +93,27 @@
9393
</condition>
9494
</target>
9595

96+
<target name="buildDistribZip" description="Builds the distribution ZIP file." depends="buildAll">
97+
<delete file="${distribZipFile}"/>
98+
<zip destfile="${distribZipFile}">
99+
<zipfileset dir="." includes="build.xml, CHANGES.txt, README.txt, src/, target/base64coder.jar, target/Base64Coder.html"/>
100+
</zip>
101+
</target>
102+
103+
<target name="updateWebsite" depends="buildAll, buildDistribZip">
104+
<property name="websiteDir" location="${env.base64CoderJavaWebsiteDir}"/>
105+
<copy todir="${websiteDir}" overwrite="true">
106+
<fileset dir="src" includes="**/*.java"/>
107+
<fileset dir="target" includes="Base64Coder.html, base64coder.jar"/>
108+
<fileset file="${distribZipFile}"/>
109+
<chainedmapper>
110+
<flattenmapper/>
111+
<mapper>
112+
<globmapper from="*.java" to="*.java.txt"/>
113+
<identitymapper/>
114+
</mapper>
115+
</chainedmapper>
116+
</copy>
117+
</target>
118+
96119
</project>

0 commit comments

Comments
 (0)