If we create the META-INF file, we can delete all below code from build.gradle
// ========== 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 On Sun, Sep 18, 2016 at 9:31 PM, Taher Alkhateeb <[email protected] > wrote: > Help is appreciated from either of you. We can create a META-INF directory > in the test folder similar to what we have in > /framework/entity/src/main/java/META-INF. > Then we can have a cleaner build.gradle file where we delete the snippet to > create this jar and be done with it completely > > > On Sun, Sep 18, 2016 at 9:21 PM, Pierre Smits <[email protected]> > wrote: > >> I have an annoyance regarding that file too. It is always there. Totally >> not needed in production environments. >> >> >> Best regards, >> >> Pierre Smits >> >> ORRTIZ.COM <http://www.orrtiz.com> >> OFBiz based solutions & services >> >> OFBiz Extensions Marketplace >> http://oem.ofbizci.net/oci-2/ >> >> On Sun, Sep 18, 2016 at 8:19 PM, Jacques Le Roux < >> [email protected]> wrote: >> >> > Hi, >> > >> > I have a small but really annoying problem with ofbiz-base-test.jar and >> > Eclipse. Because I'm on Windows and processes keep hooks on files when I >> > want to use "gradlew clean" it tells me that it is "Unable to delete >> file" >> > ofbiz-base-test.jar. >> > Do we need to keep this file after the build? >> > >> > Thanks >> > >> > Jacques >> > >> > >> > >
