svn commit: r935381 - in /ofbiz/trunk: ./ applications/accounting/ applications/order/ applications/product/ applications/securityext/ framework/base/ framework/base/src/META-INF/services/ framework/entity/ framework/service/ framework/sql/ framework/w...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r935381 - in /ofbiz/trunk: ./ applications/accounting/ applications/order/ applications/product/ applications/securityext/ framework/base/ framework/base/src/META-INF/services/ framework/entity/ framework/service/ framework/sql/ framework/w...

doogie-3
Author: doogie
Date: Sun Apr 18 18:03:47 2010
New Revision: 935381

URL: http://svn.apache.org/viewvc?rev=935381&view=rev
Log:
Add <test-jar> macro.

Removed:
    ofbiz/trunk/framework/base/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader
    ofbiz/trunk/framework/base/src/META-INF/services/org.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf
Modified:
    ofbiz/trunk/applications/accounting/build.xml
    ofbiz/trunk/applications/order/build.xml
    ofbiz/trunk/applications/product/build.xml
    ofbiz/trunk/applications/securityext/build.xml
    ofbiz/trunk/framework/base/build.xml
    ofbiz/trunk/framework/entity/build.xml
    ofbiz/trunk/framework/service/build.xml
    ofbiz/trunk/framework/sql/build.xml
    ofbiz/trunk/framework/webapp/build.xml
    ofbiz/trunk/macros.xml

Modified: ofbiz/trunk/applications/accounting/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/build.xml (original)
+++ ofbiz/trunk/applications/accounting/build.xml Sun Apr 18 18:03:47 2010
@@ -63,4 +63,9 @@ under the License.
             <exclude name="org/ofbiz/accounting/thirdparty/orbital/**"/>
         </patternset>
     </target>
+
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar/>
+    </target>
 </project>

Modified: ofbiz/trunk/applications/order/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/build.xml (original)
+++ ofbiz/trunk/applications/order/build.xml Sun Apr 18 18:03:47 2010
@@ -61,4 +61,9 @@ under the License.
             <exclude name="org/ofbiz/order/thirdparty/taxware/**"/>
         </javac16>
     </target>
+
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar/>
+    </target>
 </project>

Modified: ofbiz/trunk/applications/product/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/build.xml (original)
+++ ofbiz/trunk/applications/product/build.xml Sun Apr 18 18:03:47 2010
@@ -64,4 +64,9 @@ under the License.
             <exclude name="${noapplet}"/>
         </patternset>
     </target>
+
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar/>
+    </target>
 </project>

Modified: ofbiz/trunk/applications/securityext/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/securityext/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/applications/securityext/build.xml (original)
+++ ofbiz/trunk/applications/securityext/build.xml Sun Apr 18 18:03:47 2010
@@ -54,4 +54,14 @@ under the License.
             <exclude name="org/ofbiz/securityext/thirdparty/truition/**"/>
         </patternset>
     </target>
+
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar>
+            <test-selector>
+                <filename name="META-INF/services"/>
+                <filename name="META-INF/services/*"/>
+            </test-selector>
+        </test-jar>
+    </target>
 </project>

Modified: ofbiz/trunk/framework/base/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/build.xml (original)
+++ ofbiz/trunk/framework/base/build.xml Sun Apr 18 18:03:47 2010
@@ -93,7 +93,24 @@ under the License.
             <main-elements>
                 <!-- also put the DTDs in the jar file... -->
                 <fileset dir="${dtd.dir}" includes="*.dtd"/>
+                <service type="org.ofbiz.base.conversion.ConverterLoader">
+                    <provider classname="org.ofbiz.base.conversion.BooleanConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.CollectionConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.DateTimeConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.JSONConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.MiscConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.NetConverters"/>
+                    <provider classname="org.ofbiz.base.conversion.NumberConverters"/>
+                </service>
             </main-elements>
         </main-jar>
+        <test-jar>
+            <test-elements>
+                <service type="org.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf">
+                    <provider classname="org.ofbiz.base.util.test.UtilObjectTests$FirstTestFactory"/>
+                    <provider classname="org.ofbiz.base.util.test.UtilObjectTests$SecondTestFactory"/>
+                </service>
+            </test-elements>
+        </test-jar>
     </target>
 </project>

Modified: ofbiz/trunk/framework/entity/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/build.xml (original)
+++ ofbiz/trunk/framework/entity/build.xml Sun Apr 18 18:03:47 2010
@@ -45,6 +45,16 @@ under the License.
         <exclude name="org/ofbiz/entity/connection/TyrexConnectionFactory.java"/>
     </patternset>
 
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar>
+            <test-selector>
+                <filename name="META-INF/services" negate="true"/>
+                <filename name="META-INF/services/*" negate="true"/>
+            </test-selector>
+        </test-jar>
+    </target>
+
     <target name="install-PG-JDBC" description="download the JDBC driver for PostgreSQL">
         <get src="http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc4.jar"
             dest="lib/jdbc/postgresql-8.4-701.jdbc4.jar" usetimestamp="true" />

Modified: ofbiz/trunk/framework/service/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/build.xml (original)
+++ ofbiz/trunk/framework/service/build.xml Sun Apr 18 18:03:47 2010
@@ -51,6 +51,7 @@ under the License.
 
     <target name="main-jar" depends="stubs">
         <main-jar/>
+        <test-jar/>
     </target>
 
     <target name="rmi-jar" depends="stubs">

Modified: ofbiz/trunk/framework/sql/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/framework/sql/build.xml (original)
+++ ofbiz/trunk/framework/sql/build.xml Sun Apr 18 18:03:47 2010
@@ -61,6 +61,11 @@ under the License.
         <javac16/>
     </target>
 
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar/>
+    </target>
+
     <!-- ================================================================== -->
     <!-- Build JavaDoc                                                      -->
     <!-- ================================================================== -->

Modified: ofbiz/trunk/framework/webapp/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/build.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/build.xml (original)
+++ ofbiz/trunk/framework/webapp/build.xml Sun Apr 18 18:03:47 2010
@@ -59,4 +59,9 @@ under the License.
         <exclude name="org/ofbiz/webapp/ftl/FreeMarkerViewRenderer.java"/>
         <exclude name="org/ofbiz/webapp/ftl/JpCacheIncludeTransform.java"/>
     </patternset>
+
+    <target name="jar" depends="classes">
+        <main-jar/>
+        <test-jar/>
+    </target>
 </project>

Modified: ofbiz/trunk/macros.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/macros.xml?rev=935381&r1=935380&r2=935381&view=diff
==============================================================================
--- ofbiz/trunk/macros.xml (original)
+++ ofbiz/trunk/macros.xml Sun Apr 18 18:03:47 2010
@@ -86,10 +86,20 @@ under the License.
   <sequential>
    <jar jarfile="@{jarfile}">
     <fileset dir="${build.dir}/classes">
+     <exclude name="**/test"/>
+     <exclude name="**/test/*"/>
      <main-pattern/>
     </fileset>
     <fileset dir="${src.extra.dir}">
-     <selector refid="src-extra-set"/>
+     <and>
+      <not>
+       <or>
+        <filename name="**/test"/>
+        <filename name="**/test/*"/>
+       </or>
+      </not>
+      <selector refid="src-extra-set"/>
+     </and>
     </fileset>
     <!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
     <zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
@@ -98,6 +108,34 @@ under the License.
   </sequential>
  </macrodef>
 
+ <macrodef name="test-jar">
+  <attribute name="jarfile" default="${build.dir}/lib/${name}-test.jar"/>
+  <element name="test-selector" optional="true"/>
+  <element name="test-elements" optional="true"/>
+  <sequential>
+   <jar jarfile="@{jarfile}">
+    <fileset dir="${build.dir}/classes">
+     <or>
+      <filename name="**/test"/>
+      <filename name="**/test/*"/>
+      <test-selector/>
+     </or>
+    </fileset>
+    <fileset dir="${src.dir}">
+     <and>
+      <filename name="**/test/*"/>
+      <or>
+       <test-selector/>
+       <selector refid="src-extra-set"/>
+      </or>
+     </and>
+    </fileset>
+    <zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
+    <test-elements/>
+   </jar>
+  </sequential>
+ </macrodef>
+
  <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.class.path"/>
 
  <presetdef name="default-groovyc">