Skip to content

Commit 65182b0

Browse files
committed
Add 3rd Party Goal in effect
- A generated-sources/license/THIRD-PARTY.txt included in build dir - Skip spring-app from license compliance - fail on generate-resources if compliance fails - Skip dependencies in test scope
1 parent b1432e3 commit 65182b0

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,11 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
591591
<artifactId>license-maven-plugin</artifactId>
592592
<version>2.4.0</version>
593593
<configuration>
594+
<acceptPomPackaging>true</acceptPomPackaging>
594595
<licenseName>apache_v2</licenseName>
595596
<failOnBlacklist>true</failOnBlacklist>
596-
<!-- Fail the build if at least one dependency was detected without a license. -->
597597
<failOnMissing>true</failOnMissing>
598+
<excludedScopes>test</excludedScopes>
598599
<includedLicenses>
599600
<includedLicense>The MIT License</includedLicense>
600601
<includedLicense>Apache Software License - Version 2.0</includedLicense>
@@ -608,6 +609,12 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
608609

609610
<!-- other licenses as needed -->
610611
<includedLicense>Eclipse Distribution License - v 1.0</includedLicense>
612+
<includedLicense>Bouncy Castle Licence</includedLicense>
613+
614+
<!-- licenses for which action needed! -->
615+
616+
<includedLicense>CDDL + GPLv2 with classpath exception</includedLicense>
617+
<!-- Used in javax.annotation:javax.annotation-api -->
611618
</includedLicenses>
612619
<licenseMerges>
613620
<licenseMerge>Apache Software License - Version 2.0|Apache License Version 2.0|Apache 2.0|
@@ -618,14 +625,13 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
618625
<licenseMerge>The BSD 3-Clause License|BSD License 3</licenseMerge>
619626
<licenseMerge>Eclipse Distribution License - v 1.0|EDL 1.0</licenseMerge>
620627
<licenseMerge>Eclipse Public License v2.0|EPL 2.0</licenseMerge>
621-
<!-- Add other license merges as needed -->
622628
</licenseMerges>
623629
</configuration>
624630
<executions>
625631
<execution>
626-
<id>aggregate-add-third-party</id>
632+
<id>add-third-party</id>
627633
<goals>
628-
<goal>aggregate-add-third-party</goal>
634+
<goal>add-third-party</goal>
629635
</goals>
630636
</execution>
631637
</executions>

sample-code/spring-app/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@
184184
<skipTests>${skipTests}</skipTests>
185185
</configuration>
186186
</plugin>
187+
<plugin>
188+
<groupId>org.codehaus.mojo</groupId>
189+
<artifactId>license-maven-plugin</artifactId>
190+
<configuration>
191+
<skipAddThirdParty>true</skipAddThirdParty>
192+
</configuration>
193+
</plugin>
187194
</plugins>
188195
</build>
189196
</project>

0 commit comments

Comments
 (0)