Skip to content

Commit 7d63977

Browse files
committed
Add license header to source files
1 parent 198245c commit 7d63977

19 files changed

Lines changed: 271 additions & 3 deletions

File tree

EPL-1.template.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
${project.name} - ${project.description}
2+
Copyright © ${year} ${owner}
3+
4+
All rights reserved. This program and the accompanying materials
5+
are made available under the terms of the Eclipse Public License v1.0
6+
which accompanies this distribution, and is available at
7+
http://www.eclipse.org/legal/epl-v10.html

pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
5+
projects, including: the latest commit hash, timestamp, most recent tag,
6+
number of commits since most recent tag. It also implements a "follow first
7+
parent" flavor of git describe.
8+
Copyright © 2012 Fernando Dobladez
9+
10+
All rights reserved. This program and the accompanying materials
11+
are made available under the terms of the Eclipse Public License v1.0
12+
which accompanies this distribution, and is available at
13+
http://www.eclipse.org/legal/epl-v10.html
14+
15+
-->
216
<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">
317
<modelVersion>4.0.0</modelVersion>
418

@@ -140,6 +154,40 @@
140154
</executions>
141155
</plugin>
142156

157+
<plugin>
158+
<groupId>com.mycila</groupId>
159+
<artifactId>license-maven-plugin</artifactId>
160+
<version>4.6</version>
161+
<configuration>
162+
<licenseSets>
163+
<licenseSet>
164+
<header>${project.basedir}/EPL-1.template.txt</header>
165+
<properties>
166+
<year>${project.inceptionYear}</year>
167+
<owner>Fernando Dobladez</owner>
168+
</properties>
169+
<excludes>
170+
<exclude>.gitignore</exclude>
171+
<exclude>EPL-1.template.txt</exclude>
172+
<exclude>LICENSE</exclude>
173+
<exclude>README.md</exclude>
174+
<exclude>src/it/README.md</exclude>
175+
<exclude>src/test/resources/**</exclude>
176+
</excludes>
177+
</licenseSet>
178+
</licenseSets>
179+
</configuration>
180+
<executions>
181+
<execution>
182+
<id>check-headers</id>
183+
<phase>verify</phase>
184+
<goals>
185+
<goal>check</goal>
186+
</goals>
187+
</execution>
188+
</executions>
189+
</plugin>
190+
143191
<plugin>
144192
<groupId>org.apache.maven.plugins</groupId>
145193
<artifactId>maven-dependency-plugin</artifactId>

src/it/custom-properties/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
<!--
2+
3+
Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
4+
projects, including: the latest commit hash, timestamp, most recent tag,
5+
number of commits since most recent tag. It also implements a "follow first
6+
parent" flavor of git describe.
7+
Copyright © 2012 Fernando Dobladez
8+
9+
All rights reserved. This program and the accompanying materials
10+
are made available under the terms of the Eclipse Public License v1.0
11+
which accompanies this distribution, and is available at
12+
http://www.eclipse.org/legal/epl-v10.html
13+
14+
-->
115
<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">
216
<modelVersion>4.0.0</modelVersion>
317

418
<groupId>com.code54.mojo</groupId>
519
<artifactId>buildversion-plugin-example</artifactId>
6-
<version>9.9.99</version>
20+
<version>1.1.0-SNAPSHOT</version>
721

822
<name>Build version project example</name>
923

src/it/custom-properties/verify.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
3+
projects, including: the latest commit hash, timestamp, most recent tag,
4+
number of commits since most recent tag. It also implements a "follow first
5+
parent" flavor of git describe.
6+
* Copyright © 2012 Fernando Dobladez
7+
*
8+
* All rights reserved. This program and the accompanying materials
9+
* are made available under the terms of the Eclipse Public License v1.0
10+
* which accompanies this distribution, and is available at
11+
* http://www.eclipse.org/legal/epl-v10.html
12+
*/
113
// looking for timestamp with custom format yyyy-MM-dd
214

315
import java.nio.file.Files

src/it/setting-git-cmd/git.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
#!/usr/bin/env bash
2+
#
3+
# Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
4+
projects, including: the latest commit hash, timestamp, most recent tag,
5+
number of commits since most recent tag. It also implements a "follow first
6+
parent" flavor of git describe.
7+
# Copyright © 2012 Fernando Dobladez
8+
#
9+
# All rights reserved. This program and the accompanying materials
10+
# are made available under the terms of the Eclipse Public License v1.0
11+
# which accompanies this distribution, and is available at
12+
# http://www.eclipse.org/legal/epl-v10.html
13+
#
14+
215
git "$@"

src/it/setting-git-cmd/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
<!--
2+
3+
Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
4+
projects, including: the latest commit hash, timestamp, most recent tag,
5+
number of commits since most recent tag. It also implements a "follow first
6+
parent" flavor of git describe.
7+
Copyright © 2012 Fernando Dobladez
8+
9+
All rights reserved. This program and the accompanying materials
10+
are made available under the terms of the Eclipse Public License v1.0
11+
which accompanies this distribution, and is available at
12+
http://www.eclipse.org/legal/epl-v10.html
13+
14+
-->
115
<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">
216
<modelVersion>4.0.0</modelVersion>
317

418
<groupId>com.code54.mojo</groupId>
519
<artifactId>buildversion-plugin-example</artifactId>
6-
<version>9.9.99</version>
20+
<version>1.1.0-SNAPSHOT</version>
721

822
<name>Build version project example</name>
923

src/it/setting-git-cmd/setup.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
3+
projects, including: the latest commit hash, timestamp, most recent tag,
4+
number of commits since most recent tag. It also implements a "follow first
5+
parent" flavor of git describe.
6+
* Copyright © 2012 Fernando Dobladez
7+
*
8+
* All rights reserved. This program and the accompanying materials
9+
* are made available under the terms of the Eclipse Public License v1.0
10+
* which accompanies this distribution, and is available at
11+
* http://www.eclipse.org/legal/epl-v10.html
12+
*/
113
// make git.sh wrapper executable.
214
// Need to do this because maven-invoker-plugin's cloneProjectsTo doesn't seem to preserve
315
// permissions

src/it/setting-git-cmd/verify.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
3+
projects, including: the latest commit hash, timestamp, most recent tag,
4+
number of commits since most recent tag. It also implements a "follow first
5+
parent" flavor of git describe.
6+
* Copyright © 2012 Fernando Dobladez
7+
*
8+
* All rights reserved. This program and the accompanying materials
9+
* are made available under the terms of the Eclipse Public License v1.0
10+
* which accompanies this distribution, and is available at
11+
* http://www.eclipse.org/legal/epl-v10.html
12+
*/
113
// looking for usage of "git.sh", because we specified that as the git command to use
214

315
import java.nio.file.Files

src/it/simple-project/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
<!--
2+
3+
Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
4+
projects, including: the latest commit hash, timestamp, most recent tag,
5+
number of commits since most recent tag. It also implements a "follow first
6+
parent" flavor of git describe.
7+
Copyright © 2012 Fernando Dobladez
8+
9+
All rights reserved. This program and the accompanying materials
10+
are made available under the terms of the Eclipse Public License v1.0
11+
which accompanies this distribution, and is available at
12+
http://www.eclipse.org/legal/epl-v10.html
13+
14+
-->
115
<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">
216
<modelVersion>4.0.0</modelVersion>
317

418
<groupId>com.code54.mojo</groupId>
519
<artifactId>buildversion-plugin-example</artifactId>
6-
<version>9.9.99</version>
20+
<version>1.1.0-SNAPSHOT</version>
721

822
<name>Build version project example</name>
923

src/it/simple-project/setup.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Build Version Maven Plugin - This is a maven plugin that extracts current build information from git
3+
projects, including: the latest commit hash, timestamp, most recent tag,
4+
number of commits since most recent tag. It also implements a "follow first
5+
parent" flavor of git describe.
6+
* Copyright © 2012 Fernando Dobladez
7+
*
8+
* All rights reserved. This program and the accompanying materials
9+
* are made available under the terms of the Eclipse Public License v1.0
10+
* which accompanies this distribution, and is available at
11+
* http://www.eclipse.org/legal/epl-v10.html
12+
*/
113
// make this test project a "git" repository by copying the .git directory
214
// from the sample project used on unit tests
315

0 commit comments

Comments
 (0)