db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r429002 - /db/ojb/trunk/build.xml
Date Sat, 05 Aug 2006 14:15:32 GMT
Author: arminw
Date: Sat Aug  5 07:15:31 2006
New Revision: 429002

URL: http://svn.apache.org/viewvc?rev=429002&view=rev
Log:
- merge with the forrest stuff from OJB_1_0_RELEASE branch. The 1.0.x branch supports Forrest
0.7.
- remove/comment out the OTM-api related stuff (OTM is no longer supported)

Modified:
    db/ojb/trunk/build.xml

Modified: db/ojb/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/build.xml?rev=429002&r1=429001&r2=429002&view=diff
==============================================================================
--- db/ojb/trunk/build.xml (original)
+++ db/ojb/trunk/build.xml Sat Aug  5 07:15:31 2006
@@ -763,34 +763,42 @@
                 </not>
             </condition>
         </fail>
-        <fail message="Please set the FORREST_HOME environment variable to the 'src/core'
subdirectory of your Forrest installation. If you don't have yet installed Forrest, you can
get it from http://forrest.apache.org.">
+        <fail message="To generate OJB docs, please set the environment variables as described
in Forrest documentation.
+         If you don't have yet installed Forrest, you can get it from http://forrest.apache.org.">
             <condition>
                 <not>
                     <isset property="env.FORREST_HOME"/>
                 </not>
             </condition>
         </fail>
-        <available classname="org.apache.xml.resolver.Resolver" property="commons.resolver.available"/>
-        <fail unless="commons.resolver.available" message="Please make the Apache XML
Commons Resolver library available in the classpath, e.g. by copying the xml-commons-resolver
jar file from the 'tools/ant/lib' subdirectory of your Forrest installation (${env.FORREST_HOME}/tools/ant/lib)
into the lib subdirectory of your Ant installation (${env.ANT_HOME}/lib)."/>
-    </target>
+        <fail message="Please check Forrest enviroment variables (e.g. between 0.6 and
0.7 these values change).">
+            <condition>
+                <not>
+                    <isset property="env.FORREST_HOME"/>
+                </not>
+            </condition>
+        </fail>
+        <fail message="Please make the Apache XML Commons Resolver library available in
the classpath, e.g. by copying the xml-commons-resolver jar file from the 'tools/ant/lib'
subdirectory of your Forrest installation (${env.FORREST_HOME}/tools/ant/lib) into the lib
subdirectory of your Ant installation (${env.ANT_HOME}/lib).">
+            <condition>
+                <not>
+                    <available classname="org.apache.xml.resolver.Resolver"/>
+                </not>
+            </condition>
+        </fail>
 
-    <target name="doc" depends="doc-prepare,javadoc"
-            description="Builds the complete documentation using Forrest">
         <echo message="*** Preparing generation of documentation ..."/>
 
         <delete dir="${build.doc}" failonerror="false"/>
         <mkdir dir="${build.doc}"/>
 
-        <!-- Copy all forrest src stuff to a temporary directoy -->
-        <copy todir="${build.doc}">
-            <fileset dir="${src.forrest}"/>
-        </copy>
-
         <!-- Copy generated javadoc into the forrest structure in the temporary directoy
-->
         <copy todir="${forrest.javadoc.destdir}">
             <fileset dir="${build.javadoc}"/>
         </copy>
+    </target>
 
+    <target name="run-forrest"
+        description="Generates the complete site documentation using Forrest">
         <!-- Copy auxiliary documentation src files to the temporary directory -->
         <copy file="${forrest.staticfiles.srcdir}/repository.dtd"
               tofile="${forrest.staticfiles.destdir}/repository.dtd.txt" />
@@ -811,39 +819,56 @@
 	    <copy file="release-notes.txt"
 	          tofile="${forrest.staticfiles.destdir}/release-notes.txt" />
 
-        <!-- Currently we have to run the forrest command because there is no ant
-             target to use. This means that we have to deal with batch files/scripts
-             which is not exactly fun in ant: we have to check what type of OS we
-             have and use the appropriate exec call -->
-        <condition property="windows.with.cmd">
-            <or>
-                <equals arg1="${os.name}" arg2="Windows NT"/>
-                <equals arg1="${os.name}" arg2="Windows 2000"/>
-                <equals arg1="${os.name}" arg2="Windows XP"/>
-            </or>
-        </condition>
-        <condition property="windows.with.command">
-            <or>
-                <equals arg1="${os.name}" arg2="Windows 95"/>
-                <equals arg1="${os.name}" arg2="Windows 98"/>
-            </or>
-        </condition>
-        <condition property="not.windows">
-            <and>
-                <not>
-                    <isset property="windows.with.cmd"/>
-                </not>
-                <not>
-                    <isset property="windows.with.command"/>
-                </not>
-            </and>
-        </condition>
-    	<ant antfile="${env.FORREST_HOME}/forrest.build.xml"
+        <mkdir dir="${forrest.staticfiles.destdir}/dtdx"/>
+
+        <!-- ** workaround part 1**
+            This is needed to use a plugin which generates a html file of .dtd
+            files. The plugin only work with resources in forrest classpath. This
+            should be fixed in next version of forrest
+        -->
+        <echo>Workaround: Copy repository.dtd to a Forrest installation directory</echo>
+        <copy file="${forrest.staticfiles.srcdir}/repository.dtd"
+              todir="${env.FORREST_HOME}/main/webapp/resources/schema/dtd"/>
+
+        <!-- Do temporary copy OJB's repository.dtd to Forrest directory, will be removed
at end of process -->
+
+        <!-- Copy all forrest src stuff to a temporary directoy -->
+        <copy todir="${build.doc}">
+            <fileset dir="${src.forrest}"/>
+        </copy>
+        <!-- clean forrest build -->
+        <ant antfile="${env.FORREST_HOME}/main/forrest.build.xml"
+    		 dir="${build.doc}"
+    		 inheritall="false"
+    		 target="clean">
+    		<property name="forrest.home" value="${env.FORREST_HOME}"/>
+    	</ant>
+        <!-- Run, Forrest! Run! :-) -->
+        <echo>
+            ** Start running Forrest in '${forrest-mode}' mode **
+        </echo>
+        <ant antfile="${env.FORREST_HOME}/main/forrest.build.xml"
     		 dir="${build.doc}"
     		 inheritall="false"
-    		 target="site">
+    		 target="${forrest-mode}">
     		<property name="forrest.home" value="${env.FORREST_HOME}"/>
     	</ant>
+
+        <!-- ** workaround part 2 **
+            This is needed to use a plugin which generates a html file of .dtd
+            files. The plugin only work with resources in forrest classpath. This
+            should be fixed in next version of forrest
+        -->
+        <delete file="${env.FORREST_HOME}/main/webapp/resources/schema/dtd/repository.dtd"/>
+
+    </target>
+
+    <target name="doc" depends="javadoc,doc-prepare"
+            description="Generates complete API- and site documentation">
+        <!-- start forrest in "site" mode -->
+        <antcall target="run-forrest">
+            <param name="forrest-mode" value="site"/>
+        </antcall>
         <!-- Finally we can copy the generated documentation to its designated place -->
         <mkdir dir="${doc}"/>
         <copy todir="${doc}">
@@ -851,6 +876,35 @@
         </copy>
     </target>
 
+    <!--
+    Specific developer target, sync Forrest webApp directory with OJB's
+    Forrest documentation files. Use this target in combination with
+    target 'dev-doc-forrest'
+    -->
+    <target name="dev-doc-sync" depends=""
+            description="dev-target: Copy changed doc files to forrest src directory">
+        <echo>Copy changed doc files to Forrest working directory</echo>
+        <copy todir="${build.doc}">
+            <fileset dir="${src.forrest}"/>
+        </copy>
+    </target>
+
+    <!--
+    Specific developer target, run Forrest as webApp to render OJB's
+    Forrest documentation files just in time. Use this target in
+    combination with target 'dev-doc-sync' to copy changed files to
+    Forrest webApp
+    -->
+    <target name="dev-doc-forrest" depends=""
+            description="dev-target: Run Forrest as webApp">
+        <echo message="Start Forrest as webApp (default is http://localhost:8888/)
+        use target 'dev-doc-sync' to sync changes in forrest .xml files" />
+        <!-- start forrest in "site" mode -->
+        <antcall target="run-forrest">
+            <param name="forrest-mode" value="run"/>
+        </antcall>
+    </target>
+
     <!-- ================================================================== -->
     <!-- Build the API JavaDocs                                             -->
     <!-- ================================================================== -->
@@ -1323,7 +1377,7 @@
     <!-- ================================================================== -->
     <target name="failover"
             description="db failover tests">
-        <java fork="yes" classname="org.apache.ojb.broker.PerformanceJdbcFailoverTest"
+        <java fork="yes" classname="org.apache.ojb.compare.PerformanceJdbcFailoverTest"
               dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
             <classpath refid="runtime-classpath"/>
             <arg value="10000"/> <!-- number of operations per run-->
@@ -1572,54 +1626,6 @@
         </ojbdoclet>
     </target>
 
-	<!-- ================================================================== -->
-	<!-- Generate the JCA adapter for the OTM					            -->
-	<!-- ================================================================== -->
-	<target name="jca-compile">
-		<javac srcdir="${build.srcjca}" destdir="${build.destjca}" excludes="${excludes}"
-			   debug="on" deprecation="${deprecation}">
-			<classpath refid="compilation-classpath" />
-		</javac>
-	</target>
-
-	<target name="rar" depends="jca-compile" description="Builds the RAR for the OTM in optimized
mode">
-		<ant target="jar"/>
-		<ant target="rar-internal"/>
-	</target>
-
-	<target name="rar-debug" depends="jca-compile" description="Builds the RAR for the OTM
in debug mode">
-		<ant target="jar-debug"/>
-		<ant target="rar-internal"/>
-	</target>
-
-	<target name="rar-internal">
-		<delete file="${dist}/ojb-jca.rar"/>
-		<mkdir dir="${build.destjca}/META-INF/"/>
-		<copy file="${src.dir}/etc/MANIFEST.MF" todir="${build.destjca}/META-INF/"/>
-		<copy file="${src.dir}/etc/ra.xml" todir="${build.destjca}/META-INF/"/>
-		<echo message="${build.destjca}"/>
-		<jar jarfile="${dist}/ojb-jca.rar">
-			<fileset dir="${build.destjca}" excludes=".dependency-info/**"/>
-			<fileset dir="${lib}">
-				<exclude name="j2ee.jar"/>
-				<exclude name="ant.jar"/>
-				<exclude name="optional.jar"/>
-				<exclude name="antlr_compiletime.jar"/>
-				<exclude name="servlet.jar"/>
-				<exclude name="jboss-system.jar"/>
-				<exclude name="jboss-common.jar"/>
-				<exclude name="jboss-jmx.jar"/>
-				<exclude name="jcs.jar"/>
-				<exclude name="xdoclet.jar"/>
-				<exclude name="xalan.jar"/>
-				<exclude name="junit.jar"/>
-			</fileset>
-			<fileset dir="${dist}">
-				<include name="${archive}.jar"/>
-			</fileset>
-		</jar>
-	</target>
-
 <!-- ================================================================== -->
 <!-- emma coverage, on the-fly-instrumentation          				-->
 <!-- see http://emma.sourceforge.net                                    -->
@@ -1675,24 +1681,74 @@
     </emmajava>
   </target>
 
-   <!-- coverage for otm-api -->
-  <target name="coverage_otm" depends="coverage-init,prepare-testdb"
-      description="Code coverage test for OTM layer">
-    <emmajava enabled="true" 
-        classname="org.apache.ojb.otm.AllTests"
-    	libclasspathref="emma.lib"
-        fullmetadata="yes"
-        filter="org.apache.ojb.broker.*"
-		sourcepath="${src.java}"
-		dir="${build.test}/ojb"
-        classpathref="runtime-classpath">
-      <txt outfile="${coverage.dir}_otm/coverage.txt" />
-      <html outfile="${coverage.dir}_otm/coverage.html"  />
-    </emmajava>
-  </target>
 
     <!-- ================================================================== -->
     <!-- End of targets                                                     -->
     <!-- ================================================================== -->
+
+
+    <!-- coverage for otm-api -->
+  <!--<target name="coverage_otm" depends="coverage-init,prepare-testdb"-->
+      <!--description="Code coverage test for OTM layer">-->
+    <!--<emmajava enabled="true" -->
+        <!--classname="org.apache.ojb.otm.AllTests"-->
+    	<!--libclasspathref="emma.lib"-->
+        <!--fullmetadata="yes"-->
+        <!--filter="org.apache.ojb.broker.*"-->
+		<!--sourcepath="${src.java}"-->
+		<!--dir="${build.test}/ojb"-->
+        <!--classpathref="runtime-classpath">-->
+      <!--<txt outfile="${coverage.dir}_otm/coverage.txt" />-->
+      <!--<html outfile="${coverage.dir}_otm/coverage.html"  />-->
+    <!--</emmajava>-->
+  <!--</target>-->
+
+    <!-- ================================================================== -->
+	<!-- Generate the JCA adapter for the OTM					            -->
+	<!-- ================================================================== -->
+	<!--<target name="jca-compile">-->
+		<!--<javac srcdir="${build.srcjca}" destdir="${build.destjca}" excludes="${excludes}"-->
+			   <!--debug="on" deprecation="${deprecation}">-->
+			<!--<classpath refid="compilation-classpath" />-->
+		<!--</javac>-->
+	<!--</target>-->
+<!---->
+	<!--<target name="rar" depends="jca-compile" description="Builds the RAR for the OTM
in optimized mode">-->
+		<!--<ant target="jar"/>-->
+		<!--<ant target="rar-internal"/>-->
+	<!--</target>-->
+<!---->
+	<!--<target name="rar-debug" depends="jca-compile" description="Builds the RAR for
the OTM in debug mode">-->
+		<!--<ant target="jar-debug"/>-->
+		<!--<ant target="rar-internal"/>-->
+	<!--</target>-->
+<!---->
+	<!--<target name="rar-internal">-->
+		<!--<delete file="${dist}/ojb-jca.rar"/>-->
+		<!--<mkdir dir="${build.destjca}/META-INF/"/>-->
+		<!--<copy file="${src.dir}/etc/MANIFEST.MF" todir="${build.destjca}/META-INF/"/>-->
+		<!--<copy file="${src.dir}/etc/ra.xml" todir="${build.destjca}/META-INF/"/>-->
+		<!--<echo message="${build.destjca}"/>-->
+		<!--<jar jarfile="${dist}/ojb-jca.rar">-->
+			<!--<fileset dir="${build.destjca}" excludes=".dependency-info/**"/>-->
+			<!--<fileset dir="${lib}">-->
+				<!--<exclude name="j2ee.jar"/>-->
+				<!--<exclude name="ant.jar"/>-->
+				<!--<exclude name="optional.jar"/>-->
+				<!--<exclude name="antlr_compiletime.jar"/>-->
+				<!--<exclude name="servlet.jar"/>-->
+				<!--<exclude name="jboss-system.jar"/>-->
+				<!--<exclude name="jboss-common.jar"/>-->
+				<!--<exclude name="jboss-jmx.jar"/>-->
+				<!--<exclude name="jcs.jar"/>-->
+				<!--<exclude name="xdoclet.jar"/>-->
+				<!--<exclude name="xalan.jar"/>-->
+				<!--<exclude name="junit.jar"/>-->
+			<!--</fileset>-->
+			<!--<fileset dir="${dist}">-->
+				<!--<include name="${archive}.jar"/>-->
+			<!--</fileset>-->
+		<!--</jar>-->
+	<!--</target>-->
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message