psmith 2004/06/16 19:03:53
Modified: . build.xml
Log:
This change adds a Web start specific build feature. If you don't use the webstart
target,
this build file works as expected.
The Web start build excludes the JMSReceiver + DBReceiver from the core jar, and
places it in a separate
one. IT also prompts you for the certificate to sign with, which I use and
specified in my local build.properties file,
but then this could be used if anyone else in the team needed to sign the jar with
their own.
Revision Changes Path
1.106 +49 -3 logging-log4j/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/logging-log4j/build.xml,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- build.xml 9 Jun 2004 09:29:17 -0000 1.105
+++ build.xml 17 Jun 2004 02:03:53 -0000 1.106
@@ -42,7 +42,10 @@
<!-- The jar file that the jar-chainsaw task will generate -->
<property name="log4j-chainsaw.jar" value="log4j-chainsaw-${version}.jar"/>
-
+
+ <!-- When building a Java Web Start distribution of Chainsaw, some Receivers with
external dependencies need to be packaged into a seperate Jar -->
+ <property name="webstart-dependant-receivers.jar"
value="webstart-dependant-receivers.jar-${version}.jar"/>
+
<!-- The jar file that the jar-lf5 task will generate -->
<property name="log4j-lf5.jar" value="log4j-lf5-${version}.jar"/>
@@ -498,7 +501,8 @@
${stem}/plugins/*.class,
${stem}/config/*.class"
excludes="**/UnitTest**, ${stem}/**/*BeanInfo.class">
-
+ <exclude name="**/JMSReceiver*" if="webstart"/>
+ <exclude name="**/DBReceiver*" if="webstart"/>
<manifest>
<attribute name="Manifest-version" value="1.0"/>
<section name="org/apache/log4j/">
@@ -572,7 +576,9 @@
${stem}/chainsaw/icons/*.jpg,
${stem}/chainsaw/icons/LICENCE"
excludes="**/UnitTest**">
-
+ <!-- we need to exclude the JMS + DB Receiver BeanInfo for webstart purposes
-->
+ <exclude name="**/JMS*BeanInfo.class" if="webstart" />
+ <exclude name="**/DB*BeanInfo.class" if="webstart" />
<manifest>
<attribute name="Manifest-version" value="1.0"/>
<section name="org/apache/log4j/">
@@ -616,6 +622,46 @@
</jar>
</target>
+ <!-- ================================================================= -->
+ <!-- These targets are for when we need to create a Java Web start distribution
of Chainsaw -->
+ <!-- ================================================================= -->
+
+ <target name="webstart-dependant-receivers.jar" depends="build">
+ <delete>
+ <fileset dir="${jar.dest}">
+ <include name="${webstart-dependant-receivers.jar}"/>
+ </fileset>
+ </delete>
+
+ <jar jarfile="${jar.dest}/${webstart-dependant-receivers.jar}"
basedir="${javac.dest}"
+ includes="${stem}/**/JMSReceiver*.class, ${stem}/**/DBReceiver*.class">
+ <manifest>
+ <attribute name="Manifest-version" value="1.0"/>
+ <section name="org/apache/log4j/">
+ <attribute name="Implementation-Title" value="log4j"/>
+ <attribute name="Implementation-Version" value="${version}"/>
+ <attribute name="Implementation-Vendor" value="Apache Software
Foundation"/>
+ </section>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="webstart" >
+ <property name="webstart" value="true"/>
+ <antcall target="jar"/>
+ <antcall target="webstart-dependant-receivers.jar"/>
+
+ <input
+ message="Please enter key password:"
+ addproperty="keypass"
+ />
+ <signjar verbose="false" keystore="${keystore}" alias="${alias}"
storepass="${storepass}" keypass="${keypass}" >
+ <fileset dir=".">
+ <include name="*.jar"/>
+ </fileset>
+ </signjar>
+ </target>
+
<!-- ================================================================= -->
<!-- This target builds the javadoc files. -->
<!-- ================================================================= -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]