Re-add maven license plugin 73/43373/1
authorLee, Tian (tl5884) <tl5884@att.com>
Tue, 17 Apr 2018 14:31:49 +0000 (15:31 +0100)
committerLee, Tian (tl5884) <TianL@amdocs.com>
Tue, 17 Apr 2018 14:39:40 +0000 (15:39 +0100)
The plugin is now configured to enforce the presence of license headers
without overwriting any existing headers.

Change-Id: I11c2fc6fed0d893153f1bb8c02d5b9a70e56cdae
Issue-ID: AAI-920
Signed-off-by: Lee, Tian (tl5884) <tl5884@att.com>
License.txt [new file with mode: 0644]
pom.xml

diff --git a/License.txt b/License.txt
new file mode 100644 (file)
index 0000000..0a7259c
--- /dev/null
@@ -0,0 +1,18 @@
+============LICENSE_START=======================================================
+org.onap.aai
+================================================================================
+Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+Copyright © 2017-2018 European Software Marketing Ltd.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END=========================================================
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 752ae2d..568abc1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,21 +1,25 @@
-<!-- ============LICENSE_START======================================================= -->
-<!-- org.onap.aai -->
-<!-- ================================================================================ -->
-<!-- Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. -->
-<!-- Copyright © 2017-2018 European Software Marketing Ltd. -->
-<!-- ================================================================================ -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
-<!-- you may not use this file except in compliance with the License. -->
-<!-- You may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
-<!-- See the License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-<!-- ============LICENSE_END========================================================= -->
+<!--
+
+    ============LICENSE_START=======================================================
+    org.onap.aai
+    ================================================================================
+    Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+    Copyright © 2017-2018 European Software Marketing Ltd.
+    ================================================================================
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ============LICENSE_END=========================================================
+
+-->
 <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">
        <modelVersion>4.0.0</modelVersion>
                                        </environmentVariables>
                                </configuration>
                        </plugin>
+                       
+                       <plugin>
+                               <groupId>com.mycila</groupId>
+                               <artifactId>license-maven-plugin</artifactId>
+                               <version>3.0</version>
+                               <configuration>
+                                       <header>License.txt</header>
+                                       <includes>
+                                               <include>src/main/java/**</include>
+                                               <include>src/test/java/**</include>
+                                               <include>pom.xml</include>
+                                       </includes>
+                                       <skipExistingHeaders>true</skipExistingHeaders>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <!-- Set goal from "check" to "format" to auto update license headers -->
+                                                       <goal>check</goal>
+                                               </goals>
+                                         <phase>process-sources</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       
                </plugins>
 
        </build>