Create third-party-license file in target directory, use plugin defaults to let it placed inside jar

This commit is contained in:
Armin Schrenk
2022-04-20 17:46:58 +02:00
parent c1801e3d22
commit bcfba21900
2 changed files with 2 additions and 3 deletions

View File

@@ -355,7 +355,6 @@
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${project.basedir}/src/main/resources/license</outputDirectory>
<thirdPartyFilename>THIRD-PARTY.txt</thirdPartyFilename>
<includedScopes>compile</includedScopes>
<excludedGroups>org\.cryptomator</excludedGroups>

View File

@@ -29,10 +29,10 @@ public class AboutController implements FxController {
}
private static String loadThirdPartyLicenseFile() {
try (InputStream in = AboutController.class.getResourceAsStream("/license/THIRD-PARTY.txt")) {
try (InputStream in = AboutController.class.getResourceAsStream("/THIRD-PARTY.txt")) {
return CharStreams.toString(new InputStreamReader(in));
} catch (IOException | NullPointerException e) {
LOG.error("Failed to load /license/THIRD-PARTY.txt", e);
LOG.error("Failed to load /THIRD-PARTY.txt", e);
return "";
}
}