Skip to content

Commit

Permalink
Attempt to fix #112 for native images
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Sep 30, 2022
1 parent 25988d0 commit 7847fd2
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Build release ${{env.RELEASE_VERSION}}
if: env.DO_BUILD
run: ./gradlew clean build dist distThirdParty -Pversion=${{env.RELEASE_VERSION}}
run: ./gradlew clean generateBuildProperties build dist distThirdParty -Pversion=${{env.RELEASE_VERSION}}

- name: Publish build artifacts
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ apply from: "${gradleHelpersLocation}/readme2html.gradle"
mainClassName = "com.fortify.cli.app.FCLIRootCommands"

task generateBuildProperties {
doLast {
doFirst {
def buildPropertiesDir = "${sourceSets.main.output.resourcesDir}/com/fortify/cli/app"
mkdir "${buildPropertiesDir}"
ant.propertyfile(file: "${buildPropertiesDir}/fcli-build.properties") {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/fortify/cli/app/FCLIRootCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
usageHelpAutoWidth = true,
sortOptions = false,
showAtFileInUsageHelp = false,
resourceBundle = "com.fortify.cli.i18n.FortifyCLIMessages",
resourceBundle = "com.fortify.cli.app.i18n.FortifyCLIMessages",
versionProvider = FortifyCLIVersionProvider.class,
subcommands = {
ConfigCommands.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public String[] getVersion() throws Exception {

private static final Properties loadProperties() {
final Properties p = new Properties();
try (final InputStream stream = FortifyCLIVersionProvider.class.getResourceAsStream("fcli-build.properties")) {
try (final InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("com/fortify/cli/app/fcli-build.properties")) {
if ( stream!=null ) { p.load(stream); }
} catch ( IOException ioe ) {
System.err.println("Error reading fcli-build.properties from classpath");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class I18nParameterExceptionHandler implements CommandLine.IParameterExce
*/
public I18nParameterExceptionHandler(IParameterExceptionHandler origDefaultHandler, LanguageConfigManager languageConfigManager){
this.origDefaultHandler = origDefaultHandler;
String resourceBundleName = "com.fortify.cli.i18n.FortifyCLIMessages";
String resourceBundleName = "com.fortify.cli.app.i18n.FortifyCLIMessages";
i18nResource = ResourceBundle.getBundle(resourceBundleName,
new Locale(
languageConfigManager.isNullEmptyOrEn() ? "" : languageConfigManager.getLanguage()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundles" : [
{"name" : "com.fortify.cli.i18n.FortifyCLIMessages"}
{"name" : "com.fortify.cli.app.i18n.FortifyCLIMessages"}
],
"resources": {
"includes": [
Expand Down

0 comments on commit 7847fd2

Please sign in to comment.