Skip to content

Commit

Permalink
Improved: Move APACHE2_HEADER_FOR_XML to “src/main/resources”
Browse files Browse the repository at this point in the history
(OFBIZ-11161)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868646 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Oct 20, 2019
1 parent 434a016 commit 2c37e21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion build.gradle
Expand Up @@ -255,7 +255,6 @@ def excludedJavaSources = [
// Files and directories present in config directories that should not be included in ofbiz.jar (see OFBIZ-8321).
def excludedConfigFiles = [
'README',
'APACHE2_HEADER_FOR_XML',
'*.txt',
'*.jks',
'fop.xconf',
Expand Down
Expand Up @@ -20,6 +20,7 @@

import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.Locale;
import java.util.Map;
Expand Down Expand Up @@ -62,8 +63,9 @@ public static Map<String, Object> saveLabelsToXmlFile(DispatchContext dctx, Map<
List<String> localeValues = UtilGenerics.cast(context.get("localeValues"));
List<String> localeComments = UtilGenerics.cast(context.get("localeComments"));
String apacheLicenseText = null;
URL apache2Header = SaveLabelsToXmlFile.class.getResource("APACHE2_HEADER_FOR_XML");
try {
apacheLicenseText = FileUtil.readString("UTF-8", FileUtil.getFile("component://webtools/config/APACHE2_HEADER_FOR_XML"));
apacheLicenseText = FileUtil.readString("UTF-8", FileUtil.getFile(apache2Header.getPath()));
} catch (IOException e) {
Debug.logWarning(e, "Unable to read Apache License text file", module);
}
Expand Down

0 comments on commit 2c37e21

Please sign in to comment.