Skip to content

Commit

Permalink
mojohaus#508 - Add basic IT setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Jul 5, 2023
1 parent fd12a8d commit d3271cd
Show file tree
Hide file tree
Showing 6 changed files with 331 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/it/ISSUE-508/THIRD-PARTY.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# https://www.mojohaus.org/license-maven-plugin/examples/example-thirdparty.html
2 changes: 2 additions & 0 deletions src/it/ISSUE-508/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
invoker.goals=clean license:aggregate-add-third-party@generate-and-check-licenses -Dlicense.skipAggregateAddThirdParty=false -Dlicense.thirdPartyFilename=DEPENDENCY-LICENSES -Dlicense.outputDirectory=target
invoker.failureBehavior=fail-fast
50 changes: 50 additions & 0 deletions src/it/ISSUE-508/module-a/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
License Maven Plugin
%%
Copyright (C) 2008 - 2011 CodeLutin, Codehaus, 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%
-->

<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>issue-508</artifactId>
<version>@project.version@</version>
</parent>

<name>License Test :: ISSUE-508 :: Module A</name>
<artifactId>issue-508-module-a</artifactId>

<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>

</project>
55 changes: 55 additions & 0 deletions src/it/ISSUE-508/module-b/pom.xml
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) 2008 - 2011 CodeLutin, Codehaus, 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%
-->

<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>issue-508</artifactId>
<version>@project.version@</version>
</parent>

<name>License Test :: ISSUE-508 :: Module B</name>
<artifactId>issue-508-module-b</artifactId>

<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>issue-508-module-a</artifactId>
<version>@project.version@</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>

</project>
200 changes: 200 additions & 0 deletions src/it/ISSUE-508/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
License Maven Plugin
%%
Copyright (C) 2008 - 2011 CodeLutin, Codehaus, 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%
-->

<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>issue-508</artifactId>
<version>@project.version@</version>

<name>License Test :: ISSUE-508</name>

<packaging>pom</packaging>

<modules>
<module>module-a</module>
<module>module-b</module>
</modules>

<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>@project.version@</version>
<configuration>
<useMissingFile>true</useMissingFile>
<failOnMissing>true</failOnMissing>
<includeTransitiveDependencies>true</includeTransitiveDependencies>
<fileTemplate>/org/codehaus/mojo/license/third-party-file-groupByMultiLicense.ftl
</fileTemplate>
<excludedScopes>system,test</excludedScopes>
<excludedGroups>${project.groupId}</excludedGroups>
<licenseMerges>
<licenseMerge>
Apache License, Version 2.0 |
Apache License, version 2.0 |
Apache License Version 2 |
Apache License Version 2.0 |
Apache License version 2.0 |
Apache 2 |
Apache 2.0 |
Apache License, 2.0 |
Apache License 2 |
Apache License 2.0 |
Apache Public License 2.0 |
Apache Software License - Version 2.0 |
Apache v2 |
ASL, version 2 |
The Apache License, Version 2.0 |
The Apache Software License, Version 2.0
</licenseMerge>
<licenseMerge>
Apache License |
Apache Software Licenses
</licenseMerge>
<licenseMerge>
BSD License |
BSD license |
BSD |
The BSD License
</licenseMerge>
<licenseMerge>
BSD 3-Clause License |
BSD 3-Clause |
BSD 3-clause |
The BSD 3-Clause License |
New BSD License |
New BSD license
</licenseMerge>
<licenseMerge>
Common Development and Distribution License (CDDL) v1.0 |
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 |
CDDL 1.0
</licenseMerge>
<licenseMerge>
Common Development and Distribution License (CDDL) v1.1 |
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 |
CDDL 1.1 |
Common Development and Distribution License (CDDL), Version 1.1
</licenseMerge>
<licenseMerge>
Common Development and Distribution License |
<!-- Multilicense, choosing CDDL -->
CDDL+GPL |
CDDL+GPL License |
CDDL + GPLv2 with classpath exception
</licenseMerge>
<licenseMerge>
Eclipse Public License, Version 1.0 |
Eclipse Public License 1.0 |
Eclipse Public License - v 1.0
</licenseMerge>
<licenseMerge>
Eclipse Public License, Version 2.0 |
EPL-2.0 |
EPL 2.0
</licenseMerge>
<licenseMerge>
Eclipse Distribution License, Version 1.0 |
Eclipse Distribution License - v 1.0 |
EDL 1.0
</licenseMerge>
<licenseMerge>
MIT License |
The MIT License |
MIT license |
MIT X11 License |
MIT
</licenseMerge>
<licenseMerge>
The GNU General Public License (GPL), Version 2, With Classpath Exception |
GPL2 w/ CPE
</licenseMerge>
<licenseMerge>
GNU Lesser General Public License (LGPL), Version 2.1 |
LGPL, version 2.1 |
GNU Lesser General Public License Version 2.1 |
GNU Lesser General Public License, version 2.1
</licenseMerge>
<licenseMerge>
Common Public License Version 1.0 |
Common Public License - v 1.0
</licenseMerge>
</licenseMerges>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<missingFile>${project.basedir}/THIRD-PARTY.properties</missingFile>
<aggregateMissingLicensesFile>${project.basedir}/THIRD-PARTY.properties</aggregateMissingLicensesFile>
</configuration>
<executions>
<execution>
<id>generate-and-check-licenses</id>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
</execution>
<execution>
<id>download-licenses</id>
<goals>
<goal>aggregate-download-licenses</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
</dependencyManagement>

</project>
23 changes: 23 additions & 0 deletions src/it/ISSUE-508/postbuild.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* #%L
* License Maven Plugin
* %%
* Copyright (C) 2008 - 2011 CodeLutin, Codehaus, 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%
*/
file = new File(basedir, 'target/DEPENDENCY-LICENSES')
assert file.exists()

0 comments on commit d3271cd

Please sign in to comment.