From 6d2517284b774b2ab6cb4762a8c749d0daf8c2f5 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Wed, 11 Sep 2019 12:08:57 -0400 Subject: Adding/Replacing Plugins to format/validate code Replacing Groovy script with directory-maven-plugin to identify baseDirPath Add license-maven-plugin plugin to Generate / Validate Copyright header Adding tidy-maven-plugin to format / validate POM.xml Updating Java Code Formatter Sytle XML to Version 13 Issue-ID: LOG-1129 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Ifa333053bb1dff70f28b14ea9460073043e9c847 --- project-configs/code-tools/onap-eclipse-format.xml | 313 ------------- project-configs/code-tools/onap-java-format.xml | 343 ++++++++++++++ .../logging-filter/logging-filter-base/pom.xml | 6 +- .../onap/logging/filter/base/ONAPComponents.java | 4 +- .../logging/filter/base/ONAPComponentsList.java | 4 +- .../logging-filter/logging-filter-spring/pom.xml | 6 +- reference/logging-filter/pom.xml | 492 +++++++++++---------- 7 files changed, 610 insertions(+), 558 deletions(-) delete mode 100644 project-configs/code-tools/onap-eclipse-format.xml create mode 100644 project-configs/code-tools/onap-java-format.xml diff --git a/project-configs/code-tools/onap-eclipse-format.xml b/project-configs/code-tools/onap-eclipse-format.xml deleted file mode 100644 index 093866a..0000000 --- a/project-configs/code-tools/onap-eclipse-format.xml +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/project-configs/code-tools/onap-java-format.xml b/project-configs/code-tools/onap-java-format.xml new file mode 100644 index 0000000..1181297 --- /dev/null +++ b/project-configs/code-tools/onap-java-format.xml @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/reference/logging-filter/logging-filter-base/pom.xml b/reference/logging-filter/logging-filter-base/pom.xml index 297d54d..d275833 100644 --- a/reference/logging-filter/logging-filter-base/pom.xml +++ b/reference/logging-filter/logging-filter-base/pom.xml @@ -54,9 +54,9 @@ test - org.mockito - mockito-core - test + org.mockito + mockito-core + test diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponents.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponents.java index 1b9c1cd..06fbba9 100644 --- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponents.java +++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponents.java @@ -7,9 +7,9 @@ * 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. diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponentsList.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponentsList.java index f117ab7..7ffc251 100644 --- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponentsList.java +++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/ONAPComponentsList.java @@ -7,9 +7,9 @@ * 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. diff --git a/reference/logging-filter/logging-filter-spring/pom.xml b/reference/logging-filter/logging-filter-spring/pom.xml index 42f5fe8..e7ae8f8 100644 --- a/reference/logging-filter/logging-filter-spring/pom.xml +++ b/reference/logging-filter/logging-filter-spring/pom.xml @@ -63,9 +63,9 @@ test - org.mockito - mockito-core - test + org.mockito + mockito-core + test diff --git a/reference/logging-filter/pom.xml b/reference/logging-filter/pom.xml index 6038024..aef5327 100644 --- a/reference/logging-filter/pom.xml +++ b/reference/logging-filter/pom.xml @@ -1,241 +1,263 @@ - 4.0.0 - - - org.onap.logging-analytics - logging-reference - 1.5.0-SNAPSHOT - - logging-filter-parent - pom + 4.0.0 - - logging-filter-base - logging-filter-spring - - - - false - true - UTF-8 - + + org.onap.logging-analytics + logging-reference + 1.5.0-SNAPSHOT + - - - - javax.annotation - javax.annotation-api - 1.2 - provided - - - org.onap.logging-analytics - logging-slf4j - 1.5.0-SNAPSHOT - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - javax.ws.rs - javax.ws.rs-api - 2.0.1 - provided - - - org.slf4j - slf4j-api - 1.7.25 - provided - - - org.apache.logging.log4j - log4j-slf4j-impl - 2.11.2 - test - - - junit - junit - 4.11 - test - - - org.mockito - mockito-core - 2.15.0 - test - - - + logging-filter-parent + pom - - - - maven-compiler-plugin - 2.5.1 - - - default-compile - compile - - compile - - - 1.8 - 1.8 - true - - -parameters - -Xlint:deprecation - - - - - default-testCompile - test-compile - - testCompile - - - 1.8 - 1.8 - true - - -parameters - -Xlint:deprecation - - - - - - 1.8 - 1.8 - true - - -parameters - -Xlint:deprecation - - - - - org.codehaus.gmaven - groovy-maven-plugin - 2.0 - - - - find-basepath - validate - - execute - - - - - - - - - - - net.revelc.code.formatter - formatter-maven-plugin - 2.9.0 - - - format-java - - format - - - ${format.skipExecute} - ${base-path}/project-configs/code-tools/onap-eclipse-format.xml - - - - format-xml - - format - - - ${format.skipExecute} - ${project.basedir} - ${base-path}/project-configs/code-tools/pom-format.properties - - ${project.basedir}/pom.xml - - - - - validate-java - - validate - - - ${format.skipValidate} - ${base-path}/project-configs/code-tools/onap-eclipse-format.xml - - - - validate-poms - - validate - - - ${format.skipValidate} - ${base-path}/project-configs/code-tools/pom-format.properties - - ${project.basedir}/pom.xml - - - - - - - com.fasterxml.jackson.core - jackson-annotations - 2.9.8 - - - - - - - - format - - true - false - - - + + logging-filter-base + logging-filter-spring + + + + false + true + UTF-8 + + + + + + javax.annotation + javax.annotation-api + 1.2 + provided + + + org.onap.logging-analytics + logging-slf4j + 1.5.0-SNAPSHOT + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + javax.ws.rs + javax.ws.rs-api + 2.0.1 + provided + + + org.slf4j + slf4j-api + 1.7.25 + provided + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.11.2 + test + + + junit + junit + 4.11 + test + + + org.mockito + mockito-core + 2.15.0 + test + + + + + + + + maven-compiler-plugin + 2.5.1 + + + default-compile + compile + + compile + + + + default-testCompile + test-compile + + testCompile + + + + + 1.8 + 1.8 + true + -parameters + -Xlint:deprecation + + + + + + org.commonjava.maven.plugins + directory-maven-plugin + 0.2 + + + validate + directories + + execution-root + + + baseDirPath + + + + + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + 2.10.0 + + + format-java + + format + + process-sources + + LF + ${format.skipExecute} + ${project.basedir} + ${baseDirPath}/project-configs/code-tools/onap-java-format.xml + + src/**/*.java + + + + + validate-java + + validate + + validate + + LF + ${format.skipValidate} + ${project.basedir} + ${baseDirPath}/project-configs/code-tools/onap-java-format.xml + + src/**/*.java + + + + + + + com.fasterxml.jackson.core + jackson-annotations + 2.9.8 + + + + + + + org.codehaus.mojo + tidy-maven-plugin + 1.1.0 + + + format-pom + process-sources + + pom + + + ${format.skipExecute} + + + + validate-pom + validate + + check + + + ${format.skipValidate} + + + + + + + + + + format + + true + false + + + -- cgit 1.2.3-korg