You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/10/11 16:03:03 UTC
svn commit: r1764280 - /ofbiz/trunk/build.gradle
Author: jleroux
Date: Tue Oct 11 16:03:02 2016
New Revision: 1764280
URL: http://svn.apache.org/viewvc?rev=1764280&view=rev
Log:
Fixed: "Labels and properties caches clearing no longer work" and
"Shortlist the needed resources to start OFBiz in the sourcesets block in
Gradle"
(OFBIZ-8321)(OFBIZ-7937)
While working on OFBIZ-7798 I noticed an issue with labels cache clearing.
It still worked correctly in R15.12 and pre-Gradle version
To test it, load a page with a label, change the label in file, clear all caches
in webtools, the new label value should appear, it does not.
The same issue exists for properties.
This fixes both and while at it fixes also OFBIZ-7937 "Shortlist the needed
resources to start OFBiz in the sourcesets block in Gradle"
I also removed the DTDs from the resources, they seems useless there.
There area also some trailing blanks removed, my Eclipse is set like that.
Thanks: Taher for OFBIZ-7937 description of the issue
Modified:
ofbiz/trunk/build.gradle
Modified: ofbiz/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.gradle?rev=1764280&r1=1764279&r2=1764280&view=diff
==============================================================================
--- ofbiz/trunk/build.gradle (original)
+++ ofbiz/trunk/build.gradle Tue Oct 11 16:03:02 2016
@@ -192,6 +192,21 @@ excludedJavaSources.add 'org/apache/ofbi
excludedJavaSources.add 'org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java'
excludedJavaSources.add 'org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java'
+
+// These files and directories present in config directories should not be included in ofbiz.jar see OFBIZ-8321
+def excludedConfigFiles = []
+excludedConfigFiles.add 'README'
+excludedConfigFiles.add 'APACHE2_HEADER_FOR_XML'
+excludedConfigFiles.add '*.txt'
+excludedConfigFiles.add '*.jks'
+excludedConfigFiles.add 'fop.xconf'
+excludedConfigFiles.add 'GroovyInit.groovy'
+excludedConfigFiles.add 'MiniLang.xslt'
+excludedConfigFiles.add 'AutoImportTemplate.ftl'
+excludedConfigFiles.add 'axis2'
+excludedConfigFiles.add 'barcode'
+
+
sourceSets {
main {
java {
@@ -201,8 +216,19 @@ sourceSets {
resources {
srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java')
srcDirs += getDirectoryInActiveComponentsIfExists('config')
- srcDirs += getDirectoryInActiveComponentsIfExists('dtd')
exclude excludedJavaSources
+ exclude excludedConfigFiles
+ // Below are necessary for unit tests run by Gradle and integration tests
+ exclude { FileTreeElement elem -> elem.getName().contains('.properties') &&
+ !elem.getName().contains('start.properties') &&
+ !elem.getName().contains('load-data.properties') &&
+ !elem.getName().contains('debug.properties') &&
+ !elem.getName().contains('cache.properties') &&
+ !elem.getName().contains('test.properties') &&
+ !elem.getName().contains('rmi.properties')}
+ exclude { FileTreeElement elem -> elem.getName().contains('.xml') &&
+ !elem.getName().contains('entityengine.xml')
+ }
}
}
@@ -635,9 +661,9 @@ task pushPlugin(group: ofbizPlugin, desc
artifactId pluginId
groupId project.hasProperty('pluginGroup')? pluginGroup :'org.apache.ofbiz.plugin'
version project.hasProperty('pluginVersion')? pluginVersion :'0.1.0-SNAPSHOT'
-
+
artifact createPluginArchive
-
+
pom.withXml {
if (project.hasProperty('pluginDescription')) {
asNode().appendNode('description', pluginDescription)
@@ -780,11 +806,11 @@ task gitInfoFooter(group: committerGroup
def revision
def timestamp = new Date().format 'yyyy-MM-dd HH:mm:ss'
def gitFolder = new File('.git')
-
+
if (!gitFolder.exists()) {
println ("Git is not used")
return
- }
+ }
def branchOutput = new ByteArrayOutputStream()
exec{
@@ -810,12 +836,12 @@ task svnInfoFooter(group: committerGroup
def timestamp = new Date().format 'yyyy-MM-dd HH:mm:ss'
def svnOutput = new ByteArrayOutputStream()
def svnFolder = new File('.svn')
-
+
if (!svnFolder.exists()) {
println ("Subversion is not used")
return
- }
-
+ }
+
exec{
commandLine 'svn', 'info', '--xml'
standardOutput = svnOutput