Skip to content

Commit a126aeb

Browse files
committed
chore(ci): check dependency licenses
1 parent fbedbd8 commit a126aeb

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,23 @@ jobs:
168168
name: "Check dependency rules"
169169
command: mvn enforcer:enforce -Drules=banDuplicatePomDependencyVersions,dependencyConvergence
170170

171+
check-licenses:
172+
parameters:
173+
maven-image:
174+
type: string
175+
default: *default-maven-image
176+
docker:
177+
- image: << parameters.maven-image >>
178+
steps:
179+
- checkout
180+
- restore_cache:
181+
name: Restoring Maven Cache
182+
keys:
183+
- maven-cache_v3-<< parameters.maven-image >>-
184+
- run:
185+
name: "Check dependency licenses"
186+
command: mvn license:check -Dlicense.dependencies.enforce=true
187+
171188
check-generate-site:
172189
parameters:
173190
maven-image:
@@ -232,6 +249,7 @@ workflows:
232249
jobs:
233250
- check-dependencies
234251
- check-generate-site
252+
- check-licenses
235253
- tests-java:
236254
name: jdk-8
237255
- tests-java:
@@ -256,6 +274,7 @@ workflows:
256274
requires:
257275
- check-dependencies
258276
- check-generate-site
277+
- check-licenses
259278
- jdk-8
260279
- jdk-11
261280
- jdk-17

pom.xml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,48 @@
240240
<properties>
241241
<organizationName>${project.organization.name}</organizationName>
242242
</properties>
243+
<dependencyPolicies>
244+
<dependencyPolicy>
245+
<type>LICENSE_NAME</type>
246+
<rule>APPROVE</rule>
247+
<value>The MIT License (MIT)</value>
248+
</dependencyPolicy>
249+
<dependencyPolicy>
250+
<type>LICENSE_NAME</type>
251+
<rule>APPROVE</rule>
252+
<value>The MIT License</value>
253+
</dependencyPolicy>
254+
<dependencyPolicy>
255+
<type>LICENSE_NAME</type>
256+
<rule>APPROVE</rule>
257+
<value>Apache-2.0</value>
258+
</dependencyPolicy>
259+
<dependencyPolicy>
260+
<type>LICENSE_URL</type>
261+
<rule>APPROVE</rule>
262+
<value>http://www.apache.org/licenses/LICENSE-2.0.txt</value>
263+
</dependencyPolicy>
264+
<dependencyPolicy>
265+
<type>LICENSE_URL</type>
266+
<rule>APPROVE</rule>
267+
<value>https://www.apache.org/licenses/LICENSE-2.0.txt</value>
268+
</dependencyPolicy>
269+
<dependencyPolicy>
270+
<type>LICENSE_URL</type>
271+
<rule>APPROVE</rule>
272+
<value>https://www.apache.org/licenses/LICENSE-2.0</value>
273+
</dependencyPolicy>
274+
<dependencyPolicy>
275+
<type>LICENSE_URL</type>
276+
<rule>APPROVE</rule>
277+
<value>http://opensource.org/licenses/BSD-3-Clause</value>
278+
</dependencyPolicy>
279+
<dependencyPolicy>
280+
<type>LICENSE_URL</type>
281+
<rule>APPROVE</rule>
282+
<value>https://www.eclipse.org/legal/epl-v20.html</value>
283+
</dependencyPolicy>
284+
</dependencyPolicies>
243285
</configuration>
244286
<executions>
245287
<execution>
@@ -375,7 +417,7 @@
375417
<plugin>
376418
<groupId>com.mycila</groupId>
377419
<artifactId>license-maven-plugin</artifactId>
378-
<version>4.1</version>
420+
<version>4.2.rc2</version>
379421
</plugin>
380422

381423
<plugin>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy