-
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.
Fix #498 add-third-party should not override third-party file with th…
…e same content
- Loading branch information
1 parent
c29552b
commit 1c8fab2
Showing
11 changed files
with
282 additions
and
40 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/it/add-third-party-skip-second-execution/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) 2023 MojoHaus and Contributors | ||
# %% | ||
# 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.1=clean license:add-third-party | ||
invoker.goals.2=license:add-third-party |
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,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2023 MojoHaus and Contributors | ||
%% | ||
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 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.codehaus.mojo.license.test</groupId> | ||
<artifactId>add-third-party-skip-second-execution</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<name>License Test :: add-third-party-skip-second-execution</name> | ||
<url>https://github.com/mojohaus/license-maven-plugin/issues/498</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<license.generateBundle>true</license.generateBundle> | ||
<license.verbose>true</license.verbose> | ||
</properties> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> |
29 changes: 29 additions & 0 deletions
29
src/it/add-third-party-skip-second-execution/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,29 @@ | ||
/* | ||
* #%L | ||
* License Maven Plugin | ||
* %% | ||
* Copyright (C) 2023 MojoHaus and Contributors | ||
* %% | ||
* 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, 'build.log'); | ||
assert file.exists(); | ||
content = file.text; | ||
assert 1 == content.count('[INFO] Writing third-party file to'); | ||
assert 1 == content.count('[INFO] Writing bundled third-party file to'); | ||
assert 1 == content.count('[INFO] All files are up to date, skip goal execution.'); | ||
assert 2 == content.count('[INFO] BUILD SUCCESS'); |
40 changes: 40 additions & 0 deletions
40
src/it/aggregate-add-third-party-second-execution/child1/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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2023 MojoHaus and Contributors | ||
%% | ||
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 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.codehaus.mojo.license.test</groupId> | ||
<artifactId>aggregate-add-third-party-second-execution</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
|
||
<artifactId>child1</artifactId> | ||
|
||
</project> | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
src/it/aggregate-add-third-party-second-execution/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) 2023 MojoHaus and Contributors | ||
# %% | ||
# 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.1=clean license:aggregate-add-third-party | ||
invoker.goals.2=license:aggregate-add-third-party |
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,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
#%L | ||
License Maven Plugin | ||
%% | ||
Copyright (C) 2023 MojoHaus and Contributors | ||
%% | ||
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>aggregate-add-third-party-second-execution</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<modules> | ||
<module>child1</module> | ||
</modules> | ||
|
||
<name>License Test :: aggregate-add-third-party-second-execution</name> | ||
<url>https://github.com/mojohaus/license-maven-plugin/issues/498</url> | ||
|
||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<license.generateBundle>true</license.generateBundle> | ||
<license.verbose>true</license.verbose> | ||
</properties> | ||
|
||
<build> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
src/it/aggregate-add-third-party-second-execution/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,29 @@ | ||
/* | ||
* #%L | ||
* License Maven Plugin | ||
* %% | ||
* Copyright (C) 2023 MojoHaus and Contributors | ||
* %% | ||
* 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, 'build.log'); | ||
assert file.exists(); | ||
content = file.text; | ||
assert 1 == content.count('[INFO] Writing third-party file to'); | ||
assert 1 == content.count('[INFO] Writing bundled third-party file'); | ||
assert 1 == content.count('[INFO] All files are up to date, skip goal execution.'); | ||
assert 2 == content.count('[INFO] BUILD SUCCESS'); |
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