You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by sv...@apache.org on 2003/11/20 04:46:33 UTC
cvs commit: ws-juddi build.xml
sviens 2003/11/19 19:46:33
Modified: . build.xml
Log:
Checkstyle target now uses configuration file: conf/checkstyle.xml.
Revision Changes Path
1.2 +499 -499 ws-juddi/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/ws-juddi/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 11 Nov 2003 13:55:48 -0000 1.1
+++ build.xml 20 Nov 2003 03:46:33 -0000 1.2
@@ -1,499 +1,499 @@
-<?xml version="1.0"?>
-<!-- ===================================================================
-
-Jakarta Ant build script for jUDDI
-
-Prerequisites:
- jakarta-ant from http://jakarta.apache.org/ant/
- axis from http://ws.apache.org/axis/
- commons-logging from http://jakarta.apache.org/commons/logging.html
- servlet from http://jakarta.apache.org/tomcat/
- jdbc-2.0-stdext from http://jakarta.apache.org/tomcat/
- log4j from http://jakarta.apache.org/log4j
-
-
-Optional components:
- junit from http://www.junit.org/
- jce from http://java.sun.com/products/jce/
- checkstyle from http://checkstyle.sourceforge.net/
- commons-collections from http://jakarta.apache.org/commons/collections.html
- commons-dbcp from http://jakarta.apache.org/commons/dbcp/
- commons-pool from http://jakarta.apache.org/commons/pool/
-
-Optional dependees:
- krysalis-version from http://www.krysalis.org/version
-
-
-Most Useful Targets:
- - compile Compiles and jars all Java classes
- - jar Builds the jUDDI library (juddi.jar)
- - javadoc Builds JavaDoc
- - test tests everything via JUnit
- - war Builds the jUDDI Web Application (juddi.war)
- - deploy Deploys (Redeploys) the jUDDI webapp (local Tomcat only)
- - ear Builds the jUDDI Enterprise Application (juddi.ear)
- - binary Builds the jUDDI binary distribution
- - source Builds the jUDDI source distribution
- - all builds everything
- - clean cleans everything
-
-
-Author:
- Steve Viens <sv...@apache.org>
-
-
-Copyright:
- Copyright (c) 2003 Apache Software Foundation.
-
- $Id$
-
-==================================================================== -->
-<project default="compile" basedir=".">
- <target name="init">
-
- <!-- load property values from build.properties -->
- <property file="${basedir}/build.properties"/>
-
- <!-- set project-wide property values -->
- <property name="name" value="juddi"/>
- <property name="version" value="0.8.1"/>
- <property name="owner" value="Apache Software Foundation"/>
- <property name="title" value="jUDDI ${version}"/>
- <property name="jar.file" value="${name}.jar"/>
- <property name="war.file" value="${name}.war"/>
- <property name="ear.file" value="${name}.ear"/>
- <property name="dbscripts.dir" value="${basedir}/dbscripts"/>
- <property name="docs.dir" value="${basedir}/docs"/>
- <property name="lib.dir" value="${basedir}/lib"/>
- <property name="src.dir" value="${basedir}/src"/>
- <property name="java.dir" value="${basedir}/src/java"/>
- <property name="conf.dir" value="${basedir}/conf"/>
- <property name="webapps.dir" value="${basedir}/webapps"/>
- <property name="build.dir" value="${basedir}/build"/>
- <property name="classes.dir" value="${build.dir}/classes"/>
- <property name="javadoc.dir" value="${build.dir}/apiDocs"/>
- <property name="dist.src.dir" value="${build.dir}/dist_src"/>
- <property name="dist.src.root" value="${dist.src.dir}/${name}_${version}_src"/>
- <property name="dist.bin.dir" value="${build.dir}/dist_bin"/>
- <property name="dist.bin.root" value="${dist.bin.dir}/${name}_${version}_bin"/>
- <property name="compile.debug" value="on"/>
- <property name="compile.deprecation" value="on"/>
- <property name="compile.optimize" value="off"/>
- <property name="test.failonerror" value="true" />
- <property name="test.runner" value="junit.textui.TestRunner"/>
-
- <!-- project-wide classpath for building and running all targets -->
- <path id="project.classpath">
- <pathelement path="${build.dir}/${jar.file}"/>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <!-- classpath search to determine if JUnit tests should be run -->
- <condition property="junit.present" value="true">
- <available classname="junit.framework.TestCase" />
- </condition>
-
- <!-- classpath search to determine if CheckStyle should be run -->
- <condition property="checkstyle.present" value="true">
- <available classname="com.puppycrawl.tools.checkstyle.Main" />
- </condition>
-
- <!-- build script 'start-time' -->
- <tstamp>
- <format property="DATE_STAMP" pattern="yyyyMMdd" timezone="GMT"/>
- </tstamp>
-
- </target>
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
- <target name="compile" depends="init,version">
- <mkdir dir="${classes.dir}"/>
- <javac
- destdir="${classes.dir}"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="project.classpath"/>
- <src path="${java.dir}"/>
- </javac>
- </target>
- <!-- =================================================================== -->
- <!-- Creates the Java library (juddi.jar) -->
- <!-- =================================================================== -->
- <target name="jar" depends="compile">
- <mkdir dir="${build.dir}"/>
- <jar
- jarfile="${build.dir}/${jar.file}"
- basedir="${classes.dir}"
- includes="org/apache/juddi/**"/>
- </target>
- <!-- =================================================================== -->
- <!-- Build the jUDDI Web Application (juddi.war) -->
- <!-- =================================================================== -->
- <target name="war" depends="jar">
- <mkdir dir="${build.dir}"/>
- <war warfile="${build.dir}/${war.file}" webxml="${conf.dir}/web.xml">
- <fileset dir="${webapps.dir}/juddi">
- <include name="**"/>
- </fileset>
- <webinf dir="${conf.dir}">
- <include name="server-config.wsdd"/>
- </webinf>
- <classes dir="${conf.dir}">
- <include name="juddi.properties"/>
- <include name="log4j.properties"/>
- <include name="juddi.users"/>
- </classes>
- <lib dir="${lib.dir}">
- <include name="axis.jar"/>
- <include name="commons-collections.jar"/>
- <include name="commons-dbcp.jar"/>
- <include name="commons-discovery.jar"/>
- <include name="commons-logging.jar"/>
- <include name="commons-pool.jar"/>
- <include name="jaxrpc.jar"/>
- <include name="log4j-1.2.8.jar"/>
- <include name="saaj.jar"/>
- <include name="wsdl4j.jar"/>
- </lib>
- <lib dir="${build.dir}">
- <include name="${jar.file}"/>
- </lib>
- </war>
- <mkdir dir="${build.dir}/webapps/juddi"/>
- <unzip src="${build.dir}/${war.file}" dest="${build.dir}/webapps/juddi" overwrite="true"/>
- </target>
- <!-- =================================================================== -->
- <!-- Deploys/Redeploys the jUDDI webapp (local Tomcat only) -->
- <!-- -->
- <!-- The following properties are set in "build.properties". To -->
- <!-- use this target you'll need to set these property values to -->
- <!-- reflect you're own Tomcat installation: -->
- <!-- -->
- <!-- Property Description -->
- <!-- ~~~~~~~~ ~~~~~~~~~~~ -->
- <!-- tomcat.dir Tomcat's home directory -->
- <!-- tomcat.url The URL to Tomcat's home page -->
- <!-- tomcat.mngr.username Username to the Tomcat Manager webapp -->
- <!-- tomcat.mngr.password Password to the Tomcat Manager webapp -->
- <!-- -->
- <!-- =================================================================== -->
- <target name="deploy" depends="war">
-
- <!-- delete log files from previous 'deploy' attempts -->
- <echo message="deleting log files from previous 'deploy' attempts" />
- <delete file="${build.dir}/deploy.verify.log" />
- <delete file="${build.dir}/deploy.stop.log" />
- <delete file="${build.dir}/deploy.start.log" />
-
- <!-- verify that Tomcat is running -->
- <echo message="verify that Tomcat is running (and listening)" />
- <get
- src="${tomcat.url}"
- dest="${build.dir}/deploy.verify.log" />
-
- <!-- stop the jUDDI webapp -->
- <echo message="stopping the jUDDI webapp" />
- <get
- src="${tomcat.url}/manager/stop?path=/juddi"
- dest="${build.dir}/deploy.stop.log"
- username="${tomcat.mngr.username}"
- password="${tomcat.mngr.password}"
- ignoreerrors="true" />
-
- <!-- delete the currently deployed jUDDI webapp -->
- <echo message="deleting current jUDDI webapp from Tomcat's webapp dir" />
- <delete dir="${tomcat.dir}/webapps/juddi" verbose="false" />
-
- <!-- copy the new jUDDI webapp dir into Tomcat's webapp dir -->
- <echo message="copying new jUDDI webapp dir into Tomcat's webapp dir" />
- <copy todir="${tomcat.dir}/webapps/juddi" overwrite="yes">
- <fileset dir="${build.dir}/webapps/juddi" />
- </copy>
-
- <!-- start the jUDDI webapp -->
- <echo message="starting the Axis webapp" />
- <get
- src="${tomcat.url}/manager/start?path=/juddi"
- dest="${build.dir}/deploy.start.log"
- username="${tomcat.mngr.username}"
- password="${tomcat.mngr.password}" />
-
- </target>
- <!-- =================================================================== -->
- <!-- Build the jUDDI Enterprise Application (juddi.ear) -->
- <!-- =================================================================== -->
- <target name="ear" depends="war">
- <ear earfile="${build.dir}/${ear.file}" appxml="${conf.dir}/application.xml">
- <fileset dir="${build.dir}" includes="${war.file}"/>
- </ear>
- </target>
- <!-- =================================================================== -->
- <!-- Creates the complete set of JavaDoc API -->
- <!-- =================================================================== -->
- <target name="javadoc" depends="init">
- <mkdir dir="${javadoc.dir}"/>
- <javadoc sourcepath="${java.dir}" destdir="${javadoc.dir}"
- packagenames=
- "org.apache.juddi.auth,
- org.apache.juddi.client,
- org.apache.juddi.cryptor,
- org.apache.juddi.datastore,
- org.apache.juddi.datatype,
- org.apache.juddi.datatype.assertion,
- org.apache.juddi.datatype.binding,
- org.apache.juddi.datatype.business,
- org.apache.juddi.datatype.publisher,
- org.apache.juddi.datatype.request,
- org.apache.juddi.datatype.response,
- org.apache.juddi.datatype.service,
- org.apache.juddi.datatype.tmodel,
- org.apache.juddi.error,
- org.apache.juddi.function,
- org.apache.juddi.handler,
- org.apache.juddi.monitor,
- org.apache.juddi.registry,
- org.apache.juddi.transport,
- org.apache.juddi.util,
- org.apache.juddi.util.jdbc,
- org.apache.juddi.util.xml,
- org.apache.juddi.uuidgen"
- author="true"
- version="true"
- windowtitle="${title}"
- doctitle="${title}"
- bottom="Copyright © 2003 ${owner}. All rights reserved.">
- <classpath refid="project.classpath"/>
- </javadoc>
- </target>
- <!-- =================================================================== -->
- <!-- Running CheckStyle validation of jUDDI Source code -->
- <!-- =================================================================== -->
- <target name="checkstyle" depends="init" if="checkstyle.present">
- <mkdir dir="${build.dir}"/>
- <taskdef resource="checkstyletask.properties" />
- <checkstyle
- config="${conf.dir}/juddi-checkstyle-checks.xml"
- failureProperty="checkstyle.failure"
- failOnViolation="true">
- <fileset dir="${java.dir}" includes="**/*.java"/>
- <formatter type="plain" toFile="${build.dir}/checkstyle.txt"/>
- </checkstyle>
- </target>
- <!-- =================================================================== -->
- <!-- Compiles and Runs jUDDI Unit Test Suites -->
- <!-- =================================================================== -->
- <target name="test" depends="jar" if="junit.present">
- <mkdir dir="${build.dir}/unit/classes"/>
- <javac
- destdir="${build.dir}/unit/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="project.classpath"/>
- <src path="${src.dir}/junit"/>
- </javac>
- <junit
- printsummary="yes" fork="on" haltonfailure="yes">
- <formatter type="plain" usefile="false"/>
- <test name="org.apache.juddi.TestAll"/>
- <classpath>
- <pathelement location="${build.dir}/unit/classes" />
- <pathelement location="${build.dir}/${jar.file}" />
- <pathelement path="${java.class.path}" />
- </classpath>
- </junit>
- </target>
- <!-- =================================================================== -->
- <!-- Compiles UDDI4j Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="compile-uddi4j-tests" depends="jar">
- <mkdir dir="${build.dir}/uddi4j/classes"/>
- <javac
- destdir="${build.dir}/uddi4j/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="project.classpath"/>
- <src path="${src.dir}/uddi4j"/>
- </javac>
- <copy
- file="${src.dir}/uddi4j/org/apache/juddi/uddi4j/samples.prop"
- todir="${build.dir}/uddi4j/classes/org/apache/juddi/uddi4j"/>
- </target>
- <!-- =================================================================== -->
- <!-- Runs UDDI4j Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="run-uddi4j-tests" depends="compile-uddi4j-tests">
- <java classname="${test.runner}" fork="true">
- <jvmarg value="-Dorg.uddi4j.TransportClassName=org.uddi4j.transport.ApacheAxisTransport"/>
- <arg value="org.apache.juddi.uddi4j.TestAll"/>
- <classpath>
- <pathelement location="${lib.dir}/uddi4j.jar"/>
- <pathelement location="${lib.dir}/junit.jar"/>
- <pathelement location="${lib.dir}/axis.jar"/>
- <pathelement location="${lib.dir}/jaxrpc.jar"/>
- <pathelement location="${lib.dir}/saaj.jar"/>
- <pathelement location="${lib.dir}/commons-logging.jar"/>
- <pathelement location="${lib.dir}/commons-discovery.jar"/>
- <pathelement location="${lib.dir}/commons-collections.jar"/>
- <pathelement location="${lib.dir}/commons-dbcp.jar"/>
- <pathelement location="${lib.dir}/commons-pool.jar"/>
- <pathelement location="${build.dir}/uddi4j/classes"/>
- <pathelement location="${build.dir}/juddi.jar"/>
- <pathelement location="${build.dir}/${jar.file}"/>
- </classpath>
- </java>
- </target>
- <!-- =================================================================== -->
- <!-- Compiles jUDDI Proxy Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="compile-proxy-tests" depends="jar">
- <mkdir dir="${build.dir}/proxy/classes"/>
- <javac
- destdir="${build.dir}/proxy/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="project.classpath"/>
- <src path="${src.dir}/proxy"/>
- </javac>
- </target>
- <!-- =================================================================== -->
- <!-- Runs jUDDI Proxy Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="run-proxy-tests" depends="compile-proxy-tests">
- <java classname="${test.runner}" fork="true">
- <arg value="org.apache.juddi.proxy.TestAll"/>
- <classpath>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <pathelement location="${build.dir}/proxy/classes"/>
- <pathelement location="${build.dir}/${jar.file}"/>
- </classpath>
- </java>
- </target>
- <!-- =================================================================== -->
- <!-- Compiles JAXR Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="compile-jaxr-tests" depends="jar">
- <mkdir dir="${build.dir}/jaxr/classes"/>
- <javac
- destdir="${build.dir}/jaxr/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="project.classpath"/>
- <src path="${src.dir}/jaxr"/>
- </javac>
- </target>
- <!-- =================================================================== -->
- <!-- Runs JAXR Interoperability Tests -->
- <!-- =================================================================== -->
- <target name="run-jaxr-tests" depends="compile-jaxr-tests">
- <java classname="${test.runner}" fork="true">
- <arg value="org.apache.juddi.jaxr.TestAll"/>
- <classpath>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <pathelement location="${build.dir}/jaxr/classes"/>
- <pathelement location="${build.dir}/${jar.file}"/>
- </classpath>
- </java>
- </target>
- <!-- =================================================================== -->
- <!-- Creates the source distribution -->
- <!-- =================================================================== -->
- <target name="source" depends="javadoc">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${dist.src.dir}"/>
- <mkdir dir="${dist.src.root}"/>
-
- <!-- load the source distribution directory with what's needed here -->
- <copy file="build.xml" todir="${dist.src.root}"/>
- <copy file="build.properties" todir="${dist.src.root}"/>
- <copy file="gump.xml" todir="${dist.src.root}"/>
- <copy file="LICENSE" todir="${dist.src.root}"/>
- <copy file="README" todir="${dist.src.root}"/>
- <copy file="release-notes.html" todir="${dist.src.root}"/>
- <copy todir="${dist.src.root}/docs"><fileset dir="${docs.dir}"/></copy>
- <copy todir="${dist.src.root}/docs/apiDoc"><fileset dir="${javadoc.dir}"/></copy>
- <copy todir="${dist.src.root}/docs/dbscripts"><fileset dir="${dbscripts.dir}"/></copy>
- <copy todir="${dist.src.root}/lib"><fileset dir="${lib.dir}"/></copy>
- <copy todir="${dist.src.root}/conf"><fileset dir="${conf.dir}"/></copy>
- <copy todir="${dist.src.root}/src"><fileset dir="${src.dir}"/></copy>
- <copy todir="${dist.src.root}/webapps"><fileset dir="${webapps.dir}"/></copy>
-
- <!-- loading complete, now package the source distribution up -->
- <zip destfile="${build.dir}/juddi_${version}_src.zip" basedir="${dist.src.dir}"/>
- <tar destfile="${build.dir}/juddi_${version}_src.tar" basedir="${dist.src.dir}"/>
- <gzip src="${build.dir}/juddi_${version}_src.tar" zipfile="${build.dir}/juddi_${version}_src.tar.gz"/>
- </target>
- <!-- =================================================================== -->
- <!-- Creates the binary distribution -->
- <!-- =================================================================== -->
- <target name="binary" depends="ear,javadoc">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${dist.bin.dir}"/>
- <mkdir dir="${dist.bin.root}"/>
-
- <!-- load the binary distribution directory with what's needed here -->
- <copy file="LICENSE" todir="${dist.bin.root}"/>
- <copy file="README" todir="${dist.bin.root}"/>
- <copy file="release-notes.html" todir="${dist.bin.root}"/>
- <copy file="${build.dir}/${jar.file}" todir="${dist.bin.root}/build"/>
- <copy file="${build.dir}/${war.file}" todir="${dist.bin.root}/build"/>
- <copy file="${build.dir}/${ear.file}" todir="${dist.bin.root}/build"/>
- <copy todir="${dist.bin.root}/docs"><fileset dir="${docs.dir}"/></copy>
- <copy todir="${dist.bin.root}/docs/dbscripts"><fileset dir="${dbscripts.dir}"/></copy>
- <copy todir="${dist.bin.root}/docs/apiDoc"><fileset dir="${javadoc.dir}"/></copy>
- <copy todir="${dist.bin.root}/conf"><fileset dir="${conf.dir}"/></copy>
- <copy todir="${dist.bin.root}/build/webapps"><fileset dir="${build.dir}/webapps"/></copy>
-
- <!-- loading complete, now package the binary distribution up -->
- <zip destfile="${build.dir}/juddi_${version}_bin.zip" basedir="${dist.bin.dir}"/>
- <tar destfile="${build.dir}/juddi_${version}_bin.tar" basedir="${dist.bin.dir}"/>
- <gzip src="${build.dir}/juddi_${version}_bin.tar" zipfile="${build.dir}/juddi_${version}_bin.tar.gz"/>
- </target>
- <!-- =================================================================== -->
- <!-- Creates both the binary and source distributions -->
- <!-- =================================================================== -->
- <target name="dist" depends="source,binary"/>
- <!-- =================================================================== -->
- <!-- Build everything -->
- <!-- =================================================================== -->
- <target name="all" depends="clean,jar,test,javadoc,binary,source"/>
- <!-- =================================================================== -->
- <!-- Build everything -->
- <!-- =================================================================== -->
- <target name="gump" depends="clean,jar">
- <copy file="${build.dir}/${jar.file}"
- tofile="${build.dir}/${name}-${DATE_STAMP}.jar"/>
- </target>
- <!-- =================================================================== -->
- <!-- Versioning -->
- <!-- Note: Fails safe if krysalis-version is not available... -->
- <!-- =================================================================== -->
- <target name="version" if="version.available" description="versioning">
- <taskdef resource="version" />
- <!-- For now just log (later store for checking) -->
- <version-environment />
- <!-- Brand a (standalone) version stamp into source... -->
- <version-stamp dest="${src.dir}" overWrite="true">
- <versionMarker versionId="org.apache.juddi" version="${version}">
- <defaultAttributes />
- </versionMarker>
- </version-stamp>
- </target>
- <!-- =================================================================== -->
- <!-- Clean everything -->
- <!-- =================================================================== -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}" verbose="false"/>
- </target>
-</project>
+<?xml version="1.0"?>
+<!-- ===================================================================
+
+Jakarta Ant build script for jUDDI
+
+Prerequisites:
+ jakarta-ant from http://jakarta.apache.org/ant/
+ axis from http://ws.apache.org/axis/
+ commons-logging from http://jakarta.apache.org/commons/logging.html
+ servlet from http://jakarta.apache.org/tomcat/
+ jdbc-2.0-stdext from http://jakarta.apache.org/tomcat/
+ log4j from http://jakarta.apache.org/log4j
+
+
+Optional components:
+ junit from http://www.junit.org/
+ jce from http://java.sun.com/products/jce/
+ checkstyle from http://checkstyle.sourceforge.net/
+ commons-collections from http://jakarta.apache.org/commons/collections.html
+ commons-dbcp from http://jakarta.apache.org/commons/dbcp/
+ commons-pool from http://jakarta.apache.org/commons/pool/
+
+Optional dependees:
+ krysalis-version from http://www.krysalis.org/version
+
+
+Most Useful Targets:
+ - compile Compiles and jars all Java classes
+ - jar Builds the jUDDI library (juddi.jar)
+ - javadoc Builds JavaDoc
+ - test tests everything via JUnit
+ - war Builds the jUDDI Web Application (juddi.war)
+ - deploy Deploys (Redeploys) the jUDDI webapp (local Tomcat only)
+ - ear Builds the jUDDI Enterprise Application (juddi.ear)
+ - binary Builds the jUDDI binary distribution
+ - source Builds the jUDDI source distribution
+ - all builds everything
+ - clean cleans everything
+
+
+Author:
+ Steve Viens <sv...@apache.org>
+
+
+Copyright:
+ Copyright (c) 2003 Apache Software Foundation.
+
+ $Id$
+
+==================================================================== -->
+<project default="compile" basedir=".">
+ <target name="init">
+
+ <!-- load property values from build.properties -->
+ <property file="${basedir}/build.properties"/>
+
+ <!-- set project-wide property values -->
+ <property name="name" value="juddi"/>
+ <property name="version" value="0.8.1"/>
+ <property name="owner" value="Apache Software Foundation"/>
+ <property name="title" value="jUDDI ${version}"/>
+ <property name="jar.file" value="${name}.jar"/>
+ <property name="war.file" value="${name}.war"/>
+ <property name="ear.file" value="${name}.ear"/>
+ <property name="dbscripts.dir" value="${basedir}/dbscripts"/>
+ <property name="docs.dir" value="${basedir}/docs"/>
+ <property name="lib.dir" value="${basedir}/lib"/>
+ <property name="src.dir" value="${basedir}/src"/>
+ <property name="java.dir" value="${basedir}/src/java"/>
+ <property name="conf.dir" value="${basedir}/conf"/>
+ <property name="webapps.dir" value="${basedir}/webapps"/>
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="javadoc.dir" value="${build.dir}/apiDocs"/>
+ <property name="dist.src.dir" value="${build.dir}/dist_src"/>
+ <property name="dist.src.root" value="${dist.src.dir}/${name}_${version}_src"/>
+ <property name="dist.bin.dir" value="${build.dir}/dist_bin"/>
+ <property name="dist.bin.root" value="${dist.bin.dir}/${name}_${version}_bin"/>
+ <property name="compile.debug" value="on"/>
+ <property name="compile.deprecation" value="on"/>
+ <property name="compile.optimize" value="off"/>
+ <property name="test.failonerror" value="true" />
+ <property name="test.runner" value="junit.textui.TestRunner"/>
+
+ <!-- project-wide classpath for building and running all targets -->
+ <path id="project.classpath">
+ <pathelement path="${build.dir}/${jar.file}"/>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- classpath search to determine if JUnit tests should be run -->
+ <condition property="junit.present" value="true">
+ <available classname="junit.framework.TestCase" />
+ </condition>
+
+ <!-- classpath search to determine if CheckStyle should be run -->
+ <condition property="checkstyle.present" value="true">
+ <available classname="com.puppycrawl.tools.checkstyle.Main" />
+ </condition>
+
+ <!-- build script 'start-time' -->
+ <tstamp>
+ <format property="DATE_STAMP" pattern="yyyyMMdd" timezone="GMT"/>
+ </tstamp>
+
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="init,version">
+ <mkdir dir="${classes.dir}"/>
+ <javac
+ destdir="${classes.dir}"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="project.classpath"/>
+ <src path="${java.dir}"/>
+ </javac>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates the Java library (juddi.jar) -->
+ <!-- =================================================================== -->
+ <target name="jar" depends="compile">
+ <mkdir dir="${build.dir}"/>
+ <jar
+ jarfile="${build.dir}/${jar.file}"
+ basedir="${classes.dir}"
+ includes="org/apache/juddi/**"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Build the jUDDI Web Application (juddi.war) -->
+ <!-- =================================================================== -->
+ <target name="war" depends="jar">
+ <mkdir dir="${build.dir}"/>
+ <war warfile="${build.dir}/${war.file}" webxml="${conf.dir}/web.xml">
+ <fileset dir="${webapps.dir}/juddi">
+ <include name="**"/>
+ </fileset>
+ <webinf dir="${conf.dir}">
+ <include name="server-config.wsdd"/>
+ </webinf>
+ <classes dir="${conf.dir}">
+ <include name="juddi.properties"/>
+ <include name="log4j.properties"/>
+ <include name="juddi.users"/>
+ </classes>
+ <lib dir="${lib.dir}">
+ <include name="axis.jar"/>
+ <include name="commons-collections.jar"/>
+ <include name="commons-dbcp.jar"/>
+ <include name="commons-discovery.jar"/>
+ <include name="commons-logging.jar"/>
+ <include name="commons-pool.jar"/>
+ <include name="jaxrpc.jar"/>
+ <include name="log4j-1.2.8.jar"/>
+ <include name="saaj.jar"/>
+ <include name="wsdl4j.jar"/>
+ </lib>
+ <lib dir="${build.dir}">
+ <include name="${jar.file}"/>
+ </lib>
+ </war>
+ <mkdir dir="${build.dir}/webapps/juddi"/>
+ <unzip src="${build.dir}/${war.file}" dest="${build.dir}/webapps/juddi" overwrite="true"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Deploys/Redeploys the jUDDI webapp (local Tomcat only) -->
+ <!-- -->
+ <!-- The following properties are set in "build.properties". To -->
+ <!-- use this target you'll need to set these property values to -->
+ <!-- reflect you're own Tomcat installation: -->
+ <!-- -->
+ <!-- Property Description -->
+ <!-- ~~~~~~~~ ~~~~~~~~~~~ -->
+ <!-- tomcat.dir Tomcat's home directory -->
+ <!-- tomcat.url The URL to Tomcat's home page -->
+ <!-- tomcat.mngr.username Username to the Tomcat Manager webapp -->
+ <!-- tomcat.mngr.password Password to the Tomcat Manager webapp -->
+ <!-- -->
+ <!-- =================================================================== -->
+ <target name="deploy" depends="war">
+
+ <!-- delete log files from previous 'deploy' attempts -->
+ <echo message="deleting log files from previous 'deploy' attempts" />
+ <delete file="${build.dir}/deploy.verify.log" />
+ <delete file="${build.dir}/deploy.stop.log" />
+ <delete file="${build.dir}/deploy.start.log" />
+
+ <!-- verify that Tomcat is running -->
+ <echo message="verify that Tomcat is running (and listening)" />
+ <get
+ src="${tomcat.url}"
+ dest="${build.dir}/deploy.verify.log" />
+
+ <!-- stop the jUDDI webapp -->
+ <echo message="stopping the jUDDI webapp" />
+ <get
+ src="${tomcat.url}/manager/stop?path=/juddi"
+ dest="${build.dir}/deploy.stop.log"
+ username="${tomcat.mngr.username}"
+ password="${tomcat.mngr.password}"
+ ignoreerrors="true" />
+
+ <!-- delete the currently deployed jUDDI webapp -->
+ <echo message="deleting current jUDDI webapp from Tomcat's webapp dir" />
+ <delete dir="${tomcat.dir}/webapps/juddi" verbose="false" />
+
+ <!-- copy the new jUDDI webapp dir into Tomcat's webapp dir -->
+ <echo message="copying new jUDDI webapp dir into Tomcat's webapp dir" />
+ <copy todir="${tomcat.dir}/webapps/juddi" overwrite="yes">
+ <fileset dir="${build.dir}/webapps/juddi" />
+ </copy>
+
+ <!-- start the jUDDI webapp -->
+ <echo message="starting the Axis webapp" />
+ <get
+ src="${tomcat.url}/manager/start?path=/juddi"
+ dest="${build.dir}/deploy.start.log"
+ username="${tomcat.mngr.username}"
+ password="${tomcat.mngr.password}" />
+
+ </target>
+ <!-- =================================================================== -->
+ <!-- Build the jUDDI Enterprise Application (juddi.ear) -->
+ <!-- =================================================================== -->
+ <target name="ear" depends="war">
+ <ear earfile="${build.dir}/${ear.file}" appxml="${conf.dir}/application.xml">
+ <fileset dir="${build.dir}" includes="${war.file}"/>
+ </ear>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates the complete set of JavaDoc API -->
+ <!-- =================================================================== -->
+ <target name="javadoc" depends="init">
+ <mkdir dir="${javadoc.dir}"/>
+ <javadoc sourcepath="${java.dir}" destdir="${javadoc.dir}"
+ packagenames=
+ "org.apache.juddi.auth,
+ org.apache.juddi.client,
+ org.apache.juddi.cryptor,
+ org.apache.juddi.datastore,
+ org.apache.juddi.datatype,
+ org.apache.juddi.datatype.assertion,
+ org.apache.juddi.datatype.binding,
+ org.apache.juddi.datatype.business,
+ org.apache.juddi.datatype.publisher,
+ org.apache.juddi.datatype.request,
+ org.apache.juddi.datatype.response,
+ org.apache.juddi.datatype.service,
+ org.apache.juddi.datatype.tmodel,
+ org.apache.juddi.error,
+ org.apache.juddi.function,
+ org.apache.juddi.handler,
+ org.apache.juddi.monitor,
+ org.apache.juddi.registry,
+ org.apache.juddi.transport,
+ org.apache.juddi.util,
+ org.apache.juddi.util.jdbc,
+ org.apache.juddi.util.xml,
+ org.apache.juddi.uuidgen"
+ author="true"
+ version="true"
+ windowtitle="${title}"
+ doctitle="${title}"
+ bottom="Copyright © 2003 ${owner}. All rights reserved.">
+ <classpath refid="project.classpath"/>
+ </javadoc>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Running CheckStyle validation of jUDDI Source code -->
+ <!-- =================================================================== -->
+ <target name="checkstyle" depends="init" if="checkstyle.present">
+ <mkdir dir="${build.dir}"/>
+ <taskdef resource="checkstyletask.properties" />
+ <checkstyle
+ config="${conf.dir}/checkstyle.xml"
+ failureProperty="checkstyle.failure"
+ failOnViolation="true">
+ <fileset dir="${java.dir}" includes="**/*.java"/>
+ <formatter type="plain" toFile="${build.dir}/checkstyle.txt"/>
+ </checkstyle>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles and Runs jUDDI Unit Test Suites -->
+ <!-- =================================================================== -->
+ <target name="test" depends="jar" if="junit.present">
+ <mkdir dir="${build.dir}/unit/classes"/>
+ <javac
+ destdir="${build.dir}/unit/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="project.classpath"/>
+ <src path="${src.dir}/junit"/>
+ </javac>
+ <junit
+ printsummary="yes" fork="on" haltonfailure="yes">
+ <formatter type="plain" usefile="false"/>
+ <test name="org.apache.juddi.TestAll"/>
+ <classpath>
+ <pathelement location="${build.dir}/unit/classes" />
+ <pathelement location="${build.dir}/${jar.file}" />
+ <pathelement path="${java.class.path}" />
+ </classpath>
+ </junit>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles UDDI4j Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="compile-uddi4j-tests" depends="jar">
+ <mkdir dir="${build.dir}/uddi4j/classes"/>
+ <javac
+ destdir="${build.dir}/uddi4j/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="project.classpath"/>
+ <src path="${src.dir}/uddi4j"/>
+ </javac>
+ <copy
+ file="${src.dir}/uddi4j/org/apache/juddi/uddi4j/samples.prop"
+ todir="${build.dir}/uddi4j/classes/org/apache/juddi/uddi4j"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Runs UDDI4j Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="run-uddi4j-tests" depends="compile-uddi4j-tests">
+ <java classname="${test.runner}" fork="true">
+ <jvmarg value="-Dorg.uddi4j.TransportClassName=org.uddi4j.transport.ApacheAxisTransport"/>
+ <arg value="org.apache.juddi.uddi4j.TestAll"/>
+ <classpath>
+ <pathelement location="${lib.dir}/uddi4j.jar"/>
+ <pathelement location="${lib.dir}/junit.jar"/>
+ <pathelement location="${lib.dir}/axis.jar"/>
+ <pathelement location="${lib.dir}/jaxrpc.jar"/>
+ <pathelement location="${lib.dir}/saaj.jar"/>
+ <pathelement location="${lib.dir}/commons-logging.jar"/>
+ <pathelement location="${lib.dir}/commons-discovery.jar"/>
+ <pathelement location="${lib.dir}/commons-collections.jar"/>
+ <pathelement location="${lib.dir}/commons-dbcp.jar"/>
+ <pathelement location="${lib.dir}/commons-pool.jar"/>
+ <pathelement location="${build.dir}/uddi4j/classes"/>
+ <pathelement location="${build.dir}/juddi.jar"/>
+ <pathelement location="${build.dir}/${jar.file}"/>
+ </classpath>
+ </java>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles jUDDI Proxy Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="compile-proxy-tests" depends="jar">
+ <mkdir dir="${build.dir}/proxy/classes"/>
+ <javac
+ destdir="${build.dir}/proxy/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="project.classpath"/>
+ <src path="${src.dir}/proxy"/>
+ </javac>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Runs jUDDI Proxy Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="run-proxy-tests" depends="compile-proxy-tests">
+ <java classname="${test.runner}" fork="true">
+ <arg value="org.apache.juddi.proxy.TestAll"/>
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${build.dir}/proxy/classes"/>
+ <pathelement location="${build.dir}/${jar.file}"/>
+ </classpath>
+ </java>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Compiles JAXR Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="compile-jaxr-tests" depends="jar">
+ <mkdir dir="${build.dir}/jaxr/classes"/>
+ <javac
+ destdir="${build.dir}/jaxr/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="project.classpath"/>
+ <src path="${src.dir}/jaxr"/>
+ </javac>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Runs JAXR Interoperability Tests -->
+ <!-- =================================================================== -->
+ <target name="run-jaxr-tests" depends="compile-jaxr-tests">
+ <java classname="${test.runner}" fork="true">
+ <arg value="org.apache.juddi.jaxr.TestAll"/>
+ <classpath>
+ <fileset dir="${lib.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${build.dir}/jaxr/classes"/>
+ <pathelement location="${build.dir}/${jar.file}"/>
+ </classpath>
+ </java>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates the source distribution -->
+ <!-- =================================================================== -->
+ <target name="source" depends="javadoc">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${dist.src.dir}"/>
+ <mkdir dir="${dist.src.root}"/>
+
+ <!-- load the source distribution directory with what's needed here -->
+ <copy file="build.xml" todir="${dist.src.root}"/>
+ <copy file="build.properties" todir="${dist.src.root}"/>
+ <copy file="gump.xml" todir="${dist.src.root}"/>
+ <copy file="LICENSE" todir="${dist.src.root}"/>
+ <copy file="README" todir="${dist.src.root}"/>
+ <copy file="release-notes.html" todir="${dist.src.root}"/>
+ <copy todir="${dist.src.root}/docs"><fileset dir="${docs.dir}"/></copy>
+ <copy todir="${dist.src.root}/docs/apiDoc"><fileset dir="${javadoc.dir}"/></copy>
+ <copy todir="${dist.src.root}/docs/dbscripts"><fileset dir="${dbscripts.dir}"/></copy>
+ <copy todir="${dist.src.root}/lib"><fileset dir="${lib.dir}"/></copy>
+ <copy todir="${dist.src.root}/conf"><fileset dir="${conf.dir}"/></copy>
+ <copy todir="${dist.src.root}/src"><fileset dir="${src.dir}"/></copy>
+ <copy todir="${dist.src.root}/webapps"><fileset dir="${webapps.dir}"/></copy>
+
+ <!-- loading complete, now package the source distribution up -->
+ <zip destfile="${build.dir}/juddi_${version}_src.zip" basedir="${dist.src.dir}"/>
+ <tar destfile="${build.dir}/juddi_${version}_src.tar" basedir="${dist.src.dir}"/>
+ <gzip src="${build.dir}/juddi_${version}_src.tar" zipfile="${build.dir}/juddi_${version}_src.tar.gz"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates the binary distribution -->
+ <!-- =================================================================== -->
+ <target name="binary" depends="ear,javadoc">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${dist.bin.dir}"/>
+ <mkdir dir="${dist.bin.root}"/>
+
+ <!-- load the binary distribution directory with what's needed here -->
+ <copy file="LICENSE" todir="${dist.bin.root}"/>
+ <copy file="README" todir="${dist.bin.root}"/>
+ <copy file="release-notes.html" todir="${dist.bin.root}"/>
+ <copy file="${build.dir}/${jar.file}" todir="${dist.bin.root}/build"/>
+ <copy file="${build.dir}/${war.file}" todir="${dist.bin.root}/build"/>
+ <copy file="${build.dir}/${ear.file}" todir="${dist.bin.root}/build"/>
+ <copy todir="${dist.bin.root}/docs"><fileset dir="${docs.dir}"/></copy>
+ <copy todir="${dist.bin.root}/docs/dbscripts"><fileset dir="${dbscripts.dir}"/></copy>
+ <copy todir="${dist.bin.root}/docs/apiDoc"><fileset dir="${javadoc.dir}"/></copy>
+ <copy todir="${dist.bin.root}/conf"><fileset dir="${conf.dir}"/></copy>
+ <copy todir="${dist.bin.root}/build/webapps"><fileset dir="${build.dir}/webapps"/></copy>
+
+ <!-- loading complete, now package the binary distribution up -->
+ <zip destfile="${build.dir}/juddi_${version}_bin.zip" basedir="${dist.bin.dir}"/>
+ <tar destfile="${build.dir}/juddi_${version}_bin.tar" basedir="${dist.bin.dir}"/>
+ <gzip src="${build.dir}/juddi_${version}_bin.tar" zipfile="${build.dir}/juddi_${version}_bin.tar.gz"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Creates both the binary and source distributions -->
+ <!-- =================================================================== -->
+ <target name="dist" depends="source,binary"/>
+ <!-- =================================================================== -->
+ <!-- Build everything -->
+ <!-- =================================================================== -->
+ <target name="all" depends="clean,jar,test,javadoc,binary,source"/>
+ <!-- =================================================================== -->
+ <!-- Build everything -->
+ <!-- =================================================================== -->
+ <target name="gump" depends="clean,jar">
+ <copy file="${build.dir}/${jar.file}"
+ tofile="${build.dir}/${name}-${DATE_STAMP}.jar"/>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Versioning -->
+ <!-- Note: Fails safe if krysalis-version is not available... -->
+ <!-- =================================================================== -->
+ <target name="version" if="version.available" description="versioning">
+ <taskdef resource="version" />
+ <!-- For now just log (later store for checking) -->
+ <version-environment />
+ <!-- Brand a (standalone) version stamp into source... -->
+ <version-stamp dest="${src.dir}" overWrite="true">
+ <versionMarker versionId="org.apache.juddi" version="${version}">
+ <defaultAttributes />
+ </versionMarker>
+ </version-stamp>
+ </target>
+ <!-- =================================================================== -->
+ <!-- Clean everything -->
+ <!-- =================================================================== -->
+ <target name="clean" depends="init">
+ <delete dir="${build.dir}" verbose="false"/>
+ </target>
+</project>