You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/08/14 06:45:51 UTC
cvs commit: jakarta-avalon-excalibur/baxter build.xml
leif 2002/08/13 21:45:51
Modified: baxter build.xml
Log:
Make the build work if JMX.jar is not installed on the build machine.
Revision Changes Path
1.30 +29 -6 jakarta-avalon-excalibur/baxter/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/baxter/build.xml,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- build.xml 10 Aug 2002 21:14:33 -0000 1.29
+++ build.xml 14 Aug 2002 04:45:51 -0000 1.30
@@ -33,13 +33,36 @@
<target name="main" depends="jar" description="Build the project"/>
<target name="rebuild" depends="clean,main" description="Rebuild the project"/>
- <target name="dependencies" description="Check dependencies" unless="skip.dependencies">
- <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
+ <target name="jmx-warning" unless="jmx.present">
+ <echo>**********************************************</echo>
+ <echo>* JMX MISSING </echo>
+ <echo>* </echo>
+ <echo>* The JMX.jar file could not be located so </echo>
+ <echo>* the Baxter classes could not be compiled. </echo>
+ <echo>**********************************************</echo>
+ </target>
+
+ <!-- Checks the environment for existing resources -->
+ <target name="check-environment">
+ <available property="jmx.present" classname="javax.management.IntrospectionException">
+ <classpath refid="project.class.path"/>
+ </available>
+ </target>
+
+ <target name="dependencies.jmx" if="jmx.present" unless="skip.dependencies">
<ant antfile="${depchecker.prefix}/depchecker.xml" target="checkRequiredFile">
<property name="proj.jar.name" value="jmx.jar"/>
<property name="path" value="${jmx.jar}"/>
</ant>
</target>
+
+ <target name="dependencies.optional"
+ depends="check-environment,dependencies.jmx"
+ description="Checks if dependencies for optional components are present"/>
+
+ <target name="dependencies" depends="dependencies.optional" description="Check dependencies" unless="skip.dependencies">
+ <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkCommon"/>
+ </target>
<target name="dependencies-test" depends="dist-jar, dependencies"
description="Check unit test dependencies" unless="skip.dependencies">
@@ -50,7 +73,7 @@
<!-- Compiles the source code -->
- <target name="compile" depends="dependencies" description="Compiles the source code">
+ <target name="compile" depends="dependencies, jmx-warning" description="Compiles the source code">
<mkdir dir="${build.classes}"/>
@@ -62,7 +85,7 @@
deprecation="${build.deprecation}"
target="1.2">
<classpath refid="project.class.path" />
- <include name="**/*.java"/>
+ <include name="**/*.java" if="jmx.present"/>
</javac>
<!-- copy resources to same location as .class files -->
@@ -94,7 +117,7 @@
deprecation="${build.deprecation}"
target="1.2">
<classpath refid="test.class.path" />
- <include name="**/*.java"/>
+ <include name="**/*.java" if="jmx.present"/>
</javac>
<copy todir="${build.testclasses}">
@@ -140,7 +163,7 @@
</target>
<!-- Creates all the Javadocs -->
- <target name="javadocs" depends="compile" description="Generates the javadocs" unless="skip.javadocs">
+ <target name="javadocs" depends="compile" description="Generates the javadocs" if="jmx.present" unless="skip.javadocs">
<mkdir dir="${dist.javadocs}"/>
<javadoc packagenames="org.apache.*"
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>