Skip to content

Commit 43b325e

Browse files
committed
Add license management plugin
1 parent cd3c1cb commit 43b325e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+522
-266
lines changed

LICENSE.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Apache License
32
Version 2.0, January 2004
43
http://www.apache.org/licenses/

pom.xml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
<printFailingErrors>true</printFailingErrors>
351351
<includeTests>true</includeTests>
352352
<rulesets>
353-
<ruleset>${basedir}/rule-set-pmd.xml</ruleset>
353+
<ruleset>${basedir}/src/main/config/rule-set-pmd.xml</ruleset>
354354
</rulesets>
355355
</configuration>
356356
</plugin>
@@ -384,8 +384,7 @@
384384
<goal>check</goal>
385385
</goals>
386386
<configuration>
387-
<configLocation>checkstyle.xml</configLocation>
388-
<headerLocation>rule-set-hdr.txt</headerLocation>
387+
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
389388
<consoleOutput>true</consoleOutput>
390389
<failsOnError>true</failsOnError>
391390
<includeTestSourceDirectory>true</includeTestSourceDirectory>
@@ -416,6 +415,31 @@
416415
</ignoredResourcePatterns>
417416
</configuration>
418417
</plugin>
418+
<plugin>
419+
<groupId>org.codehaus.mojo</groupId>
420+
<artifactId>license-maven-plugin</artifactId>
421+
<version>1.9</version>
422+
<executions>
423+
<execution>
424+
<id>download-licenses</id>
425+
<goals>
426+
<goal>update-file-header</goal>
427+
<goal>update-project-license</goal>
428+
<goal>add-third-party</goal>
429+
</goals>
430+
<phase>process-sources</phase>
431+
<configuration>
432+
<licenseName>apache_v2</licenseName>
433+
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
434+
<canUpdateCopyright>true</canUpdateCopyright>
435+
<canUpdateDescription>true</canUpdateDescription>
436+
<emptyLineAfterHeader>true</emptyLineAfterHeader>
437+
<generateBundle>true</generateBundle>
438+
<failIfWarning>true</failIfWarning>
439+
</configuration>
440+
</execution>
441+
</executions>
442+
</plugin>
419443
<plugin>
420444
<groupId>org.codehaus.mojo</groupId>
421445
<artifactId>versions-maven-plugin</artifactId>
@@ -433,7 +457,7 @@
433457
</execution>
434458
</executions>
435459
<configuration>
436-
<rulesUri>file://${basedir}/rule-set-ver.xml</rulesUri>
460+
<rulesUri>file://${basedir}/src/main/config/rule-set-ver.xml</rulesUri>
437461
</configuration>
438462
</plugin>
439463
</plugins>

rule-set-hdr.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

rule-set-ver.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
22

3+
<!--
4+
#%L
5+
LmdbJava
6+
%%
7+
Copyright (C) 2016 The LmdbJava Open Source Project
8+
%%
9+
Licensed under the Apache License, Version 2.0 (the "License");
10+
you may not use this file except in compliance with the License.
11+
You may obtain a copy of the License at
12+
13+
http://www.apache.org/licenses/LICENSE-2.0
14+
15+
Unless required by applicable law or agreed to in writing, software
16+
distributed under the License is distributed on an "AS IS" BASIS,
17+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
See the License for the specific language governing permissions and
19+
limitations under the License.
20+
#L%
21+
-->
322
<!-- https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle_checks.xml -->
423
<module name="Checker">
524
<module name="SeverityMatchFilter">
@@ -95,8 +114,4 @@
95114
<property name="maximumNumber" value="2"/>
96115
</module>
97116
</module>
98-
<module name="Header">
99-
<property name="headerFile" value="${checkstyle.header.file}"/>
100-
<property name="fileExtensions" value="java"/>
101-
</module>
102117
</module>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
LmdbJava
5+
%%
6+
Copyright (C) 2016 The LmdbJava Open Source Project
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
221
<ruleset xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="mybraces" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
322
<rule ref="rulesets/java/basic.xml"/>
423
<rule ref="rulesets/java/braces.xml"/>

src/main/config/rule-set-ver.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
LmdbJava
5+
%%
6+
Copyright (C) 2016 The LmdbJava Open Source Project
7+
%%
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
#L%
20+
-->
21+
<ruleset xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" comparisonMethod="maven" xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
22+
<ignoreVersions>
23+
<ignoreVersion type="regex">.*Alpha.*</ignoreVersion>
24+
<ignoreVersion type="regex">.*beta.*</ignoreVersion>
25+
<ignoreVersion type="regex">.*atlassian.*</ignoreVersion>
26+
</ignoreVersions>
27+
</ruleset>

src/main/java/org/lmdbjava/BufferProxy.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
/*
2-
* Copyright 2016 The LmdbJava Project, http://lmdbjava.org/
3-
*
1+
/*-
2+
* #%L
3+
* LmdbJava
4+
* %%
5+
* Copyright (C) 2016 The LmdbJava Open Source Project
6+
* %%
47
* Licensed under the Apache License, Version 2.0 (the "License");
58
* you may not use this file except in compliance with the License.
69
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1013
* Unless required by applicable law or agreed to in writing, software
1114
* distributed under the License is distributed on an "AS IS" BASIS,
1215
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1316
* See the License for the specific language governing permissions and
1417
* limitations under the License.
18+
* #L%
1519
*/
20+
1621
package org.lmdbjava;
1722

1823
import static java.lang.Long.BYTES;

src/main/java/org/lmdbjava/ByteBufferProxy.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
/*
2-
* Copyright 2016 The LmdbJava Project, http://lmdbjava.org/
3-
*
1+
/*-
2+
* #%L
3+
* LmdbJava
4+
* %%
5+
* Copyright (C) 2016 The LmdbJava Open Source Project
6+
* %%
47
* Licensed under the Apache License, Version 2.0 (the "License");
58
* you may not use this file except in compliance with the License.
69
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1013
* Unless required by applicable law or agreed to in writing, software
1114
* distributed under the License is distributed on an "AS IS" BASIS,
1215
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1316
* See the License for the specific language governing permissions and
1417
* limitations under the License.
18+
* #L%
1519
*/
20+
1621
package org.lmdbjava;
1722

1823
import static java.lang.ThreadLocal.withInitial;

src/main/java/org/lmdbjava/ByteUnit.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
/*
2-
* Copyright 2016 The LmdbJava Project, http://lmdbjava.org/
3-
*
1+
/*-
2+
* #%L
3+
* LmdbJava
4+
* %%
5+
* Copyright (C) 2016 The LmdbJava Open Source Project
6+
* %%
47
* Licensed under the Apache License, Version 2.0 (the "License");
58
* you may not use this file except in compliance with the License.
69
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
1013
* Unless required by applicable law or agreed to in writing, software
1114
* distributed under the License is distributed on an "AS IS" BASIS,
1215
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1316
* See the License for the specific language governing permissions and
1417
* limitations under the License.
18+
* #L%
1519
*/
20+
1621
package org.lmdbjava;
1722

1823
import java.text.DecimalFormat;

0 commit comments

Comments
 (0)