-
Notifications
You must be signed in to change notification settings - Fork 127
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 #286 from ppalaga/i284
Fix #277 aggregate-add-third-party does not use missingFileUrl parameter
- Loading branch information
Showing
10 changed files
with
252 additions
and
15 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
src/it/aggregate-add-third-party-missing-file/child/pom.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,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2019 Alessandro Ballarin | ||
%% | ||
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% | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.codehaus.mojo.license.test</groupId> | ||
<artifactId>test-aggregate-add-third-party-missing-file</artifactId> | ||
<version>@pom.version@</version> | ||
</parent> | ||
<artifactId>test-aggregate-add-third-party-child</artifactId> | ||
|
||
<name>License Test :: aggregate-add-third-party - child</name> | ||
|
||
<dependencies> | ||
|
||
<!-- no license --> | ||
<dependency> | ||
<groupId>javax.resource</groupId> | ||
<artifactId>connector-api</artifactId> | ||
<version>1.5</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.jettison</groupId> | ||
<artifactId>jettison</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20070829</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
src/it/aggregate-add-third-party-missing-file/invoker.properties
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,23 @@ | ||
### | ||
# #%L | ||
# License Maven Plugin | ||
# %% | ||
# Copyright (C) 2019 Alessandro Ballarin | ||
# %% | ||
# 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% | ||
### | ||
invoker.goals=clean license:aggregate-add-third-party@missing-file-only license:aggregate-add-third-party@missing-file-url-only license:aggregate-add-third-party@missing-file-both | ||
invoker.failureBehavior=fail-fast |
3 changes: 3 additions & 0 deletions
3
src/it/aggregate-add-third-party-missing-file/missingFile.properties
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,3 @@ | ||
javax.resource--connector-api--1.5=CDDL-1.0 - Common Development and Distribution License 1.0 | ||
org.codehaus.jettison--jettison--1.1=Apache-2.0 - Apache License 2.0 | ||
org.json--json--20070829=The JSON License |
2 changes: 2 additions & 0 deletions
2
src/it/aggregate-add-third-party-missing-file/missingFileBoth.properties
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,2 @@ | ||
javax.resource--connector-api--1.5=CDDL-1.0 - Common Development and Distribution License 1.0 | ||
org.codehaus.jettison--jettison--1.1=Apache-2.0 - Apache License 2.0 |
3 changes: 3 additions & 0 deletions
3
src/it/aggregate-add-third-party-missing-file/missingFileUrl.properties
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,3 @@ | ||
javax.resource--connector-api--1.5=CDDL-1.0 - Common Development and Distribution License 1.0 | ||
org.codehaus.jettison--jettison--1.1=Apache-2.0 - Apache License 2.0 | ||
org.json--json--20070829=The JSON License |
1 change: 1 addition & 0 deletions
1
src/it/aggregate-add-third-party-missing-file/missingFileUrlBoth.properties
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 @@ | ||
org.json--json--20070829=The JSON License |
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,96 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2019 Alessandro Ballarin | ||
%% | ||
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% | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.codehaus.mojo.license.test</groupId> | ||
<artifactId>test-aggregate-add-third-party-missing-file</artifactId> | ||
<version>@pom.version@</version> | ||
|
||
<modules> | ||
<module>child</module> | ||
</modules> | ||
|
||
<name>License Test :: aggregate-add-third-party-missing-file</name> | ||
|
||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<configuration> | ||
<failOnMissing>true</failOnMissing> | ||
<verbose>true</verbose> | ||
<useMissingFile>true</useMissingFile> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>missing-file-only</id> | ||
<configuration> | ||
<missingFile>missingFile.properties</missingFile> | ||
<thirdPartyFilename>THIRD-PARTY-missing-file-only.txt</thirdPartyFilename> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>missing-file-url-only</id> | ||
<configuration> | ||
<missingFileUrl>${project.baseUri}missingFileUrl.properties</missingFileUrl> | ||
<thirdPartyFilename>THIRD-PARTY-missing-file-url-only.txt</thirdPartyFilename> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>missing-file-both</id> | ||
<configuration> | ||
<missingFile>missingFileBoth.properties</missingFile> | ||
<missingFileUrl>${project.baseUri}missingFileUrlBoth.properties</missingFileUrl> | ||
<thirdPartyFilename>THIRD-PARTY-missing-file-both.txt</thirdPartyFilename> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> | ||
|
||
|
43 changes: 43 additions & 0 deletions
43
src/it/aggregate-add-third-party-missing-file/postbuild.groovy
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,43 @@ | ||
/* | ||
* #%L | ||
* License Maven Plugin | ||
* %% | ||
* Copyright (C) 2019 Alessandro Ballarin | ||
* %% | ||
* 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% | ||
*/ | ||
|
||
|
||
file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY-missing-file-only.txt'); | ||
assert file.exists(); | ||
content = file.text; | ||
assert content.contains('(CDDL-1.0 - Common Development and Distribution License 1.0) connector-api (javax.resource:connector-api:1.5 - no url defined)'); | ||
assert content.contains('(Apache-2.0 - Apache License 2.0) Jettison (org.codehaus.jettison:jettison:1.1 - no url defined)'); | ||
assert content.contains('(The JSON License) JSON (JavaScript Object Notation) (org.json:json:20070829 - http://www.json.org/java/index.html)'); | ||
|
||
file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY-missing-file-url-only.txt'); | ||
assert file.exists(); | ||
content = file.text; | ||
assert content.contains('(CDDL-1.0 - Common Development and Distribution License 1.0) connector-api (javax.resource:connector-api:1.5 - no url defined)'); | ||
assert content.contains('(Apache-2.0 - Apache License 2.0) Jettison (org.codehaus.jettison:jettison:1.1 - no url defined)'); | ||
assert content.contains('(The JSON License) JSON (JavaScript Object Notation) (org.json:json:20070829 - http://www.json.org/java/index.html)'); | ||
|
||
file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY-missing-file-both.txt'); | ||
assert file.exists(); | ||
content = file.text; | ||
assert content.contains('(CDDL-1.0 - Common Development and Distribution License 1.0) connector-api (javax.resource:connector-api:1.5 - no url defined)'); | ||
assert content.contains('(Apache-2.0 - Apache License 2.0) Jettison (org.codehaus.jettison:jettison:1.1 - no url defined)'); | ||
assert content.contains('(The JSON License) JSON (JavaScript Object Notation) (org.json:json:20070829 - http://www.json.org/java/index.html)'); |
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