Reputation: 451
I have a multi-module build with quite some dependencies. Each subproject has its own dependencies report and there is one project that depends (transitively) on all the other projects. Now there are many dependencies that are missing licensing information. I would like to include all these missing licenses in the dependency report. But I can't seem to get this working. Does anyone have suggestions?
What I am currently trying is:
<dependency> <groupId>org.postgresql</groupId> <artifactId>jdbc4</artifactId> <licenses><license><name>bsd_pgsql</name></license></licenses> </dependency>
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> <version>1.5</version> <configuration> <useMissingFile>true</useMissingFile> <licensesConfigFile>C:/eclipse-workspace-kepler/TheParentProject/src/license/licenses.xml</licensesConfigFile> <licenseName>zk_potix_eula</licenseName> <licenseName>bsd_pgsql</licenseName> <licenseResolver>file://${project.basedir}/src/license</licenseResolver> <licenseMerges>...</licenseMerges> </configuration> <executions> <execution> <id>first</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase> </execution> <execution> <id>download-licenses</id> <phase>process-resources</phase> <goals> <goal>download-licenses</goal> </goals> </execution> <execution> <id>add-third-party</id> <phase>process-resources</phase> <goals> <goal>aggregate-add-third-party</goal> </goals> </execution> </executions> </plugin>
Upvotes: 0
Views: 4334
Reputation: 451
I see, I forgot to include the third-parties report that contains all the required information.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<useMissingFile>true</useMissingFile>
<useRepositoryMissingFiles>true</useRepositoryMissingFiles>
<licenseName>zk_potix_eula</licenseName>
<licenseName>bsd_pgsql</licenseName>
<licenseName>bsd_hamcrest</licenseName>
<licenseName>bsd_dom4j</licenseName>
<licenseResolver>file://${project.parent.basedir}/src/license</licenseResolver>
<licenseMerges>
<licenseMerge>Apache 2.0|The Apache Software License, Version 2.0|Apache License, Version 2.0|apache_v2</licenseMerge>
<licenseMerge>CDDL 1.0|COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution License (CDDL) v1.0|cddl_v1</licenseMerge>
<licenseMerge>GNU LGPL 2.1|GNU Lesser General Public License (LGPL), Version 2.1|GNU Lesser General Public License, version 2.1|lgpl_v2_1</licenseMerge>
<licenseMerge>GNU LGPL 3|GNU LESSER GENERAL PUBLIC LICENSE, Version 3|GNU Lesser General Public Licence|GNU Lesser General Public License|GNU LESSER GENERAL PUBLIC LICENSE</licenseMerge>
<licenseMerge>Dual license: CDDL 1.0 and GPL v2|Dual license consisting of the CDDL v1.0 and GPL v2|CDDL+GPLv2|CDDL+GPL|CDDL+GPL License</licenseMerge>
<licenseMerge>Dual license: CDDL 1.1 and GPL v2|Dual license consisting of the CDDL v1.1 and GPL v2|CDDL1_1+GPLv2</licenseMerge>
<licenseMerge>Dual License: CDDL 1.0 and GPL V2 with Classpath Exception|CDDL + GPLv2 with classpath exception</licenseMerge>
</licenseMerges>
</configuration>
</plugin>
Upvotes: 1