ソースを参照

apply same config to license generation

Armin Schrenk 3 年 前
コミット
51d715caa1

+ 7 - 3
.github/workflows/mac-dmg.yml

@@ -105,9 +105,13 @@ jobs:
       - name: Generate license
         run: >
           mvn -B license:add-third-party
-          "-Dlicense.thirdPartyFilename=license.rtf"
-          "-Dlicense.fileTemplate=dist/mac/dmg/resources/licenseTemplate.ftl"
-          "-Dlicense.outputDirectory=dist/mac/dmg/resources"
+          -Dlicense.thirdPartyFilename=license.rtf
+          -Dlicense.outputDirectory=dist/mac/dmg/resources
+          -Dlicense.fileTemplate=dist/mac/dmg/resources/licenseTemplate.ftl
+          -Dlicense.includeScopes=compile
+          -Dlicense.excludedGroups=^org\.cryptomator
+          -Dlicense.failOnMissing=true
+          -Dlicense.licenseMergesUrl=dist/mac/dmg/resources/licenseMerges.xml
       - name: Install codesign certificate
         run: |
           # create variables

+ 14 - 6
.github/workflows/win-exe.yml

@@ -118,9 +118,13 @@ jobs:
       - name: Generate license
         run: >
           mvn -B license:add-third-party
-          "-Dlicense.thirdPartyFilename=license.rtf"
-          "-Dlicense.fileTemplate=dist/win/resources/licenseTemplate.ftl"
-          "-Dlicense.outputDirectory=dist/win/resources"
+          -Dlicense.thirdPartyFilename=license.rtf
+          -Dlicense.outputDirectory=dist/win/resources
+          -Dlicense.fileTemplate=dist/win/resources/licenseTemplate.ftl
+          -Dlicense.includeScopes=compile
+          -Dlicense.excludedGroups=^org\.cryptomator
+          -Dlicense.failOnMissing=true
+          -Dlicense.licenseMergesUrl=dist/win/resources/license/licenseMerges.xml
       - name: Create MSI
         run: >
           ${JAVA_HOME}/bin/jpackage
@@ -204,9 +208,13 @@ jobs:
       - name: Generate license
         run: >
           mvn -B license:add-third-party
-          "-Dlicense.thirdPartyFilename=license.rtf"
-          "-Dlicense.fileTemplate=dist/win/bundle/resources/licenseTemplate.ftl"
-          "-Dlicense.outputDirectory=dist/win/bundle/resources"
+          -Dlicense.thirdPartyFilename=license.rtf
+          -Dlicense.fileTemplate=dist/win/bundle/resources/licenseTemplate.ftl
+          -Dlicense.outputDirectory=dist/win/bundle/resources
+          -Dlicense.includeScopes=compile
+          -Dlicense.excludedGroups=^org\.cryptomator
+          -Dlicense.failOnMissing=true
+          -Dlicense.licenseMergesUrl=dist/win/resources/license/licenseMerges.xml
       - name: Download WinFsp
         run:
           curl --output dist/win/bundle/resources/winfsp.msi -L ${{ env.WINFSP_MSI }}

+ 7 - 3
dist/mac/dmg/build.sh

@@ -77,9 +77,13 @@ sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" Cryptomator.app/Contents/Inf
 
 # generate license
 mvn -B -f../../../pom.xml license:add-third-party \
-  "-Dlicense.thirdPartyFilename=license.rtf" \
-  "-Dlicense.fileTemplate=resources/licenseTemplate.ftl" \
-  "-Dlicense.outputDirectory=dist/mac/dmg/resources"
+    -Dlicense.thirdPartyFilename=license.rtf \
+    -Dlicense.outputDirectory=resources
+    -Dlicense.fileTemplate=resources/licenseTemplate.ftl \
+    -Dlicense.includeScopes=compile \
+    -Dlicense.excludedGroups=^org\.cryptomator \
+    -Dlicense.failOnMissing=true \
+    -Dlicense.licenseMergesUrl=resources/licenseMerges.xml
 
 # codesign
 if [ -n "${CODESIGN_IDENTITY}" ]; then

+ 7 - 0
dist/mac/dmg/resources/licenseMerges.xml

@@ -0,0 +1,7 @@
+<licenseMerges>
+	<licenseMerge>Apache License v2.0|Apache License, Version 2.0|The Apache Software License, Version 2.0|Apache 2.0|Apache Software License - Version 2.0</licenseMerge>
+	<licenseMerge>MIT License|The MIT License (MIT)|The MIT License|MIT license</licenseMerge>
+	<licenseMerge>LGPL 2.1|LGPL, version 2.1|GNU Lesser/Library General Public License version 2|GNU Lesser General Public License Version 2.1</licenseMerge>
+	<licenseMerge>GPLv2|GNU General Public License Version 2</licenseMerge>
+	<licenseMerge>GPLv2+CE|CDDL + GPLv2 with classpath exception</licenseMerge>
+</licenseMerges>

+ 10 - 2
dist/win/build.ps1

@@ -84,7 +84,11 @@ if ($clean -and (Test-Path -Path $appPath)) {
 &mvn -B -f $buildDir/../../pom.xml license:add-third-party `
  "-Dlicense.thirdPartyFilename=license.rtf" `
  "-Dlicense.fileTemplate=$buildDir\resources\licenseTemplate.ftl" `
- "-Dlicense.outputDirectory=$buildDir\resources\"
+ "-Dlicense.outputDirectory=$buildDir\resources\" `
+ "-Dlicense.includeScopes=compile" `
+ "-Dlicense.excludedGroups=^org\.cryptomator" `
+ "-Dlicense.failOnMissing=true" `
+ "-Dlicense.licenseMergesUrl=$buildDir\resources\licenseMerges.xml"
 
 # patch app dir
 Copy-Item "contrib\*" -Destination "Cryptomator"
@@ -120,7 +124,11 @@ $Env:JP_WIXWIZARD_RESOURCES = "$buildDir\resources"
 &mvn -B -f $buildDir/../../pom.xml license:add-third-party `
  "-Dlicense.thirdPartyFilename=license.rtf" `
  "-Dlicense.fileTemplate=$buildDir\bundle\resources\licenseTemplate.ftl" `
- "-Dlicense.outputDirectory=$buildDir\bundle\resources\"
+ "-Dlicense.outputDirectory=$buildDir\bundle\resources\" `
+ "-Dlicense.includeScopes=compile" `
+ "-Dlicense.excludedGroups=^org\.cryptomator" `
+ "-Dlicense.failOnMissing=true" `
+ "-Dlicense.licenseMergesUrl=$buildDir\resources\licenseMerges.xml"
 
 # download Winfsp
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

+ 7 - 0
dist/win/resources/licenseMerges.xml

@@ -0,0 +1,7 @@
+<licenseMerges>
+	<licenseMerge>Apache License v2.0|Apache License, Version 2.0|The Apache Software License, Version 2.0|Apache 2.0|Apache Software License - Version 2.0</licenseMerge>
+	<licenseMerge>MIT License|The MIT License (MIT)|The MIT License|MIT license</licenseMerge>
+	<licenseMerge>LGPL 2.1|LGPL, version 2.1|GNU Lesser/Library General Public License version 2|GNU Lesser General Public License Version 2.1</licenseMerge>
+	<licenseMerge>GPLv2|GNU General Public License Version 2</licenseMerge>
+	<licenseMerge>GPLv2+CE|CDDL + GPLv2 with classpath exception</licenseMerge>
+</licenseMerges>