svn commit: r1761421 - in /ofbiz/trunk: build.gradle framework/base/src/main/java/META-INF/ framework/base/src/main/java/META-INF/services/ framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf

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

svn commit: r1761421 - in /ofbiz/trunk: build.gradle framework/base/src/main/java/META-INF/ framework/base/src/main/java/META-INF/services/ framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf

Taher Alkhateeb
Author: taher
Date: Mon Sep 19 10:46:42 2016
New Revision: 1761421

URL: http://svn.apache.org/viewvc?rev=1761421&view=rev
Log:
 Fix for: removing the need to generate ofbiz-base-test.jar
 
 In reference to the below discussion thread, this commit removes a task
 which generates the above mentioned jar file which holds a service
 definition. The fix is replace the gradle task which automatically
 generates service with a flat directiory (META-INF) that defines the
 service provides. All tests pass.
 
 Thread: http://markmail.org/message/wzmw2qbacg4hup7r
 
 Thanks: Jacques Le Roux for reporting this issue

Added:
    ofbiz/trunk/framework/base/src/main/java/META-INF/
    ofbiz/trunk/framework/base/src/main/java/META-INF/services/
    ofbiz/trunk/framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf
Modified:
    ofbiz/trunk/build.gradle

Modified: ofbiz/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.gradle?rev=1761421&r1=1761420&r2=1761421&view=diff
==============================================================================
--- ofbiz/trunk/build.gradle (original)
+++ ofbiz/trunk/build.gradle Mon Sep 19 10:46:42 2016
@@ -182,7 +182,6 @@ dependencies {
 
     // local libs
     compile fileTree(dir: file("${rootDir}/lib"), include: '**/*.jar')
-    runtime files("${rootDir}/build/libs/ofbiz-base-test.jar")
 }
 
 def excludedJavaSources = []
@@ -857,24 +856,6 @@ task svnInfoFooter(group: committerGroup
     svnFooterFile << '${uiLabelMap.JavaVersion} : ' + "${org.gradle.internal.jvm.Jvm.current()}"
 }
 
-// ========== hidden support tasks ==========
-
-/* without executing this task, a test would fail that is named
- * org.apache.ofbiz.base.util.test.UtilObjectTests.testGetObjectFromFactory()
- *
- * The test fails because it requires defining a service provider, read more below.
- * http://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Service_Provider
- */
-task createBaseTestServiceProviderJar << {
-    ant.jar(destfile: "${rootDir}/build/libs/ofbiz-base-test.jar") {
-        service(type: 'org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf') {
-            provider(classname: 'org.apache.ofbiz.base.util.test.UtilObjectTests$FirstTestFactory')
-            provider(classname: 'org.apache.ofbiz.base.util.test.UtilObjectTests$SecondTestFactory')
-        }
-    }
-}
-classes.dependsOn createBaseTestServiceProviderJar
-
 /* ========================================================
  * Rules-based OFBiz server commands
  * ======================================================== */

Added: ofbiz/trunk/framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests%24TestFactoryIntf?rev=1761421&view=auto
==============================================================================
--- ofbiz/trunk/framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf (added)
+++ ofbiz/trunk/framework/base/src/main/java/META-INF/services/org.apache.ofbiz.base.util.test.UtilObjectTests$TestFactoryIntf Mon Sep 19 10:46:42 2016
@@ -0,0 +1,2 @@
+org.apache.ofbiz.base.util.test.UtilObjectTests$FirstTestFactory
+org.apache.ofbiz.base.util.test.UtilObjectTests$SecondTestFactory