Skip to content

Commit a1784e5

Browse files
committed
Add Maven plugin for copyright header management
1 parent 77706c0 commit a1784e5

File tree

1 file changed

+84
-30
lines changed

1 file changed

+84
-30
lines changed

pom.xml

Lines changed: 84 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright 2021 - 2022 the original author or authors.
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ https://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
17-
18-
<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/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
194
<modelVersion>4.0.0</modelVersion>
205

216
<groupId>org.springframework.sbm</groupId>
@@ -64,11 +49,11 @@
6449

6550
<repositories>
6651
<!-- OR Snapshots repo -->
67-
<!-- <repository>-->
68-
<!-- <id>rewrite-snapshots</id>-->
69-
<!-- <name>rewrite-snapshots</name>-->
70-
<!-- <url>https://oss.sonatype.org/content/repositories/snapshots/</url>-->
71-
<!-- </repository>-->
52+
<!-- <repository>-->
53+
<!-- <id>rewrite-snapshots</id>-->
54+
<!-- <name>rewrite-snapshots</name>-->
55+
<!-- <url>https://oss.sonatype.org/content/repositories/snapshots/</url>-->
56+
<!-- </repository>-->
7257
<repository>
7358
<id>jcenter</id>
7459
<name>jcenter</name>
@@ -151,7 +136,8 @@
151136
<version>${spring-shell.version}</version>
152137
<type>pom</type>
153138
<scope>import</scope>
154-
</dependency> <dependency>
139+
</dependency>
140+
<dependency>
155141
<groupId>me.tongfei</groupId>
156142
<artifactId>progressbar</artifactId>
157143
<version>${progressbar.version}</version>
@@ -365,12 +351,12 @@
365351
<trimStackTrace>false</trimStackTrace>
366352
</configuration>
367353
<executions>
368-
<execution>
369-
<goals>
370-
<goal>integration-test</goal>
371-
<goal>verify</goal>
372-
</goals>
373-
</execution>
354+
<execution>
355+
<goals>
356+
<goal>integration-test</goal>
357+
<goal>verify</goal>
358+
</goals>
359+
</execution>
374360
</executions>
375361
</plugin>
376362

@@ -385,7 +371,8 @@
385371
<artifactId>maven-release-plugin</artifactId>
386372
<version>3.0.0-M7</version>
387373
<configuration>
388-
<connectionUrl>scm:git:https://github.com/spring-projects-experimental/spring-boot-migrator.git</connectionUrl>
374+
<connectionUrl>scm:git:https://github.com/spring-projects-experimental/spring-boot-migrator.git
375+
</connectionUrl>
389376
<autoVersionSubmodules>true</autoVersionSubmodules>
390377
<tagNameFormat>@{project.version}</tagNameFormat>
391378
<releaseProfiles>release</releaseProfiles>
@@ -426,7 +413,74 @@
426413
<forceJavacCompilerUse>true</forceJavacCompilerUse>
427414
</configuration>
428415
</plugin>
416+
<plugin>
417+
<groupId>com.mycila</groupId>
418+
<artifactId>license-maven-plugin</artifactId>
419+
<version>4.1</version>
420+
<executions>
421+
<execution>
422+
<phase>validate</phase>
423+
<goals>
424+
<goal>format</goal>
425+
</goals>
426+
</execution>
427+
</executions>
428+
<configuration>
429+
<properties>
430+
<owner>the original author or authors.</owner>
431+
<email></email>
432+
<year>2022</year>
433+
</properties>
434+
<licenseSets>
435+
<licenseSet>
436+
<inlineHeader>
437+
<!-- @formatter:off -->
438+
Copyright 2021 - ${year} the original author or authors.
439+
440+
Licensed under the Apache License, Version 2.0 (the "License");
441+
you may not use this file except in compliance with the License.
442+
You may obtain a copy of the License at
443+
444+
https://www.apache.org/licenses/LICENSE-2.0
429445

446+
Unless required by applicable law or agreed to in writing, software
447+
distributed under the License is distributed on an "AS IS" BASIS,
448+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
449+
See the License for the specific language governing permissions and
450+
limitations under the License.
451+
<!-- @formatter:on -->
452+
</inlineHeader>
453+
<excludes>
454+
<exclude>**/.sdkmanrc</exclude>
455+
<exclude>**/*.adoc</exclude>
456+
<exclude>**/*.puml</exclude>
457+
<exclude>**/.rewrite*/**</exclude>
458+
<exclude>**/src/main/resources/banner.txt</exclude>
459+
<exclude>**/testcode/**</exclude>
460+
<exclude>**/test-code/**</exclude>
461+
<exclude>**/pom.xml</exclude>
462+
<exclude>**/*.properties</exclude>
463+
<exclude>**/*.yaml</exclude>
464+
<exclude>**/*.yml</exclude>
465+
<exclude>**/*.map</exclude>
466+
<exclude>**/*.html</exclude>
467+
<exclude>**/*.xhtml</exclude>
468+
<exclude>**/*.jsp</exclude>
469+
<exclude>**/*.js</exclude>
470+
<exclude>**/*.css</exclude>
471+
<exclude>**/*.txt</exclude>
472+
<exclude>**/*.xjb</exclude>
473+
<exclude>**/*.ftl</exclude>
474+
<exclude>**/*.xsd</exclude>
475+
<exclude>**/*.xml</exclude>
476+
<exclude>**/*.sh</exclude>
477+
<exclude>**/generated/**</exclude>
478+
<exclude>**/Dockerfile</exclude>
479+
</excludes>
480+
</licenseSet>
481+
</licenseSets>
482+
</configuration>
483+
</plugin>
430484
</plugins>
431485
</build>
432486
</project>

0 commit comments

Comments
 (0)