| <?xml version="1.0"?> |
| |
| <!-- |
| This file is intended for ANT, a Java based build tool. |
| ANT is availale from http://jakarta.apache.org/ant/index.html |
| |
| This build file is intended to build the org.apache.xml.security package, |
| available from http://www.xmlsecurity.org/src/ and |
| http://xml.apache.org/ |
| |
| http://xml.apache.org/dist/xerces-j/old_xerces2/Xerces-J-bin.2.0.1.zip |
| xercesImpl.jar |
| xmlParserAPIs.jar |
| |
| http://xml.apache.org/dist/xalan-j/xalan-j_2_3_1-bin.zip |
| xalan.jar |
| xml-apis.jar |
| |
| http://jakarta.apache.org/log4j/jakarta-log4j-1.2.5.zip |
| log4j-1.2.5.jar |
| |
| http://www.bouncycastle.org/download/jce-jdk13-114.jar |
| |
| http://download.sourceforge.net/junit/junit3.7.zip |
| junit3.7.jar |
| --> |
| |
| <project name="The org.apache.xml.security Package" default="usage" basedir="."> |
| <target name="init"> |
| <property name='product.Name' value='Apache-XML-Security-J'/> |
| <property name='product.name' value='xml-security'/> |
| <property name='product.shortname' value='xmlsec'/> |
| |
| <property name='product.version.major' value='1'/> |
| <property name='product.version.minor' value='0'/> |
| <property name='product.version.level' value='4'/> |
| <property name='product.Version' value='${product.version.major}.${product.version.minor}.${product.version.level}'/> |
| <property name='product.version' value='${product.version.major}.${product.version.minor}.${product.version.level}'/> |
| <property name='product_version' value='${product.version.major}_${product.version.minor}_${product.version.level}'/> |
| <property name="year" value="2000-2002" /> |
| <property name="copyright" value="Copyright © ${year} Apache XML Project. All Rights Reserved." /> |
| |
| <!--<property name="build.compiler" value="classic" /> |
| <property name="build.compiler" value="jikes" />--> |
| |
| <!-- <property name="build.compiler" value="classic" /> --> |
| |
| <property name="dir.src" value="./src" /> |
| <property name="dir.src.samples" value="./src_samples" /> |
| <property name="dir.src.unitTests" value="./src_unitTests" /> |
| <property name="dir.tools" value="./tools" /> |
| <property name="dir.data" value="./data" /> |
| <property name="dir.libs" value="./libs" /> |
| <property name="dir.doc" value="./doc" /> |
| |
| <property name="build.dir" value="./build" /> |
| <property name="build.src" value="${build.dir}/src" /> |
| <property name="build.classes" value="${build.dir}/classes" /> |
| <property name="build.samples" value="${build.dir}/samples" /> |
| <property name="build.tests" value="${build.dir}/tests" /> |
| <property name="build.data" value="${build.dir}/data" /> |
| <property name="build.doc" value="${build.dir}/doc" /> |
| <property name="build.doc.xml" value="${build.doc}/xml" /> |
| <property name="build.doc.html" value="${build.doc}/html" /> |
| <property name="build.javadoc" value="${build.doc.html}/api" /> |
| <property name="build.srcdist" value="${build.dir}/${product.name}_${product_version}_src" /> |
| <property name="build.bindist" value="${build.dir}/${product.name}_${product_version}_bin" /> |
| |
| <property name="jar.library" value="${product.shortname}.jar" /> |
| <property name="jar.samples" value="${product.shortname}Samples.jar" /> |
| <property name="jar.tests" value="${product.shortname}Tests.jar" /> |
| |
| <property name="cvs.server" value="cvs.apache.org" /> |
| <property name="cvs.path" value="/home/cvs" /> |
| <property name="cvs.package" value="xml-security" /> |
| |
| <property name="cvs.user.developer" value="geuerp" /> |
| <property name="cvs.user.anonymous" value="anonymous" /> |
| <property name="cvs.cvsRoot.developer" value=":ext:${cvs.user.developer}@${cvs.server}:${cvs.path}" /> |
| <property name="cvs.cvsRoot.anonymous" value=":pserver:${cvs.user.anonymous}@${cvs.server}:${cvs.path}" /> |
| |
| <property name="doc.xml" value="${dir.doc}/xml" /> |
| <property name="doc.book" value="${build.doc.xml}/docs-book.xml" /> |
| <property name="doc.style" value="${build.doc.xml}/style-apachexml" /> |
| <property name="doc.style.jar" value="${dir.tools}/style-apachexml.jar" /> |
| <property name="doc.generator" value="org.apache.stylebook.StyleBook" /> |
| <property name="doc.generator.package" value="${dir.tools}/stylebook-1.0-b2.jar" /> |
| |
| <!-- http://www.bouncycastle.org/checksums.html --> |
| <!-- |
| <property name="jce.download.md5" value="eeb940217876bcd83a55d799ee5db7ca" /> |
| <property name="jce.download.sha1" value="106e97a5ad7a57aa2cbc48074db80225d3c0972a" /> |
| <property name="jce.download.file" value="jce-jdk13-112.jar" /> |
| --> |
| |
| <property name="jce.download.md5" value="8a90f10826c0b8a4460231dcef0e0e45" /> |
| <property name="jce.download.sha1" value="f3cf2677ad8fa7a038ab3a62e05afef9615ea579" /> |
| <property name="jce.download.file" value="jce-jdk13-114.jar" /> |
| |
| <property name="jce.download" value="http://www.bouncycastle.org/download/${jce.download.file}" /> |
| <property name="lib.jce" value="${dir.libs}/bc-${jce.download.file}" /> |
| |
| <!-- http://download.sourceforge.net/junit/junit3.7.zip --> |
| <property name="lib.junit" value="${dir.libs}/junit3.7.jar" /> |
| |
| <property name="lib.xerces.1" value="${dir.libs}/xercesImpl.jar" /> |
| <property name="lib.xerces.2" value="${dir.libs}/xmlParserAPIs.jar" /> |
| <property name="lib.xalan.1" value="${dir.libs}/xalan.jar" /> |
| <property name="lib.xalan.2" value="${dir.libs}/xml-apis.jar" /> |
| <property name="lib.log4j" value="${dir.libs}/log4j-1.2.5.jar" /> |
| |
| <path id="classpath.libraries" description="3rd party libs"> |
| <pathelement path="${lib.xerces.1}" /> |
| <pathelement path="${lib.xerces.2}" /> |
| <pathelement path="${lib.xalan.1}" /> |
| <pathelement path="${lib.xalan.2}" /> |
| <pathelement path="${lib.log4j}" /> |
| <pathelement path="${lib.jce}" /> |
| </path> |
| |
| <path id="classpath.xmlsec" description="xmlsec classes; first try pure class files, then jars"> |
| <pathelement path="${build.classes}" /> |
| |
| <pathelement path="${build.dir}/${jar.library}" /> |
| <pathelement path="${build.dir}/${jar.tests}" /> |
| <pathelement path="${build.dir}/${jar.samples}" /> |
| </path> |
| |
| <path id="classpath.library"> |
| <path refid="classpath.xmlsec" /> |
| <path refid="classpath.libraries" /> |
| </path> |
| |
| <path id="classpath.test"> |
| <!-- classpath for test is librarypath plus junit --> |
| <path refid="classpath.library" /> |
| <pathelement path="${lib.junit}" /> |
| </path> |
| |
| <path id="classpath.test.jar"> |
| <!-- classpath for test is librarypath plus junit --> |
| <path refid="classpath.library" /> |
| <pathelement path="${build.dir}/${jar.library}" /> |
| <pathelement path="${build.dir}/${jar.tests}" /> |
| </path> |
| |
| <patternset id="distFiles"> |
| <include name="build.xml" /> |
| <include name="INSTALL" /> |
| <include name="keys.asc" /> |
| <include name="LICENSE.txt" /> |
| <include name="README" /> |
| <include name="Readme.html" /> |
| <include name="TODO" /> |
| </patternset> |
| |
| <patternset id="dataFiles"> |
| <include name="data/**" /> |
| <exclude name="data/de/uni-siegen/**" /> |
| <exclude name="data/com/ibm/xss4j-20011029/**/*" /> |
| </patternset> |
| |
| <patternset id="srcFiles"> |
| <!-- for some strange reasons, I can't use ${src} but must use src --> |
| <include name="src/**/*" /> |
| <include name="src/org/apache/xml/security/**/*.java" /> |
| <include name="src/org/apache/xml/security/**/*.xml" /> |
| <include name="src/org/apache/xml/security/**/*.html" /> |
| <include name="src/org/apache/xml/security/resource/**/*" /> |
| </patternset> |
| |
| <patternset id="srcSamplesFiles"> |
| <include name="src_samples/org/apache/xml/security/samples/**/*" /> |
| <include name="src_samples/org/apache/xml/security/samples/**/*.html" /> |
| </patternset> |
| |
| <patternset id="srcUnitTestsFiles"> |
| <include name="src_unitTests/org/apache/xml/security/test/**/*" /> |
| <include name="src_unitTests/org/apache/xml/security/test/**/*.html" /> |
| </patternset> |
| |
| <property name="javadoc.packages" |
| value=" |
| org.apache.xml.security.Init, |
| org.apache.xml.security.algorithms.*, |
| org.apache.xml.security.algorithms.encryption.*, |
| org.apache.xml.security.algorithms.encryption.helper.*, |
| org.apache.xml.security.algorithms.encryption.implementations.*, |
| org.apache.xml.security.algorithms.encryption.implementations.BC.*, |
| org.apache.xml.security.algorithms.encryption.params.*, |
| org.apache.xml.security.algorithms.implementations.*, |
| org.apache.xml.security.c14n.*, |
| org.apache.xml.security.c14n.helper.*, |
| org.apache.xml.security.c14n.implementations.*, |
| org.apache.xml.security.encryption.*, |
| org.apache.xml.security.encryption.type.*, |
| org.apache.xml.security.exceptions.*, |
| org.apache.xml.security.keys.*, |
| org.apache.xml.security.keys.content.*, |
| org.apache.xml.security.keys.content.keyvalues.*, |
| org.apache.xml.security.keys.content.x509.*, |
| org.apache.xml.security.keys.keyresolver.*, |
| org.apache.xml.security.keys.keyresolver.implementations.*, |
| org.apache.xml.security.keys.storage.*, |
| org.apache.xml.security.keys.storage.implementations.*, |
| org.apache.xml.security.resource.*, |
| org.apache.xml.security.signature.*, |
| org.apache.xml.security.transforms.*, |
| org.apache.xml.security.transforms.implementations.*, |
| org.apache.xml.security.transforms.params.*, |
| org.apache.xml.security.utils.*, |
| org.apache.xml.security.utils.resolver.*, |
| org.apache.xml.security.utils.resolver.implementations.* |
| " /> |
| |
| <echo message="-------------------------------------------------------------------" /> |
| <echo message="--------- ${product.Name} v${product.Version} [${year}] ----------------" /> |
| <echo message="-------------------------------------------------------------------" /> |
| </target> |
| |
| <target name="usage" depends="init"> |
| <echo message=" " /> |
| <echo message=" " /> |
| <echo message=" Build instructions " /> |
| <echo message="-------------------------------------------------------------------" /> |
| <echo message=" " /> |
| <echo message=" available targets are: " /> |
| <echo message=" " /> |
| <echo message=" compile --> compiles everything " /> |
| <echo message=" compile.library --> compiles the source code " /> |
| <echo message=" compile.samples --> compiles the samples source code " /> |
| <echo message=" compile.tests --> compiles the tests source code " /> |
| <echo message=" " /> |
| <echo message=" doc --> generates the HTML documentation " /> |
| <echo message=" use Readme.html to come to the docu " /> |
| <echo message=" javadoc --> generates the API documentation " /> |
| <echo message=" (needs Java > 1.2) " /> |
| <echo message=" " /> |
| <echo message=" test --> runs the defined JUnit tests " /> |
| <echo message=" testjar --> runs the defined JUnit tests but runs on " /> |
| <echo message=" compiled jar files instead of the class " /> |
| <echo message=" files; this should be used if you have the " /> |
| <echo message=" binary-only distribution " /> |
| <echo message=" " /> |
| <echo message=" clean --> cleans up all generated files and " /> |
| <echo message=" directories " /> |
| <echo message=" jar --> creates the JAR file " /> |
| <echo message=" gump --> includes javadoc, compile jar and test " /> |
| <echo message=" " /> |
| <echo message=" usage --> provides help on using the build tool " /> |
| <echo message=" (default) " /> |
| <echo message=" " /> |
| <echo message=" See comments inside the build.xml file for more details. " /> |
| <echo message="-------------------------------------------------------------------" /> |
| <echo message=" " /> |
| </target> |
| |
| <target name="clean" depends="init" |
| description="Clean up all temporary build files"> |
| <delete dir="${build.dir}" /> |
| <delete dir="./bak" /> |
| <delete file="log.txt" /> |
| </target> |
| |
| <target name="prepare" depends="init" |
| description="This target generates a first build directory and checks for some libraries"> |
| <tstamp /> |
| <mkdir dir="${build.dir}" /> |
| |
| <available property="junit.present" classname="junit.framework.TestCase"> |
| <!-- check whether JUnit is available --> |
| <classpath refid="classpath.test" /> |
| </available> |
| |
| <available property="bcprov.present" |
| classname="org.bouncycastle.jce.provider.BouncyCastleProvider"> |
| <!-- check whether BouncyCastle JCE is available --> |
| <classpath refid="classpath.library" /> |
| </available> |
| |
| <available property="xmlsec.jar.present" |
| file="${jar.library}" /> |
| |
| <available property="xmlsec.build.present" |
| classname="org.apache.xml.security.Init"> |
| <classpath refid="classpath.library" /> |
| </available> |
| </target> |
| |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| |
| <target name="prepare-src" depends="prepare" description="This target copies the Java sources and brands the version information"> |
| <!-- create directories --> |
| <mkdir dir="${build.src}" /> |
| <mkdir dir="${build.classes}" /> |
| <copy file="./LICENSE.txt" |
| tofile="${build.classes}/Apache-${product.shortname}-${product_version}-LICENSE.txt" /> |
| |
| |
| <!-- copy src files --> |
| <copy todir="${build.src}"> |
| <fileset |
| dir="${dir.src}" |
| includes="org/**,ant/**" /> |
| </copy> |
| <copy file="./src/MANIFEST.MF" |
| tofile="${build.classes}/META-INF/MANIFEST.MF" /> |
| <replace file="${build.classes}/META-INF/MANIFEST.MF" |
| token="@@VERSION@@" value="${product.version}" /> |
| |
| <!-- substitute tokens as needed --> |
| <replace file="${build.src}/org/apache/xml/security/utils/Version.java" |
| token="@@VERSION@@" value="${product.Name} ${product.Version}" /> |
| </target> |
| |
| <target name="prepare-doc" depends="prepare" |
| description="This target copies the XML documentation sources and brands the version information"> |
| <!-- create directories --> |
| <mkdir dir="${build.doc}" /> |
| <mkdir dir="${build.doc.xml}" /> |
| <mkdir dir="${build.doc.html}" /> |
| |
| <!-- copy xml files --> |
| <copy todir="${build.doc.xml}"> |
| <fileset dir="${doc.xml}" /> |
| </copy> |
| |
| <!-- substitute tokens as needed --> |
| <replace file="${build.doc.xml}/dtd/entities.ent" |
| token="@@packagenamelong@@" value="${product.Name}" /> |
| <replace file="${build.doc.xml}/dtd/entities.ent" |
| token="@@packagename@@" value="${product.name}" /> |
| <replace file="${build.doc.xml}/dtd/entities.ent" |
| token="@@packageversion@@" value="${product.Version}" /> |
| <replace file="${build.doc.xml}/dtd/entities.ent" |
| token="@@packagedistname@@" value="${product.Name}" /> |
| <replace file="${build.doc.xml}/install.xml" |
| token="@@jce.download@@" value="${jce.download}" /> |
| <replace file="${build.doc.xml}/install.xml" |
| token="@@lib.jce@@" value="${lib.jce}" /> |
| <replace file="${build.doc.xml}/install.xml" |
| token="@@jce.download.file@@" value="${jce.download.file}" /> |
| </target> |
| |
| <target name="javadoc" |
| depends="prepare-src, prepare-doc" |
| description="Generates javadoc from all .java files; this is done on the 'branded' files"> |
| <mkdir dir="${build.doc}" /> |
| <mkdir dir="${build.doc.html}" /> |
| <mkdir dir="${build.javadoc}" /> |
| |
| <javadoc destdir="${build.javadoc}" |
| packagenames="${javadoc.packages}" |
| classpathref="classpath.test"> |
| <sourcepath> |
| <pathelement location="${build.src}" /> |
| <pathelement location="${dir.src.unitTests}" /> |
| <pathelement location="${dir.src.samples}" /> |
| </sourcepath> |
| </javadoc> |
| </target> |
| |
| <target name="doc" depends="prepare-doc"> |
| <unjar src="${doc.style.jar}" dest="${doc.style}" /> |
| |
| <path id="classpath.doc"> |
| <pathelement path="${doc.generator.package}" /> |
| <pathelement path="${dir.tools}/xerces.jar" /> |
| <pathelement path="${dir.tools}/xalan.jar" /> |
| <pathelement path="${dir.tools}/optional.jar" /> |
| </path> |
| |
| <java fork="yes" |
| classname="${doc.generator}"> |
| <arg value="targetDirectory=${build.doc.html}" /> |
| <arg value="${doc.book}" /> |
| <arg value="${doc.style}" /> |
| <classpath refid="classpath.doc" /> |
| </java> |
| |
| <copy todir="${build.doc.html}"> |
| <fileset |
| dir="${doc.xml}" |
| includes="**/*.txt" /> |
| </copy> |
| |
| <delete dir="${doc.style}" /> |
| </target> |
| |
| <target name="javadoc-pdf" |
| description="Generates javadoc in Adobe (c) MakerInterchangeFormat (.mif) from all .java files; for Adobe FrameMaker"> |
| <property name="lib.doclet.mif" value="${dir.tools}/mifdoclet.jar" /> |
| <path id="classpath.doclet.mif"> |
| <path refid="classpath.library" /> |
| <pathelement path="${lib.doclet.mif}" /> |
| </path> |
| |
| <mkdir dir="${doc.pdf}" /> |
| <javadoc sourcepath="${dir.src}" |
| destdir="${doc.pdf}" |
| packagenames="${javadoc.packages}" |
| doclet="com.sun.tools.doclets.mif.MIFDoclet" |
| docletpath="${lib.doclet.mif}" |
| additionalparam="-book data/websigMiflet.xml -batch dzbatcher -print pdf" |
| classpathref="classpath.doclet.mif" /> |
| </target> |
| |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| |
| <!-- Aliases --> |
| <target name="javadocs" depends="javadoc" /> |
| <target name="docs" depends="doc" /> |
| <target name="jars" depends="jar" /> |
| <target name="distbin" depends="bindist" /> |
| <target name="distsrc" depends="srcdist" /> |
| |
| <!-- Collections --> |
| <target name="dist" depends="srcdist,bindist" /> |
| <target name="gump" depends="clean,javadoc,jar,test" description="Target for the gump run" /> |
| <target name="compile" depends="compile.library, compile.samples, compile.tests" description="compile everything" /> |
| |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| |
| |
| <target name="get-jce" |
| depends="prepare" |
| unless="bcprov.present"> |
| <get src="${jce.download}" |
| dest="${lib.jce}" |
| verbose="true" |
| usetimestamp="true" /> |
| </target> |
| |
| <taskdef name="md5" classname="ant.Md5Task"/> |
| <target name="check-bc" depends="get-jce" description="This target checks that the digest values of the JCE library are valid"> |
| <md5 Md5="${jce.download.md5}" Sha1="${jce.download.sha1}" file="${lib.jce}" /> |
| <!-- when ant 1.5 becomes widely available, maybe the core task "checksum" can make this easier --> |
| <!-- |
| <checksum file="${lib.jce}" property="${jce.download.md5}" algorithm="md5" verifyProperty="md5OK" /> |
| <checksum file="${lib.jce}" property="${jce.download.sha1}" algorithm="sha" verifyProperty="sha1OK" /> |
| --> |
| </target> |
| |
| <target name="compile.library" depends="prepare-src, check-bc"> |
| <!-- Compile the branded java code from ${build.src} into ${build.classes} --> |
| <javac srcdir="${build.src}" destdir="${build.classes}"> |
| <classpath refid="classpath.library" /> |
| </javac> |
| <!-- Copy Property files --> |
| <copy todir="${build.classes}" > |
| <fileset dir="${build.src}" includes="**/*.properties" /> |
| <fileset dir="${build.src}" includes="**/*.xml" /> |
| <fileset dir="${build.src}" includes="**/*.zip" /> |
| </copy> |
| </target> |
| |
| <target name="compile.tests" |
| depends="compile.library" |
| if="junit.present"> |
| <!-- Compile the java code from ${dir.src} into ${build.classes} --> |
| <javac srcdir="${dir.src.unitTests}" destdir="${build.classes}"> |
| <classpath refid="classpath.test" /> |
| </javac> |
| <!-- Copy Property files --> |
| <copy todir="${build.classes}" > |
| <fileset dir="${dir.src.unitTests}" includes="**/*.properties" /> |
| <fileset dir="${dir.src.unitTests}" includes="**/*.xml" /> |
| <fileset dir="${dir.src.unitTests}" includes="**/*.zip" /> |
| </copy> |
| </target> |
| |
| <target name="compile.samples" |
| depends="compile.library"> |
| <!-- Compile the java code from ${dir.src} into ${build.classes} --> |
| <javac srcdir="${dir.src.samples}" |
| destdir="${build.classes}"> |
| <classpath refid="classpath.library" /> |
| </javac> |
| </target> |
| |
| <target name="test" |
| depends="compile.tests" |
| if="junit.present" |
| description="Starts all JUnit test cases"> |
| <!-- <java classname="junit.textui.TestRunner" |
| fork="yes" |
| taskname="junit" |
| failonerror="true"> |
| <arg value="org.apache.xml.security.test.AllTests" /> |
| <classpath refid="classpath.test" /> |
| </java> --> |
| <java classname="org.apache.xml.security.test.AllTests" |
| fork="yes" |
| taskname="junit" |
| failonerror="true"> |
| <classpath refid="classpath.test" /> |
| </java> |
| </target> |
| |
| <target name="testjar" |
| depends="prepare,check-bc" |
| if="xmlsec.build.present" |
| description="Starts all JUnit test cases and uses the compiled JARs"> |
| <java classname="junit.textui.TestRunner" |
| fork="yes" |
| taskname="junit" |
| failonerror="true"> |
| <arg value="org.apache.xml.security.test.AllTests" /> |
| <classpath refid="classpath.test" /> |
| </java> |
| </target> |
| |
| <target name="jar" |
| depends="compile" |
| description="Creates the ${jar.library}, ${jar.samples} and ${jar.samples} JAR file in ${build.dir}"> |
| <jar jarfile="${build.dir}/${jar.library}" |
| basedir="${build.classes}" |
| includes="org/apache/**, *.txt" |
| excludes="org/apache/xml/security/temp/**, org/apache/xml/security/samples/**, org/apache/xml/security/test/**" |
| manifest="${build.classes}/META-INF/MANIFEST.MF" /> |
| <jar jarfile="${build.dir}/${jar.samples}" |
| basedir="${build.classes}" |
| includes="org/apache/xml/security/samples/**" |
| excludes="org/apache/xml/security/temp/**" |
| manifest="${build.classes}/META-INF/MANIFEST.MF" /> |
| <jar jarfile="${build.dir}/${jar.tests}" |
| basedir="${build.classes}" |
| includes="org/apache/xml/security/test/**" |
| excludes="org/apache/xml/security/temp/**" |
| manifest="${build.classes}/META-INF/MANIFEST.MF" /> |
| <!-- compress="false" --> |
| </target> |
| |
| <target name="srcdist" depends="prepare" description="Creates the source distribution"> |
| <mkdir dir="${build.srcdist}" /> |
| |
| <copy todir="${build.srcdist}"> |
| <fileset dir="."> |
| <patternset refid="distFiles" /> |
| <patternset refid="srcFiles" /> |
| <patternset refid="srcUnitTestsFiles" /> |
| <patternset refid="srcSamplesFiles" /> |
| <patternset refid="dataFiles" /> |
| |
| <include name="doc/xml/**/*" /> |
| <include name="ant/**/*" /> |
| <exclude name="**/CVS/**" /> |
| </fileset> |
| </copy> |
| |
| <mkdir dir="${build.srcdist}/libs" |
| description="create an empty libs so that people know where to put the 3rd party jars"/> |
| |
| <zip zipfile="${build.dir}/${product.name}-src-${product_version}.zip" |
| basedir="${build.srcdist}" /> |
| </target> |
| |
| <target name="bindist" depends="compile,jar,doc,javadoc" description="Creates the binary distribution"> |
| <mkdir dir="${build.bindist}" /> |
| <copy todir="${build.bindist}"> |
| <fileset dir="."> |
| <patternset refid="distFiles" /> |
| <patternset refid="dataFiles" /> |
| <patternset refid="srcSamplesFiles" /> |
| |
| <include name="ant/**/*" /> |
| <exclude name="**/CVS/**" /> |
| </fileset> |
| </copy> |
| |
| <mkdir dir="${build.bindist}/${dir.libs}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.junit}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.xerces.1}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.xerces.2}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.xalan.1}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.xalan.2}" /> |
| <copy todir="${build.bindist}/${dir.libs}" file="${lib.log4j}" /> |
| |
| <mkdir dir="${build.bindist}/${build.dir}" /> |
| <copy todir="${build.bindist}/${build.dir}" file="${build.dir}/${jar.library}" description="copy xmlsec JARs from ./build to ./build/${build.bindist}/build/" /> |
| <copy todir="${build.bindist}/${build.dir}" file="${build.dir}/${jar.samples}" description="copy xmlsec JARs from ./build to ./build/${build.bindist}/build/" /> |
| <copy todir="${build.bindist}/${build.dir}" file="${build.dir}/${jar.tests}" description="copy xmlsec JARs from ./build to ./build/${build.bindist}/build/" /> |
| |
| <mkdir dir="${build.bindist}/${build.doc}" /> |
| <mkdir dir="${build.bindist}/${build.doc.html}" /> |
| <copy todir="${build.bindist}/${build.doc.html}"> |
| <fileset dir="${build.doc.html}" /> |
| </copy> |
| |
| <zip zipfile="${build.dir}/${product.name}-bin-${product_version}.zip" |
| basedir="${build.bindist}" /> |
| </target> |
| |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| <!-- #################################################################### --> |
| |
| <target name="generate-keys"> |
| <genkey alias="test2" |
| keyalg="DSA" |
| keypass="xmlsecurity" |
| storepass="xmlsecurity" |
| keystore="data/keystoreAnt.jks" |
| validity="2000" > |
| <dname> |
| <param name="CN" value="Christian Geuer-Pollmann" /> |
| <param name="OU" value="FB12NUE" /> |
| <param name="O" value="University of Siegen" /> |
| <param name="C" value="DE" /> |
| </dname> |
| </genkey> |
| </target> |
| |
| <target name="sign" |
| description="creates a signature" |
| depends="compile"> |
| <delete file="signature.xml" /> |
| <java classname="org.apache.xml.security.samples.signature.CreateSignature" |
| fork="yes" |
| taskname="CreateSignature" |
| failonerror="true"> |
| <classpath refid="classpath.test" /> |
| </java> |
| </target> |
| |
| <target name="verify" |
| description="verifies a signature" |
| depends="compile"> |
| <java classname="org.apache.xml.security.samples.signature.VerifySignature" |
| fork="yes" |
| taskname="VerifySignature" |
| failonerror="true"> |
| <classpath refid="classpath.test" /> |
| </java> |
| </target> |
| |
| <target name="signAndVerify" |
| description="creates and verifies a signature" |
| depends="sign, verify" /> |
| |
| <target name="mega-sample" depends="compile.samples"> |
| <echo message="Now I'll try to verify merlins example fifteen-HMAC" /> |
| <java classname="org.apache.xml.security.samples.signature.VerifyMerlinsExamplesFifteen" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| |
| <echo message="" /> |
| <echo message="Now I'll try to verify merlins example sixteen" /> |
| <java classname="org.apache.xml.security.samples.signature.VerifyMerlinsExamplesSixteen" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| |
| <echo message="" /> |
| <echo message="Now I'll create a signature in signature.xml and verify it" /> |
| <java classname="org.apache.xml.security.samples.signature.CreateSignature" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| <java classname="org.apache.xml.security.samples.signature.VerifySignature" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| |
| <echo message="" /> |
| <echo message="Now I'll create a signature like merlin-16 but without XSLT" /> |
| <java classname="org.apache.xml.security.samples.signature.CreateMerlinsExampleSixteen" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| |
| <echo message="" /> |
| <echo message="Please look into log.txt, merlinsSixteenRecreated.xml and signature.xml" /> |
| </target> |
| |
| <target name="createEnvelopingSignature" depends="compile.samples"> |
| <java classname="org.apache.xml.security.samples.signature.CreateEnvelopingSignature" |
| fork="yes"> |
| <classpath refid="classpath.library" /> |
| </java> |
| </target> |
| </project> |