Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
srdo committed Jan 3, 2019
1 parent b632f52 commit c64abee
Show file tree
Hide file tree
Showing 22 changed files with 500 additions and 447 deletions.
4 changes: 2 additions & 2 deletions src/it/ISSUE-145-2/README.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Demonstrates that the aggregateAddThirdParty goal can handle long sibling project dependency chains in the same reactor, and that it resolves dependencies based on the right remote repositories list.
Demonstrates that the aggregateAddThirdParty goal can handle long sibling project dependency chains in the same reactor, and that it resolves dependencies based on the right remote repositories list.

The project has parent A and children B, C, D, E with B depending on C, C dependending on D and D depending on E. The D dependency has a custom repository specified, and a dependency from that repo. When the plugin generates the license list, it should pick up the license for the dependency from the custom repo. E has a custom license specified, which should also be picked up.
132 changes: 66 additions & 66 deletions src/it/ISSUE-145-2/pom.xml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
<name>License Test :: ISSUE-145-2</name>
<packaging>pom</packaging>

<licenses>
<license>
<name>The GNU Lesser General Public License, Version 3.0</name>
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<license.verbose>true</license.verbose>
<license.sortByGroupIdAndArtifactId>true</license.sortByGroupIdAndArtifactId>
<licensesOutputFile>${project.build.directory}/licenses.xml</licensesOutputFile>
</properties>
<modules>
<module>submodule1</module>
<module>submodule2</module>
<module>submodule3</module>
<module>submodule4</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>@pom.version@</version>
<executions>
<execution>
<id>aggregate-add-third-party</id>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
<name>License Test :: ISSUE-145-2</name>
<packaging>pom</packaging>

<licenses>
<license>
<name>The GNU Lesser General Public License, Version 3.0</name>
<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<license.verbose>true</license.verbose>
<license.sortByGroupIdAndArtifactId>true</license.sortByGroupIdAndArtifactId>
<licensesOutputFile>${project.build.directory}/licenses.xml</licensesOutputFile>
</properties>

<modules>
<module>submodule1</module>
<module>submodule2</module>
<module>submodule3</module>
<module>submodule4</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>@pom.version@</version>
<executions>
<execution>
<id>aggregate-add-third-party</id>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
2 changes: 1 addition & 1 deletion src/it/ISSUE-145-2/postbuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
*/

def assertExistsFile(file) {
if (!file.exists() || file.isDirectory()) {
println(file.getAbsolutePath() + " file is missing or a directory.")
Expand Down
46 changes: 23 additions & 23 deletions src/it/ISSUE-145-2/submodule1/pom.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<artifactId>test-ISSUE-145-2-submodule1</artifactId>

<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule2</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<artifactId>test-ISSUE-145-2-submodule1</artifactId>

<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule2</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>

</project>
40 changes: 20 additions & 20 deletions src/it/ISSUE-145-2/submodule2/pom.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule2</artifactId>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule3</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule2</artifactId>

<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule3</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>
</project>
66 changes: 33 additions & 33 deletions src/it/ISSUE-145-2/submodule3/pom.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule3</artifactId>
<repositories>
<repository>
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<!-- This is not available on Central, which is essential to the test -->
<groupId>org.clojure-android</groupId>
<artifactId>tools.logging</artifactId>
<version>0.3.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule4</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule3</artifactId>

<repositories>
<repository>
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
</repositories>

<dependencies>
<dependency>
<!-- This is not available on Central, which is essential to the test -->
<groupId>org.clojure-android</groupId>
<artifactId>tools.logging</artifactId>
<version>0.3.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2-submodule4</artifactId>
<version>@pom.version@</version>
</dependency>
</dependencies>
</project>
36 changes: 18 additions & 18 deletions src/it/ISSUE-145-2/submodule4/pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule4</artifactId>
<licenses>
<license>
<name>Custom ISSUE-145 license</name>
</license>
</licenses>
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>test-ISSUE-145-2</artifactId>
<version>@pom.version@</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>test-ISSUE-145-2-submodule4</artifactId>

<licenses>
<license>
<name>Custom ISSUE-145 license</name>
</license>
</licenses>
</project>
4 changes: 2 additions & 2 deletions src/it/ISSUE-145/README.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Demonstrates that the aggregateAddThirdParty goal does not cause Maven to drop dependencies.
Demonstrates that the aggregateAddThirdParty goal does not cause Maven to drop dependencies.

The project has parent A and children B and C with B depending on C. The bug in the plugin caused B to lose its dependency on C at build time, because the plugin modified Maven's list of dependencies for B. The test verifies that the dependency is preserved.
Loading

0 comments on commit c64abee

Please sign in to comment.