Browse Source

Apply suggestions from code review

Co-authored-by: Sebastian Stenzel <overheadhunter@users.noreply.github.com>
Armin Schrenk 3 years ago
parent
commit
4d1d6f449e

+ 2 - 2
.github/workflows/mac-dmg.yml

@@ -102,7 +102,7 @@ jobs:
         env:
           VERSION_NO: ${{ steps.versions.outputs.semVerNum }}
           REVISION_NO: ${{ steps.versions.outputs.revNum }}
-      - name: Generate license
+      - name: Generate license for dmg
         run: >
           mvn -B license:add-third-party
           -Dlicense.thirdPartyFilename=license.rtf
@@ -111,7 +111,7 @@ jobs:
           -Dlicense.includeScopes=compile
           -Dlicense.excludedGroups=^org\.cryptomator
           -Dlicense.failOnMissing=true
-          -Dlicense.licenseMergesUrl=dist/mac/dmg/resources/licenseMerges.xml
+          -Dlicense.licenseMergesUrl=license/merges.xml
       - name: Install codesign certificate
         run: |
           # create variables

+ 4 - 4
.github/workflows/win-exe.yml

@@ -115,7 +115,7 @@ jobs:
           timestampUrl: 'http://timestamp.digicert.com'
           folder: appdir/Cryptomator
           recursive: true
-      - name: Generate license
+      - name: Generate license for MSI
         run: >
           mvn -B license:add-third-party
           -Dlicense.thirdPartyFilename=license.rtf
@@ -124,7 +124,7 @@ jobs:
           -Dlicense.includeScopes=compile
           -Dlicense.excludedGroups=^org\.cryptomator
           -Dlicense.failOnMissing=true
-          -Dlicense.licenseMergesUrl=dist/win/resources/license/licenseMerges.xml
+          -Dlicense.licenseMergesUrl=license/merges.xml
       - name: Create MSI
         run: >
           ${JAVA_HOME}/bin/jpackage
@@ -205,7 +205,7 @@ jobs:
           distribution: 'temurin'
           java-version: ${{ env.JAVA_VERSION }}
           cache: 'maven'
-      - name: Generate license
+      - name: Generate license for exe
         run: >
           mvn -B license:add-third-party
           -Dlicense.thirdPartyFilename=license.rtf
@@ -214,7 +214,7 @@ jobs:
           -Dlicense.includeScopes=compile
           -Dlicense.excludedGroups=^org\.cryptomator
           -Dlicense.failOnMissing=true
-          -Dlicense.licenseMergesUrl=dist/win/resources/license/licenseMerges.xml
+          -Dlicense.licenseMergesUrl=license/merges.xml
       - name: Download WinFsp
         run:
           curl --output dist/win/bundle/resources/winfsp.msi -L ${{ env.WINFSP_MSI }}

+ 1 - 1
dist/mac/dmg/build.sh

@@ -83,7 +83,7 @@ mvn -B -f../../../pom.xml license:add-third-party \
     -Dlicense.includeScopes=compile \
     -Dlicense.excludedGroups=^org\.cryptomator \
     -Dlicense.failOnMissing=true \
-    -Dlicense.licenseMergesUrl=resources/licenseMerges.xml
+    -Dlicense.licenseMergesUrl=../../../license/merges.xml
 
 # codesign
 if [ -n "${CODESIGN_IDENTITY}" ]; then

+ 2 - 2
dist/win/build.ps1

@@ -88,7 +88,7 @@ if ($clean -and (Test-Path -Path $appPath)) {
  "-Dlicense.includeScopes=compile" `
  "-Dlicense.excludedGroups=^org\.cryptomator" `
  "-Dlicense.failOnMissing=true" `
- "-Dlicense.licenseMergesUrl=$buildDir\resources\licenseMerges.xml"
+ "-Dlicense.licenseMergesUrl=$buildDir\..\..\license\merges.xml"
 
 # patch app dir
 Copy-Item "contrib\*" -Destination "Cryptomator"
@@ -128,7 +128,7 @@ $Env:JP_WIXWIZARD_RESOURCES = "$buildDir\resources"
  "-Dlicense.includeScopes=compile" `
  "-Dlicense.excludedGroups=^org\.cryptomator" `
  "-Dlicense.failOnMissing=true" `
- "-Dlicense.licenseMergesUrl=$buildDir\resources\licenseMerges.xml"
+ "-Dlicense.licenseMergesUrl=$buildDir\..\..\license\merges.xml"
 
 # download Winfsp
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

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

@@ -1,7 +0,0 @@
-<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>

src/license/THIRD-PARTY.properties → license/THIRD-PARTY.properties


dist/mac/dmg/resources/licenseMerges.xml → license/merges.xml


src/license/template.ftl → license/template.ftl


+ 2 - 8
pom.xml

@@ -359,14 +359,8 @@
 							<thirdPartyFilename>THIRD-PARTY.txt</thirdPartyFilename>
 							<includedScopes>compile</includedScopes>
 							<excludedGroups>org\.cryptomator</excludedGroups>
-							<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>
-							<fileTemplate>${project.basedir}/src/license/template.ftl</fileTemplate>
+							<licenseMergesUrl>${project.basedir}/license/merges.xml</licenseMergesUrl>
+							<fileTemplate>${project.basedir}/license/template.ftl</fileTemplate>
 						</configuration>
 					</execution>
 				</executions>