User: stevensa
Date: 02/09/30 13:20:07
Modified: core build.xml
Log:
Override the build.lib.dir instead of jar.file. You neverknow, we might want to
rename it one day.
Added the rest of my changes, to use a pre-built copy when sources aren't available.
Revision Changes Path
1.11 +72 -17 xdoclet/core/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/build.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- build.xml 30 Sep 2002 19:23:40 -0000 1.10
+++ build.xml 30 Sep 2002 20:20:06 -0000 1.11
@@ -66,8 +66,7 @@
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
- <target name="prepare" depends="init,build-xjavadoc">
-
+ <target name="prepare" depends="init,build-xjavadoc,copy-xjavadoc">
<mkdir dir="${core.build.dir}" />
<mkdir dir="${core.classes.dir}"/>
@@ -79,22 +78,35 @@
<fileset dir="${core.src.dir}" includes="**/*.xdt" />
<fileset dir="${core.src.dir}" includes="META-INF/**/*" />
</copy>
-
</target>
<!-- =================================================================== -->
<!-- Builds xjavadoc -->
<!-- =================================================================== -->
<target name="build-xjavadoc" if="xjavadoc.build.needed">
- <!-- build xjavadoc -->
- <echo message="XJavadoc sources are available and newer than xjavadoc.jar.
Building xjavadoc..."/>
+ <mkdir dir="${dist.dir}" />
<mkdir dir="${dist.lib.dir}"/>
+
+ <!-- build xjavadoc -->
+ <echo message="XJavaDoc sources are available and newer than xjavadoc.jar.
Building xjavadoc..."/>
<ant dir="${xjavadoc.dir}" target="jar" inheritAll="false">
- <property name="jar.file" value="${dist.lib.dir}/xjavadoc.jar"/>
+ <property name="build.lib.dir" value="${dist.lib.dir}"/>
</ant>
</target>
<!-- =================================================================== -->
+ <!-- Use local xjavadoc jar if no sources available -->
+ <!-- =================================================================== -->
+ <target name="copy-xjavadoc" unless="xjavadoc.build.needed">
+ <mkdir dir="${dist.dir}" />
+ <mkdir dir="${dist.lib.dir}"/>
+
+ <!-- use pre-built xjavadoc -->
+ <echo message="XJavaDoc sources are not available. Using existing
xjavadoc.jar"/>
+ <copy file="${lib.dir}/xjavadoc.jar" todir="${dist.lib.dir}"
overwrite="false"/>
+ </target>
+
+ <!-- =================================================================== -->
<!-- Cleans xjavadoc -->
<!-- =================================================================== -->
<target name="clean-xjavadoc" if="xjavadoc.build.needed">
@@ -134,7 +146,6 @@
<!-- Beautify the code -->
<!-- =================================================================== -->
<target name="beautify" depends="prepare">
-
<taskdef name="pretty" classname="org.acm.seguin.ant.Pretty"
classpath="${lib.dir}/prettyprinter.jar"/>
@@ -143,14 +154,12 @@
<include name="**/*.java" />
</fileset>
</pretty>
-
</target>
<!-- =================================================================== -->
<!-- Compiles the source code -->
<!-- =================================================================== -->
<target name="compile" depends="beautify">
-
<mkdir dir="${modules.all-src.dir}"/>
<copy todir="${modules.all-src.dir}">
<fileset dir="${core.src.dir}">
@@ -175,16 +184,66 @@
<include name="xdoclet/template/**/*.java"/>
<include name="xdoclet/util/**/*.java"/>
</javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Check the source code for i18n -->
+ <!-- =================================================================== -->
+ <!--target name="i18ncheck" depends="beautify"-->
+ <target name="i18ncheck">
+ <mkdir dir="${modules.all-src.dir}"/>
+ <copy todir="${modules.all-src.dir}">
+ <fileset dir="${core.src.dir}">
+ <include name="**/*.java" />
+ <!-- exclude name="**/*Messages.java"/ -->
+ </fileset>
+ <filterset refid="xdoclet.filters"/>
+ </copy>
+ <mkdir dir="${core.i18ncheck.dir}"/>
+ <!-- first we do the Messages files *without* the i18n checking, since they
only contain the bundle key strings -->
+ <!-- we need to do this because, despite excluding them later, they'd still
get done because of class dependencies -->
+ <javac
+ destdir="${core.i18ncheck.dir}"
+ classpathref="core.class.path"
+ fork="yes"
+ executable="C:\Program Files\netbeans\bin\fastjavac\fastjavac.exe"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}"
+ nowarn="${compile.nowarn}"
+ srcdir="${modules.all-src.dir}"
+ >
+ <include name="xdoclet/**/*Messages.java"/>
+ </javac>
+ <!-- then we do everything else *with* the i18n checking -->
+ <javac
+ destdir="${core.i18ncheck.dir}"
+ classpathref="core.class.path"
+ fork="yes"
+ executable="C:\Program Files\netbeans\bin\fastjavac\fastjavac.exe"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}"
+ nowarn="${compile.nowarn}"
+ srcdir="${modules.all-src.dir}"
+ >
+ <compilerarg value="-noi18n"/>
+ <include name="xdoclet/*.java"/>
+ <include name="xdoclet/ant/**/*.java"/>
+ <include name="xdoclet/loader/**/*.java"/>
+ <include name="xdoclet/tagshandler/**/*.java"/>
+ <include name="xdoclet/template/**/*.java"/>
+ <include name="xdoclet/util/**/*.java"/>
+ <exclude name="xdoclet/**/*Messages.java"/>
+ </javac>
</target>
<!-- =================================================================== -->
<!-- Creates the jar archives -->
<!-- =================================================================== -->
<target name="jar" depends="compile,externalizer">
-
<jar jarfile="${xdoclet.jar}" basedir="${core.classes.dir}"/>
-
</target>
<!-- =================================================================== -->
@@ -195,7 +254,6 @@
<delete dir="${core.build.dir}"/>
<delete dir="${dist.src.dir}"/>
<delete dir="${dist.lib.dir}"/>
-
</target>
<!-- =================================================================== -->
@@ -227,15 +285,12 @@
<echo message="Generating message bundle files for core..."/>
<xdoclet destdir="${core.classes.dir}">
-
<fileset dir="${core.src.dir}">
<include name="**/*Messages.java" />
</fileset>
- <externalizer tagName="msg:bundle" keyParamName="id"
valueParamName="msg"/>
-
+ <externalizer tagName="msg.bundle" keyParamName="id"
valueParamName="msg"/>
</xdoclet>
-
</target>
<!-- =================================================================== -->
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel