Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate third party report fails on multimodule maven #318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions src/it/aggregate-third-party-report-multimodule/child1/pom.xml
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
License Maven Plugin
%%
Copyright (C) 2019 - Nikolas Falco
%%
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>aggregate-third-party-multimodule</artifactId>
<version>1.0</version>
</parent>
<artifactId>aggregate-third-party-multimodule-child1</artifactId>
<name>Aggregate Third Party Report: child1</name>

<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
</project>
45 changes: 45 additions & 0 deletions src/it/aggregate-third-party-report-multimodule/child2/pom.xml
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
License Maven Plugin
%%
Copyright (C) 2019 - Nikolas Falco
%%
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>aggregate-third-party-multimodule</artifactId>
<version>1.0</version>
</parent>
<artifactId>aggregate-third-party-multimodule-child2</artifactId>
<name>Aggregate Third Party Report: child2</name>

<dependencies>
<dependency>
<groupId>org.codehaus.mojo.license.test</groupId>
<artifactId>aggregate-add-third-party-multimodule-child1</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
23 changes: 23 additions & 0 deletions src/it/aggregate-third-party-report-multimodule/invoker.properties
@@ -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%
###
invoker.goals=clean license:aggregate-third-party-report
#invoker.failureBehavior=fail-at-end
62 changes: 62 additions & 0 deletions src/it/aggregate-third-party-report-multimodule/pom.xml
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
License Maven Plugin
%%
Copyright (C) 2019 - Nikolas Falco
%%
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-third-party-multimodule</artifactId>
<version>1.0</version>

<modules>
<module>child1</module>
<module>child2</module>
</modules>

<name>Aggregate Third Party: MultiModule parent</name>

<packaging>pom</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<license.verbose>true</license.verbose>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>@pom.version@</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>


32 changes: 32 additions & 0 deletions src/it/aggregate-third-party-report-multimodule/postbuild.groovy
@@ -0,0 +1,32 @@
/*
* #%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/generated-sources/license/THIRD-PARTY.txt');
assert file.exists();
content = file.text;
assert !content.contains('the project has no dependencies.');
assert !content.contains('commons-logging:commons-logging:1.1.1');
assert !content.contains('org.nuiton:nuiton-utils:1.4');
assert content.contains('org.nuiton.i18n:nuiton-i18n:1.2.2');
assert content.contains('junit:junit');

return true