db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1824712 - in /db/derby/code/trunk: ./ java/client/ java/drda/ java/drda/org/apache/derby/drda/ java/drda/org/apache/derby/impl/drda/ java/drda/org/apache/derby/loc/drda/ java/engine/ java/engine/org/apache/derby/agg/ java/engine/org/apache...
Date Sun, 18 Feb 2018 22:58:34 GMT
Author: rhillegas
Date: Sun Feb 18 22:58:33 2018
New Revision: 1824712

URL: http://svn.apache.org/viewvc?rev=1824712&view=rev
Log:
DERBY-6945: Simplify the compilation of artifacts so that each jar file is compiled by a single
javac command; commit derby-6945-21-ab-simplifyBuildScripts.diff.

Removed:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/build.xml
    db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/db/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/crypto/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/db/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/io/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/load/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/io/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/mbeans/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/osgi/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/security/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/vti/build.xml
    db/derby/code/trunk/java/testing/org/apache/derby/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/multi/stress/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/management/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/perf/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/unit/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/jdbc/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/loc/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml
Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/client/build.xml
    db/derby/code/trunk/java/drda/build.xml
    db/derby/code/trunk/java/engine/build.xml
    db/derby/code/trunk/java/shared/build.xml
    db/derby/code/trunk/java/testing/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nast1.jar
    db/derby/code/trunk/java/tools/build.xml

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Sun Feb 18 22:58:33 2018
@@ -48,12 +48,12 @@
 
   <target
       name="buildsource"
-      depends="checkCompilerLevel,init,prebuild,setCompilerProperties,felixStubs,engine,storeless,client,tools,drda,optional,runner,build,versioninfo,localeinfo,binscripts"
+      depends="checkCompilerLevel,init,prebuild,setCompilerProperties,felixStubs,shared,engine,storeless,client,tools,drda,optional,runner,build,versioninfo,localeinfo,binscripts"
       description="Compile the product source (does not build the tests)."
   />
   <target
       name="all"
-      depends="buildsource,demo,testing,pptesting,runmessagecheck"
+      depends="buildsource,demo,testing,runmessagecheck"
       description="Compile all of the source, including tests as well as production code."
   />
 
@@ -558,7 +558,6 @@
   
   <target name="drda" depends="engine">
     <ant dir="${derby.drda.src.dir}"/>
-    <ant dir="${derby.tools.src.dir}" target="tools_run"/>
   </target>
 
   <target name="client" depends="engine,shared">
@@ -592,11 +591,6 @@
 
   </target>
 
-  <!-- Build the package private tests -->
-  <target name="pptesting" depends="testing">
-    <ant dir="${derby.testing.src.dir}/org/apache/derby"/>
-  </target>
-
   <!-- Run the MessageBundleTest -->
   <target name="runmessagecheck">
     <java   fork="true" 
@@ -1395,7 +1389,7 @@
                    org/apache/derby/loc/m??_en.properties,
                    org/apache/derby/impl/sql/catalog/metadata_net.properties,
                    org/apache/derby/info/engine/info.properties"
-         excludes="**/D_*,**/odbcmeta.done"
+         excludes="**/D_*,**/odbcmeta.done,**/*Test.class,**/_Suite.class"
          compress="true"
          filesonly="true"
          manifest="${derby.jar.dir}/lists/smf.mf">
@@ -1628,7 +1622,9 @@
          includes="org/apache/derby/client/**,
                    org/apache/derby/info/client/info.properties,
                    org/apache/derby/loc/clientmessages*.properties"
-         excludes="org/apache/derby/loc/clientmessages_qq_PP_testOnly.properties"
+         excludes="org/apache/derby/loc/clientmessages_qq_PP_testOnly.properties,
+                   **/*Test.class,
+                   **/_Suite.class"
     	 manifest="${derby.jar.dir}/lists/smfclient.mf">
       <fileset dir="${derby.jar.dir}/lists"
                includes="META-INF/**"/>

Modified: db/derby/code/trunk/java/client/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/build.xml (original)
+++ db/derby/code/trunk/java/client/build.xml Sun Feb 18 22:58:33 2018
@@ -60,33 +60,13 @@
       proceed="${proceed}"
       verbose="${verbose}"
       srcdir="${derby.client.src.dir}"
-      includes="**/*.java"
-      excludes="**/*42.java"
       destdir="${out.dir}">
       <compilerarg value="-Xlint"/>
    </javac>
 </target> 
 
-<target name="compile_jdbc42">
-    <javac
-      source="${min.version}"
-      target="${min.version}"
-      nowarn="on"
-      debug="${debug}" debuglevel="${debuglevel}"
-      depend="${depend}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      proceed="${proceed}"
-      verbose="${verbose}"
-      srcdir="${derby.client.src.dir}"
-      includes="**/*42.java" 
-      destdir="${out.dir}">
-      <compilerarg value="-Xlint"/>
-   </javac>
-</target> 
-  
 <!-- default target  -->
-  <target name="client" depends="compile, compile_jdbc42"/>
+  <target name="client" depends="compile"/>
 
 </project>
 

Modified: db/derby/code/trunk/java/drda/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/build.xml (original)
+++ db/derby/code/trunk/java/drda/build.xml Sun Feb 18 22:58:33 2018
@@ -33,6 +33,7 @@
 
   <!-- Significant dirs -->
   <property file="${properties.dir}/dirs.properties"/>
+  <property file="${properties.dir}/drdadirs.properties"/>
 
   <!-- Compiler settings -->
   <property file="${properties.dir}/defaultcompiler.properties"/>
@@ -51,9 +52,36 @@
 <!--             ============ Begin Targets ==============                -->
  
   <target name="drda" >
-    <ant dir="${derby.drda.dir}/impl/drda"/>
-    <ant dir="${derby.drda.dir}/drda"/>
-    <ant dir="${derby.drda.dir}/loc/drda"/>
+  	<javac
+      source="${min.version}"
+      target="${min.version}"
+      nowarn="on"
+      debug="${debug}" debuglevel="${debuglevel}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.drda.src.dir}"
+      destdir="${out.dir}">
+      <compilerarg value="-Xlint:unchecked"/>
+      <classpath>
+        <pathelement location="${servlet24}"/>
+      </classpath>
+    </javac>
+
+    <copy
+       todir="${out.dir}/${derby.dir}/drda/"
+       file="${derby.drda.dir}/drda/server.policy"
+    />
+
+    <copy todir="${drdaloc.dir}" flatten="true">
+      <fileset dir="${derby.drda.locales.dir}">
+        <include name="messages*.properties"/>
+        <include name="servlet*.properties"/>
+      </fileset>
+    </copy>
+
     <antcall target="odbcMeta"/>
   </target>
 

Modified: db/derby/code/trunk/java/engine/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/build.xml (original)
+++ db/derby/code/trunk/java/engine/build.xml Sun Feb 18 22:58:33 2018
@@ -50,28 +50,97 @@
 
 <!--             ============ Begin Targets ==============                -->
  
-  <target name="engine"
+  <target name="engine" depends="parser"
           description="Build Derby engine">
-    <ant dir="${derby.engine.dir}/authentication"/>
-    <ant dir="${derby.engine.dir}/security"/>
-    <ant dir="${derby.engine.dir}/io"/>
-    <ant dir="${derby.engine.dir}/iapi"/>
-    <ant dir="${derby.engine.dir}/mbeans"/>
-    <ant dir="${derby.engine.dir}/database"/>
-
-    <ant dir="${derby.engine.dir}/vti"/>
-    <ant dir="${derby.engine.dir}/agg"/>
-    <ant dir="${derby.engine.dir}/impl"/>
-    <ant dir="${derby.engine.dir}/osgi"/>
-    <ant dir="${derby.engine.dir}/catalog"/>   
-    <ant dir="${derby.engine.dir}/diag"/>
-      	<copy todir="${out.dir}/${derby.dir}">
-          <fileset dir="${derby.engine.dir}">
-            <include name="modules.properties"/>
-          </fileset>
-        </copy>
+
+  	<javac
+      source="${min.version}"
+      target="${min.version}"
+      nowarn="on"
+      debug="${debug}" debuglevel="${debuglevel}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.engine.src.dir}:${generated.src.dir}"
+      destdir="${out.dir}">
+      <compilerarg value="-Xlint:unchecked"/>
+      <classpath>
+		    <pathelement location="${osgi}"/>
+      </classpath>
+    </javac>
+
+    <ant dir="${derby.build.src.dir}"/>
+    <ant dir="${derby.locales.dir}"/>
+
+    <copy todir="${out.dir}/${derby.dir}">
+       <fileset dir="${derby.engine.dir}">
+         <include name="modules.properties"/>
+       </fileset>
+    </copy>
+
+    <copy
+      file="${derby.engine.src.dir}/org/apache/derby/impl/jdbc/metadata.properties"
+      tofile="${out.dir}/org/apache/derby/impl/jdbc/metadata.properties"/>
+
+    <copy
+      file="${derby.engine.src.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"
+      tofile="${out.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"/>
+
   </target>
 	
+  <target name="parser" >
+    <ant antfile="${src.dir}/build.xml" target="genParser">
+      <property name="msg" value="Generating SQL parser..."/>
+      <property name="srcroot" value="engine"/>
+      <property name="directory" value="${derby.dir}/impl/sql/compile"/>
+      <property name="rmfiles" value="implparser_rm.files"/>
+      <property name="jjfile" value="sqlgrammar.jj"/>
+      <property name="chkfile" value="SQLParser.java"/>
+      <property name="constantsfile" value="SQLParserConstants"/>
+    </ant>
+
+    <!--
+      The following files were generated:
+
+      CharStream.java
+      ParseException.java
+      SQLParser.java
+      SQLParserConstants.java
+      SQLParserTokenManager.java
+      Token.java
+      TokenMgrError.java
+
+      3 of those files are checked into the codeline:
+
+      CharStream.java
+      ParseException.java
+      Token.java
+
+      We don't want generated code to clash with the checked-in versions. So
+      we delete the conflicting classes here.
+    -->
+    <delete>
+      <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
+        <include name="CharStream.java"/>
+        <include name="ParseException.java"/>
+        <include name="Token.java"/>
+      </fileset>
+    </delete>
+
+    <!-- Reduce the visibility of these files from public to package. -->
+    <replaceregexp match="^public (class|interface)" replace="\1" flags="m">
+      <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
+        <include name="SQLParser.java"/>
+        <include name="SQLParserConstants.java"/>
+        <include name="SQLParserTokenManager.java"/>
+        <include name="TokenMgrError.java"/>
+      </fileset>
+    </replaceregexp>
+
+  </target>
+
 	
 <!--             ============= End Targets ==============                -->
 

Modified: db/derby/code/trunk/java/shared/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/build.xml (original)
+++ db/derby/code/trunk/java/shared/build.xml Sun Feb 18 22:58:33 2018
@@ -62,44 +62,11 @@
       optimize="${optimize}"
       proceed="${proceed}"
       verbose="${verbose}"
-      srcdir="${generated.src.dir}"
+      srcdir="${generated.src.dir}:${derby.shared.src.dir}"
       destdir="${out.dir}">
       <compilerarg value="-Xlint:unchecked"/>
     </javac>
 
-  	<javac
-      source="${min.version}"
-      target="${min.version}"
-      nowarn="on"
-      debug="${debug}" debuglevel="${debuglevel}"
-      depend="${depend}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      proceed="${proceed}"
-      verbose="${verbose}"
-      srcdir="${derby.shared.src.dir}"
-      includes="org/apache/derby/shared/**"
-      destdir="${out.dir}">
-      <include name="org/apache/derby/shared/**"/>
-  	  <exclude name="org/apache/derby/shared/common/sanity/ThreadDump.java"/>
-      <compilerarg value="-Xlint:unchecked"/>
-    </javac>
-  	
-  	<javac
-  	      source="${min.version}"
-  	      target="${min.version}"
-  	      nowarn="on"
-  	      debug="${debug}" debuglevel="${debuglevel}"
-  	      depend="${depend}"
-  	      deprecation="${deprecation}"
-  	      optimize="${optimize}"
-  	      proceed="${proceed}"
-  	      verbose="${verbose}"
-  	      srcdir="${derby.shared.src.dir}"
-  	      destdir="${out.dir}">
-  	    <include name="org/apache/derby/shared/common/sanity/ThreadDump.java"/>
-      <compilerarg value="-Xlint:unchecked"/>
-  	    </javac>
 </target>
   
 

Modified: db/derby/code/trunk/java/testing/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/build.xml (original)
+++ db/derby/code/trunk/java/testing/build.xml Sun Feb 18 22:58:33 2018
@@ -56,6 +56,195 @@
   <target name="testing" 
           description="Build Derby testing files">
 
+    <javac
+      source="${min.version}"
+      target="${min.version}"
+      nowarn="on"
+      debug="${debug}" debuglevel="${debuglevel}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.testing.src.dir}"
+      destdir="${out.dir}">
+      <compilerarg value="-Xlint"/>
+      <classpath>
+        <pathelement path="${junit}"/>
+        <pathelement path="${out.dir}"/>
+      	<pathelement path="${junit}"/>
+        <pathelement path="${lucene_core}"/>
+        <pathelement path="${lucene_a_co}"/>
+        <pathelement path="${lucene_qp}"/>
+        <pathelement path="${json_simple}"/>
+      </classpath>
+   </javac>
+
+   <copy todir="${out.dir}/${derby.testing.functest.dir}/harness">
+     <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/harness" 
+       includes="*.properties"/> 
+   </copy>
+
+   <copy todir="${out.dir}/${derby.testing.functest.dir}/master">
+     <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/master"/>
+   </copy>
+
+   <copy todir="${out.dir}/${derby.testing.functest.dir}/multi/stress">
+     <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/multi/stress"

+       includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/multi/stress/copyfiles.ant"/>

+   </copy>
+
+   <copy todir="${out.dir}/${derby.testing.suites.dir}">
+     <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/suites" includes="*.runall,*.properties,*.exclude,*.policy"/>
+   </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/v1">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/v1"
+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/v1/copyfiles.ant"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/v2">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/v2"
+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/v2/copyfiles.ant"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/ImportExport">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/ImportExport"
+        includes="*.del,*.txt,*.dat"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/ResultSetStream">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/ResultSetStream"
+        includes="*.asc,*.del,*.txt,*.utf,*.gif"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/ConnectionMethods">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/ConnectionMethods"
+        includes="*.txt"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/serializedDataSources">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/serializedDataSources"
+        includes="*.ser"/>
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/testData/Derby6587">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData/Derby6587"
+        includes="*.csv"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/compatibility">
+        <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/compatibility"
+          includes="*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/demo">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/demo"
+               includes="*.sql,*.properties"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/derbynet">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/derbynet"

+        includes="*.inc,*.policy,*.properties,*.sql,*.tests,*.key"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/engine">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/engine"
+        includes="*.sql,*.properties,*.subsql,*.policy,*.jar,*.tstlog,xmlTestFiles/*"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/i18n">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/i18n"

+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/i18n/copyfiles.ant"/>
 
+    </copy>
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/i18n/data">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/i18n/data"

+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/i18n/data/copyfiles.ant"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/jdbc4">
+        <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbc4"
+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbc4/copyfiles.ant"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/jdbcapi">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbcapi"

+        includes="*.gif,*.properties,*.sql,*.utf,*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/lang">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/lang"

+        includes="*.sql,*.properties,*.subsql,*.policy,*.jar,*.dat,*.tstlog,*.trace,xmlTestFiles/*"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/largedata">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/largedata"

+        includes="*.sql,*.properties,*.subsql,*.policy,*.jar,*.dat,*.tstlog,xmlTestFiles/*"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/management">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/management"
+               includes="jmx.*,*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/memorydb">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/memorydb"
+               includes="*.sql,*.properties"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/nist">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/nist"

+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/nist/copyfiles.ant"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/perf">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/perf"

+        includesfile="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/perf/copyfiles.ant"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/replicationTests">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/replicationTests"
includes="*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/store">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/store"

+        includes="*.sql,*.properties,*.subsql,*.policy,*.jar,*.view,*banner,*.data"/>
 
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/storetests">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/storetests"

+        includes="*.sql,*.properties,*.policy"/>  
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/tools">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/tools"

+        includes="*.jar,*.sql,*.properties,*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/tests/unit">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/unit"

+        includes="*.properties,*.policy"/>  
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.functest.dir}/util">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/util" 
+        includes="*.sql,*.properties,*.policy"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.system.dir}/mailjdbc/schema">
+	   <fileset dir="${derby.testing.src.dir}/${derby.testing.system.dir}/mailjdbc/schema"/>
+	</copy>
+	<copy todir="${out.dir}/${derby.testing.system.dir}/mailjdbc/">
+	   <fileset dir="${derby.testing.src.dir}/${derby.testing.system.dir}/mailjdbc" 
+	            includes="*.properties"/>  
+    </copy>
+
+	<copy todir="${out.dir}/${derby.testing.system.dir}/oe/schema">
+	   <fileset dir="${derby.testing.src.dir}/${derby.testing.system.dir}/oe/schema"/>
+    </copy>
+
+    <copy todir="${out.dir}/${derby.testing.unittest.dir}">
+      <fileset dir="${derby.testing.src.dir}/${derby.testing.unittest.dir}" 
+        includes="**/*.policy"/>  
+    </copy>
+
+    <antcall target="build-test-jars"/>
+
+<!-- 
     <ant dir="${derby.testing.src.dir}/${derby.testing.junit.dir}"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/harness"/> 
     <ant dir="${derby.testing.src.dir}/${derby.testing.functest.dir}/testData"/> 
@@ -91,6 +280,36 @@
     <ant dir="${derby.testing.src.dir}/${derby.testing.system.dir}/optimizer"/>
     <ant dir="${derby.testing.src.dir}/${derby.testing.system.dir}/sttest"/>
   	<ant dir="${derby.testing.src.dir}/${derby.testing.perf.dir}"/> 
+-->
+  </target>
+
+  <target name="build-test-jars" description="Build jar files used in tests.">
+
+    <property name="lang-test-dir" value="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/lang"/>
+
+    <delete dir="${lang-test-dir}/nast"/>
+    <mkdir dir="${lang-test-dir}/nast"/>
+
+    <echo level="info" message="Running script to create the nast database"/>
+    <java classname="org.apache.derby.tools.ij"
+          output="${lang-test-dir}/nast.out"
+          failonerror="true"
+          dir="${lang-test-dir}" fork="true">
+      <classpath>
+        <pathelement path="${out.dir}"/>
+      </classpath>
+      <arg value="${lang-test-dir}/nast_init.sql"/>
+    </java>
+
+    <echo level="info" message="Putting the nast database into a jar file"/>
+    <jar destfile="${lang-test-dir}/nast1.jar"
+         basedir="${lang-test-dir}/nast" />
+
+    <!--  Comment out these lines if you have trouble generating the jar file  -->
+    <delete dir="${lang-test-dir}/nast"/>
+    <delete file="${lang-test-dir}/nast.out"/>
+    <delete file="${lang-test-dir}/derby.log"/>
+
   </target>
 
 <!--             ============= End Targets ==============                -->

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nast1.jar
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nast1.jar?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
Binary files - no diff available.

Modified: db/derby/code/trunk/java/tools/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/build.xml?rev=1824712&r1=1824711&r2=1824712&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/build.xml (original)
+++ db/derby/code/trunk/java/tools/build.xml Sun Feb 18 22:58:33 2018
@@ -44,6 +44,8 @@
   <!-- Compile-time classpath properties files -->
   <property file="${properties.dir}/extrapath.properties"/>
   <property file="${properties.dir}/compilepath.properties"/>
+  <property name="ijConstants.src" value="${generated.src.dir}/${derby.dir}/impl/tools/ij/ijConstants.java"/>
+  <property name="ijTokenManager.src" value="${generated.src.dir}/${derby.dir}/impl/tools/ij/ijTokenManager.java"/>
 
   <!-- Release and Version info -->
   <property file="${properties.dir}/release.properties"/>
@@ -55,18 +57,87 @@
 
   </target>
 
-  <target name="tools_base">
-    <ant dir="${derby.tools.dir}/jdbc"/>
-    <ant dir="${derby.tools.dir}/iapi/tools"/>
-    <ant dir="${derby.tools.dir}/impl/tools"/>
-    <ant dir="${derby.tools.dir}/tools"/>
-    <ant dir="${derby.tools.dir}/loc"/>
+  <target name="tools_base" depends="parser">
+
+    <javac
+      source="${min.version}"
+      target="${min.version}"
+      nowarn="on"
+      debug="${debug}" debuglevel="${debuglevel}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.tools.src.dir}:${generated.src.dir}"
+      destdir="${out.dir}">
+      <compilerarg value="-Xlint"/>
+   </javac>
+
+    <copy todir="${loc.dir}" flatten="true">
+      <fileset dir="${derby.tools.locales.dir}">
+        <include name="sysinfoMessages*.properties"/>
+        <include name="toolsmessages*.properties"/>
+      </fileset>
+    </copy>
+
   </target>
 
-  <target name="tools_run">
-    <ant dir="${derby.tools.dir}/iapi/tools" target="compile_tools_iapi_run"/>
+  <target name="parser">
+    <ant antfile="${src.dir}/build.xml" target="genParser">
+      <property name="msg" value="Generating ij parser..."/>
+      <property name="srcroot" value="tools"/>
+      <property name="directory" value="${derby.dir}/impl/tools/ij"/>
+      <property name="rmfiles" value="ijimplparser_rm.files"/>
+      <property name="jjfile" value="ij.jj"/>
+      <property name="chkfile" value="ij.java"/>
+      <property name="constantsfile" value="ijConstants"/>
+    </ant>
+    <ant antfile="${src.dir}/build.xml" target="genParser">
+      <property name="msg" value="Generating mtGrammar parser..."/>
+      <property name="srcroot" value="tools"/>
+      <property name="directory" value="${derby.dir}/impl/tools/ij"/>
+      <property name="rmfiles" value="mtparser_rm.files"/>
+      <property name="jjfile" value="mtGrammar.jj"/>
+      <property name="chkfile" value="mtGrammar.java"/>
+      <property name="constantsfile" value="mtGrammarConstants"/>
+    </ant>
+
+    <!--
+      The following files were just generated:
+
+      CharStream.java
+      ij.java
+      ijConstants.java
+      ijTokenManager.java
+      mtGrammar.java
+      mtGrammarConstants.java
+      mtGrammarTokenManager.java
+      ParseException.java
+      SimpleCharStream.java
+      Token.java
+      TokenMgrError.java
+
+      1 of those files is checked into the codeline:
+
+      ParseException.java
+
+      We don't want generated code to clash with the checked-in versions. So
+      we delete the conflicting class here.
+    -->
+    <delete>
+      <fileset dir="${generated.src.dir}/${derby.dir}/impl/tools/ij">
+        <include name="ParseException.java"/>
+      </fileset>
+    </delete>
+
+    <!-- reduce the visibility of these files from public to package protection -->
+    <replaceregexp file="${ijConstants.src}" match="public interface" replace="interface"/>
+    <replaceregexp file="${ijTokenManager.src}" match="public class" replace="class"/>
+
   </target>
 
+
 <!--             ============= End Targets ==============                -->
 
 <!--             ============= End Project ==============                -->



Mime
View raw message