User: juha
Date: 01/03/07 14:34:29
Modified: build build.bat build.xml
Log:
Updated build to ant 1.3
Revision Changes Path
1.2 +8 -8 admin/build/build.bat
Index: build.bat
===================================================================
RCS file: /products/cvs/ejboss/admin/build/build.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.bat 2000/12/17 20:11:20 1.1
+++ build.bat 2001/03/07 22:34:29 1.2
@@ -4,9 +4,9 @@
REM ----------------------------------------------------------------
REM
REM Batch file for running the build scripts on org.jboss.admin
-REM package. Requires libraries ant.jar, jaxp.jar and parser.jar
-REM and file build.xml in the work directory. Default Ant target
-REM is 'all'.
+REM package. Requires libraries ant.jar, jaxp.jar and JAXP
+REM compatible XML parser in classpath and file build.xml in the
+REM work directory. Default target is 'dist'.
REM
REM Usage: build [target]
REM build clean
@@ -18,7 +18,7 @@
REM
REM
REM Author: Juha Lindfors
-REM Revision: $Id: build.bat,v 1.1 2000/12/17 20:11:20 juha Exp $
+REM Revision: $Id: build.bat,v 1.2 2001/03/07 22:34:29 juha Exp $
REM
REM ----------------------------------------------------------------
@@ -50,11 +50,11 @@
REM ----------------------------------------------------------------
:SetClasspath
set CP=.
+set CP=%CP%;%CLASSPATH%
set CP=%CP%;%ANT_HOME%\lib\ant.jar
-set CP=%CP%;%ANT_HOME%\lib\jaxp.jar
-set CP=%CP%;%ANT_HOME%\lib\parser.jar
+REM set CP=%CP%;%ANT_HOME%\lib\jaxp.jar
+set CP=%CP%;%ANT_HOME%\lib\xerces.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
-set CP=%CP%;%CLASSPATH%
goto SetTarget
REM ----------------------------------------------------------------
@@ -80,4 +80,4 @@
REM
REM ----------------------------------------------------------------
:Run
-"%JAVA_HOME%\bin\java" -D%BUILD_TARGET% -D%CVS_TAG% -cp "%CP%"
org.apache.tools.ant.Main %TARGET% %2 %3 %4 %5 %6 %7
+"%JAVA_HOME%\bin\java" -D%CVS_TAG% -cp "%CP%" org.apache.tools.ant.Main %TARGET% %2
%3 %4 %5 %6 %7
1.4 +131 -163 admin/build/build.xml
Index: build.xml
===================================================================
RCS file: /products/cvs/ejboss/admin/build/build.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.xml 2001/02/18 20:14:54 1.3
+++ build.xml 2001/03/07 22:34:29 1.4
@@ -3,76 +3,74 @@
Build scripts for org.jboss.admin package.
Author: Juha Lindfors
- Revision: $Id: build.xml,v 1.3 2001/02/18 20:14:54 juha Exp $
+ Revision: $Id: build.xml,v 1.4 2001/03/07 22:34:29 juha Exp $
Since: Ant 1.1
===================================================================== -->
<project name = "jBossAdmin" default = "dist" basedir = ".">
- <target name = "init">
-
- <!--
- Set the DSTAMP (yyyymmdd), TSTAMP (hhmm), and
- TODAY (month day year) properties.
- -->
- <tstamp/>
-
- <!--
- Home directory for this project. This could be set by the user
- or parent project. Defaults to current work directory.
- -->
- <property name = "project.home" value=".."/>
-
- <!-- Path to the source directory structure. -->
- <property name = "src.home" value = "../src"/>
-
- <!-- Path to scripts and other misc files. -->
- <property name = "etc.home" value = "../etc"/>
-
- <!-- Path to the extrenal library directory. -->
- <property name = "lib.path" value = "../lib"/>
-
- <!-- External libraries -->
- <property name = "JMS.lib" value = "jms.jar" />
- <property name = "JMX.lib" value = "jmxri.jar" />
- <property name = "JTA.lib" value = "jta-spec1_0_1.jar" />
- <property name = "JNP.lib" value = "jnp-client.jar" />
- <property name = "SPY.lib" value = "jbossmq-client.jar" />
- <property name = "PTRN.lib" value = "jpl-pattern-0_3.jar" />
- <property name = "UTIL.lib" value = "jpl-util-0_6b.jar" />
- <property name = "JBUTIL.lib" value = "jboss-util.jar" />
-
- <!-- Distributable directory property. -->
- <property name = "dist.home" value="../dist"/>
-
- <!-- The directories that go under the dist.home -->
- <property name="dist.src" value="${dist.home}/src"/>
- <property name="dist.classes" value="${dist.home}/classes"/>
- <property name="dist.lib" value="${dist.home}/lib"/>
- <property name="dist.docs" value="${dist.home}/docs"/>
- <property name="dist.apidocs" value="${dist.docs}/apidocs"/>
- <property name="dist.bin" value="${dist.home}/bin"/>
-
- <!-- Compiler options -->
- <property name="debug.mode" value="off"/>
- <property name="deprecation.mode" value="off"/>
- <property name="optimize.mode" value="off"/>
-
- <!-- Classpath -->
- <property name="cp" value=".;
- ${classpath};
- ${lib.path}/${JMS.lib};
- ${lib.path}/${JMX.lib};
- ${lib.path}/${JTA.lib};
- ${lib.path}/${PTRN.lib};
- ${lib.path}/${UTIL.lib};
- ${lib.path}/${JBUTIL.lib};
- ${etc.home}"
- />
-
- </target>
-
+ <!-- Path to the external library directory. -->
+ <property name = "lib.path" value = "../lib"/>
+ <!-- Path to the source directory structure. -->
+ <property name = "src.home" value = "../src"/>
+ <!-- Path to scripts and other misc files. -->
+ <property name = "etc.home" value = "../etc"/>
+ <!-- Distributable directory property. -->
+ <property name = "dist.home" value="../dist"/>
+
+ <!-- The directories that go under the dist.home -->
+ <property name="dist.src" value="${dist.home}/src"/>
+ <property name="dist.classes" value="${dist.home}/classes"/>
+ <property name="dist.lib" value="${dist.home}/lib"/>
+ <property name="dist.docs" value="${dist.home}/docs"/>
+ <property name="dist.apidocs" value="${dist.docs}/apidocs"/>
+ <property name="dist.bin" value="${dist.home}/bin"/>
+
+ <!-- Compiler options -->
+ <property name="debug.mode" value="off"/>
+ <property name="deprecation.mode" value="off"/>
+ <property name="optimize.mode" value="off"/>
+
+ <!-- The libs that are copied to dist/lib -->
+ <patternset id = "dist.libs">
+ <include name = "jms.jar"/>
+ <include name = "jta-spec1_0_1.jar"/>
+ <include name = "jnp-client.jar"/>
+ <include name = "jbossmq-client.jar"/>
+ <include name = "jpl-pattern-0_3.jar"/>
+ <include name = "jpl-util-0_6b.jar"/>
+ <include name = "jboss-client.jar"/>
+ <include name = "jboss-util.jar"/>
+ </patternset>
+
+ <!-- Additional libs required to compile but not needed for distro -->
+ <patternset id = "compile.libs">
+ <include name = "ejb.jar"/>
+ <include name = "jmxri.jar"/>
+ </patternset>
+
+ <!-- Additional libs required by the EJB verifier -->
+ <patternset id = "verifier.libs">
+ <include name = "verifier.jar"/>
+ <include name = "metadata.jar"/>
+ <include name = "xerces.jar"/>
+ <include name = "parser.jar"/>
+ </patternset>
+
+ <!-- Classpath -->
+ <path id = "classpath">
+ <fileset dir = "${lib.path}">
+ <patternset refid = "dist.libs"/>
+ <patternset refid = "compile.libs"/>
+ <patternset refid = "verifier.libs"/>
+ </fileset>
+ </path>
+
+
+ <target name = "init"></target>
+
+
<!-- =====================================================================
TARGET: dist
@@ -83,30 +81,29 @@
===================================================================== -->
- <target name="dist" depends="compile, copy_dist_libs">
-
- <!-- copy start scripts -->
- <copyfile src = "${etc.home}/Monitor.bat"
- dest = "${dist.bin}/Monitor.bat"
- />
+ <target name="dist" depends="compile">
- <copyfile src = "${etc.home}/InvocationLog.bat"
- dest = "${dist.bin}/InvocationLog.bat"
- />
-
- <copyfile src = "${etc.home}/JNDIBrowser.bat"
- dest = "${dist.bin}/JNDIBrowser.bat"
- />
+ <!-- verify the EJBs -->
+ <java classname = "org.jboss.verifier.Main" fork="true">
+ <classpath refid = "classpath"/>
+ <arg value = "${dist.home}/admin.jar"/>
+ </java>
+
+ <!-- copy start scripts to dist/bin -->
+ <copy todir = "${dist.bin}">
+ <fileset dir = "${etc.home}">
+ <include name = "*.bat"/>
+ <include name = "jndi.properties"/>
+ </fileset>
+ </copy>
+
+ <!-- copy the distro libs to dist/lib -->
+ <copy todir = "${dist.lib}">
+ <fileset dir = "${lib.path}">
+ <patternset refid = "dist.libs"/>
+ </fileset>
+ </copy>
- <copyfile src = "${etc.home}/EJBVerifier.bat"
- dest = "${dist.bin}/EJBVerifier.bat"
- />
-
- <!-- need name service config info -->
- <copyfile src = "${etc.home}/jndi.properties"
- dest = "${dist.bin}/jndi.properties"
- />
-
</target>
@@ -116,85 +113,55 @@
===================================================================== -->
- <target name="compile" depends="copy_src">
-
+ <target name="compile" depends="core_directories">
+
+ <!-- copy sources to dist/src where they are compiled from -->
+ <copy todir = "${dist.src}">
+ <fileset dir = "${src.home}">
+ <include name = "**"/>
+ </fileset>
+ </copy>
+
<!-- generate EJB classes with EJBDoclet -->
<javadoc packagenames = "org.jboss.admin.beans"
- sourcepath = "${dist.src}"
- destdir = "${dist.src}"
- doclet = "ejbdoclet.EJBDoclet"
- docletpath = "${lib.path}/ejbdoclet.jar"
- classpath = "${cp}"
- additionalparam="-name Foo"
+ sourcepath = "${dist.src}">
+
+ <classpath refid = "classpath"/>
+ <doclet name = "ejbdoclet.EJBDoclet"
+ path = "${lib.path}/ejbdoclet.jar">
+
+ <param name = "-name" value = "JBossAdmin"/>
+ <param name = "-d" value = "${dist.src}"/>
+ <param name = "-encoding" value = "UTF-8"/>
+ </doclet>
+ </javadoc>
+
+ <!-- move the generated ejb-jar.xml to META-INF -->
+ <move file = "${dist.src}/ejb-jar.xml"
+ todir = "${dist.classes}/META-INF"
/>
-
+
<!-- compile all Java files -->
<javac destdir="${dist.classes}"
srcdir="${dist.src}"
- classpath="${cp}"
debug="${debug.mode}"
optimize="${optimize.mode}"
- deprecation="${deprecation.mode}"
- />
+ deprecation="${deprecation.mode}">
+
+ <classpath refid = "classpath"/>
+ </javac>
+
+ <!-- package the EJBs -->
+ <jar jarfile = "${dist.home}/admin.jar"
+ basedir = "${dist.classes}"
+ includes = "org/jboss/admin/interfaces/*.class,
+ org/jboss/admin/beans/*.class,
+ META-INF/*.xml"
+ />
</target>
-<!-- =====================================================================
-
- TARGET: copy_src
-
- Copies the sources from the local work directory to the
- distributable source directory (dist.src property).
-
- ===================================================================== -->
-
- <target name="copy_src" depends="core_directories">
- <copydir src="${src.home}"
- dest="${dist.src}"
- />
- </target>
-
-
-<!-- =====================================================================
-
- TARGET: copy_dist_libs
-
- Copies the required libraries for the distributable to the
- distro lib directory (dist.lib property).
-
- ===================================================================== -->
- <target name="copy_dist_libs" depends="core_directories">
-
- <copyfile src = "${lib.path}/${JMS.lib}"
- dest = "${dist.lib}/${JMS.lib}"
- />
-
- <copyfile src = "${lib.path}/${JTA.lib}"
- dest = "${dist.lib}/${JTA.lib}"
- />
-
- <copyfile src = "${lib.path}/${JNP.lib}"
- dest = "${dist.lib}/${JNP.lib}"
- />
-
- <copyfile src = "${lib.path}/${SPY.lib}"
- dest = "${dist.lib}/${SPY.lib}"
- />
-
- <copyfile src = "${lib.path}/${PTRN.lib}"
- dest = "${dist.lib}/${PTRN.lib}"
- />
-
- <copyfile src = "${lib.path}/${UTIL.lib}"
- dest = "${dist.lib}/${UTIL.lib}"
- />
-
- <copyfile src = "${lib.path}/${JBUTIL.lib}"
- dest = "${dist.lib}/${JBUTIL.lib}"
- />
-
- </target>
<!-- =====================================================================
@@ -202,15 +169,16 @@
TARGET: core_directories
===================================================================== -->
- <target name="core_directories" depends="init">
+ <target name="core_directories">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.src}"/>
- <mkdir dir="${dist.classes}"/>
- <mkdir dir="${dist.lib}"/>
- <mkdir dir="${dist.docs}"/>
- <mkdir dir="${dist.apidocs}"/>
- <mkdir dir="${dist.bin}"/>
+ <mkdir dir = "${dist.home}"/>
+ <mkdir dir = "${dist.src}"/>
+ <mkdir dir = "${dist.classes}"/>
+ <mkdir dir = "${dist.classes}/META-INF"/>
+ <mkdir dir = "${dist.lib}"/>
+ <mkdir dir = "${dist.docs}"/>
+ <mkdir dir = "${dist.apidocs}"/>
+ <mkdir dir = "${dist.bin}"/>
</target>
@@ -229,8 +197,8 @@
TARGET: clean
===================================================================== -->
- <target name="clean" depends="init">
- <deltree dir="${dist.home}"/>
+ <target name="clean">
+ <delete dir="${dist.home}"/>
</target>
</project>