Skip to content
Browse files

add Ant build file for building and signing editize.jar

  • Loading branch information...
1 parent a9069f4 commit f318cf7f2bd60f8c3af4d94ba746e8986b097deb @sentience sentience committed
Showing with 104 additions and 0 deletions.
  1. +104 −0 build.xml
View
104 build.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="editize" default="all">
+
+ <!-- Compiler options -->
+ <property name="compiler.debug" value="off"/>
+ <property name="compiler.generate.no.warnings" value="off"/>
+ <property name="compiler.args" value=""/>
+ <property name="compiler.max.memory" value="128m"/>
+ <patternset id="ignored.files">
+ <exclude name="**/CVS/**"/>
+ <exclude name="**/SCCS/**"/>
+ <exclude name="**/RCS/**"/>
+ <exclude name="**/rcs/**"/>
+ <exclude name="**/.DS_Store/**"/>
+ <exclude name="**/.svn/**"/>
+ <exclude name="**/.git/**"/>
+ <exclude name="**/vssver.scc/**"/>
+ <exclude name="**/vssver2.scc/**"/>
+ </patternset>
+ <patternset id="compiler.resources">
+ <include name="**/?*.properties"/>
+ <include name="**/?*.xml"/>
+ <include name="**/?*.gif"/>
+ <include name="**/?*.jpeg"/>
+ <include name="**/?*.jpg"/>
+ <include name="**/?*.html"/>
+ <include name="**/?*.dtd"/>
+ <include name="**/?*.tld"/>
+ <include name="**/?*.key"/>
+ </patternset>
+
+ <!-- Project Libraries -->
+ <path id="library.kunststoff.classpath">
+ <pathelement location="${basedir}/lib/kunststoff.jar"/>
+ </path>
+
+ <!-- Module Editize -->
+ <property name="module.editize.basedir" value="${basedir}"/>
+
+ <property name="compiler.args.editize" value="${compiler.args}"/>
+ <property name="editize.output.dir" value="${module.editize.basedir}/classes/production/Editize"/>
+
+ <path id="editize.module.classpath">
+ <path refid="library.kunststoff.classpath"/>
+ </path>
+
+ <patternset id="excluded.from.module.editize">
+ <patternset refid="ignored.files"/>
+ </patternset>
+
+ <patternset id="excluded.from.compilation.editize">
+ <patternset refid="excluded.from.module.editize"/>
+ </patternset>
+
+ <path id="editize.module.sourcepath">
+ <dirset dir="${module.editize.basedir}">
+ <include name="src"/>
+ </dirset>
+ </path>
+
+ <target name="compile.module.editize" description="Compile module Editize">
+ <mkdir dir="${editize.output.dir}"/>
+ <javac destdir="${editize.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" target="1.3" source="1.3">
+ <compilerarg line="${compiler.args.editize}"/>
+ <classpath refid="editize.module.classpath"/>
+ <src refid="editize.module.sourcepath"/>
+ <patternset refid="excluded.from.compilation.editize"/>
+ </javac>
+
+ <copy todir="${editize.output.dir}">
+ <fileset dir="${module.editize.basedir}/src">
+ <patternset refid="compiler.resources"/>
+ <type type="file"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="jar.module.editize" depends="compile.module.editize" description="Package Editize for distribution">
+ <jar jarfile="editize.jar" basedir="${editize.output.dir}" manifest="MANIFEST.MF"/>
+ <copy file="lib/kunststoff.jar" todir="${module.editize.basedir}"/>
+ </target>
+
+ <target name="jarsign.module.editize" depends="jar.module.editize" description="Sign JAR file for distribution">
+ <!-- In order for a Java applet like Editize to access the system clipboard, you must sign the JAR file that contains it with a trusted code signing certificate. You can purchase such a certificate from Thawte and other online retailers. Once you have added your certificate to your Java keystore, uncomment the following tag and fill in its alias and your keystore passphrase. -->
+ <!--signjar jar="editize.jar" alias="******" storepass="******"/-->
+ </target>
+
+ <target name="clean.module.editize" description="cleanup module">
+ <delete dir="${editize.output.dir}"/>
+ <delete file="${module.editize.basedir}/editize.jar"/>
+ <delete file="${module.editize.basedir}/kunststoff.jar"/>
+ <delete file="${module.editize.basedir}/editize_dist.jar"/>
+ </target>
+
+ <target name="init" description="Build initialization"/>
+
+ <target name="clean" depends="clean.module.editize" description="cleanup all"/>
+
+ <target name="all" depends="init, clean, jarsign.module.editize" description="build all"/>
+
+ <target name="run" depends="all">
+ <java jar="${module.editize.basedir}/editize.jar"></java>
+ </target>
+</project>

0 comments on commit f318cf7

Please sign in to comment.
Something went wrong with that request. Please try again.