-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from ppalaga/i296
Fix #296 AbstractDownloadLicensesMojo should not download available f…
- Loading branch information
Showing
13 changed files
with
249 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
invoker.goals = clean validate -e | ||
invoker.goals = validate -e -Dorg.slf4j.simpleLogger.log.org.codehaus.mojo.license=debug |
39 changes: 39 additions & 0 deletions
39
src/it/download-licenses-configured/licenses-no-download.expected.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<licenseSummary> | ||
<dependencies> | ||
<dependency> | ||
<groupId>aopalliance</groupId> | ||
<artifactId>aopalliance</artifactId> | ||
<version>1.0</version> | ||
<licenses> | ||
<license> | ||
<name>Public Domain</name> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>asm</groupId> | ||
<artifactId>asm</artifactId> | ||
<version>3.1</version> | ||
<licenses> | ||
<license> | ||
<name>BSD 3-Clause ASM</name> | ||
<url>https://gitlab.ow2.org/asm/asm/raw/ASM_3_1_MVN/LICENSE.txt</url> | ||
<file>bsd-3-clause-asm-license.txt</file> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.0</version> | ||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0</url> | ||
<file>apache-license-2.0-license-2.0.txt</file> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
</dependencies> | ||
</licenseSummary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* #%L | ||
* License Maven Plugin | ||
* %% | ||
* Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit, Tony chemit | ||
* %% | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Lesser Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Lesser Public | ||
* License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/lgpl-3.0.html>. | ||
* #L% | ||
*/ | ||
|
||
import java.nio.file.Path; | ||
import java.nio.file.Files; | ||
|
||
Path basePath = basedir.toPath() | ||
|
||
Files.move(basePath.resolve('target-initial'), basePath.resolve('target')) | ||
|
||
Path asl2 = basePath.resolve('target/no-download/licenses/apache-license-2.0-license-2.0.txt') | ||
assert Files.exists(asl2) | ||
assert asl2.text.contains('Fake content') | ||
|
||
Path bsd = basePath.resolve('target/no-download/licenses/bsd-3-clause-asm-license.txt') | ||
assert Files.exists(bsd) | ||
assert bsd.text.contains('Fake content') |
41 changes: 41 additions & 0 deletions
41
src/it/download-licenses-configured/src/license/licenses-config-no-download.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<licenseSummary> | ||
<dependencies> | ||
<dependency> | ||
<groupId>\Qcommons-logging</groupId> | ||
<artifactId>\Qcommons-logging</artifactId> | ||
<matchLicenses> | ||
<!-- match empty license list --> | ||
</matchLicenses> | ||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0</url> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>\Qaopalliance\E</groupId> | ||
<artifactId>\Qaopalliance\E</artifactId> | ||
<matchLicenses> | ||
<license> | ||
<name>\QPublic Domain\E</name> | ||
</license> | ||
</matchLicenses> | ||
<licenses approved="true" /> | ||
</dependency> | ||
<dependency> | ||
<groupId>\Qasm\E</groupId> | ||
<artifactId>\Qasm\E</artifactId> | ||
<matchLicenses> | ||
<!-- match empty license list --> | ||
</matchLicenses> | ||
<licenses> | ||
<license> | ||
<name>BSD 3-Clause ASM</name> | ||
<url>https://gitlab.ow2.org/asm/asm/raw/ASM_3_1_MVN/LICENSE.txt</url> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
</dependencies> | ||
</licenseSummary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/it/download-licenses-configured/src/license/licenses-input-insert-versions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<licenseSummary> | ||
<dependencies> | ||
<dependency> | ||
<groupId>aopalliance</groupId> | ||
<artifactId>aopalliance</artifactId> | ||
<licenses> | ||
<license> | ||
<name>Public Domain</name> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<licenses> | ||
<!-- No license information available. --> | ||
</licenses> | ||
</dependency> | ||
</dependencies> | ||
</licenseSummary> |
39 changes: 39 additions & 0 deletions
39
src/it/download-licenses-configured/target-initial/no-download/licenses.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<licenseSummary> | ||
<dependencies> | ||
<dependency> | ||
<groupId>aopalliance</groupId> | ||
<artifactId>aopalliance</artifactId> | ||
<version>1.0</version> | ||
<licenses> | ||
<license> | ||
<name>Public Domain</name> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>asm</groupId> | ||
<artifactId>asm</artifactId> | ||
<version>3.1</version> | ||
<licenses> | ||
<license> | ||
<name>BSD 3-Clause ASM</name> | ||
<url>https://gitlab.ow2.org/asm/asm/raw/ASM_3_1_MVN/LICENSE.txt</url> | ||
<file>bsd-3-clause-asm-license.txt</file> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.0</version> | ||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0</url> | ||
<file>apache-license-2.0-license-2.0.txt</file> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
</dependencies> | ||
</licenseSummary> |
1 change: 1 addition & 0 deletions
1
...icenses-configured/target-initial/no-download/licenses/apache-license-2.0-license-2.0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fake content that should not get overwritten without forceDownload=true |
1 change: 1 addition & 0 deletions
1
...load-licenses-configured/target-initial/no-download/licenses/bsd-3-clause-asm-license.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fake content that should not get overwritten without forceDownload=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters