Sync plugin versions for build-conf
- apply checkstyle to self
Change-Id: Ib2b429bfbef0a273fe949f312875e8906d2b0310
diff --git a/tools/build/conf/pom.xml b/tools/build/conf/pom.xml
index fa09c99..aa60ecf 100644
--- a/tools/build/conf/pom.xml
+++ b/tools/build/conf/pom.xml
@@ -47,14 +47,48 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <!-- TODO: update once following issue is fixed. -->
- <!-- https://jira.codehaus.org/browse/MCOMPILER-205 -->
- <version>2.5.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
+ <version>3.7.0</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <compilerArgs>
+ <compilerArg>-Xpkginfo:always</compilerArg>
+ </compilerArgs>
+ </configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>3.0.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>8.10</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <configLocation>${project.build.outputDirectory}/onos/checkstyle-mvn.xml</configLocation>
+ <suppressionsLocation>${project.build.outputDirectory}/onos/suppressions.xml
+ </suppressionsLocation>
+ <headerLocation>${project.build.outputDirectory}/onos/onos-java.header</headerLocation>
+ <failsOnError>false</failsOnError>
+ <logViolationsToConsole>true</logViolationsToConsole>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeResources>false</includeResources>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate-checkstyle</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
diff --git a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckDaemon.java b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckDaemon.java
index f3166b1..a253995 100644
--- a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckDaemon.java
+++ b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckDaemon.java
@@ -46,7 +46,7 @@
*/
public final class BuckDaemon {
- private static long POLLING_INTERVAL = 1000; //ms
+ private static final long POLLING_INTERVAL = 1000; //ms
private final Map<String, BuckTask> tasks = new HashMap<>();
private final String portLock;
@@ -62,6 +62,8 @@
* Main entry point for the daemon.
*
* @param args command-line arguments
+ * @throws CheckstyleException on checkstyle error
+ * @throws IOException on I/O error
*/
public static void main(String[] args)
throws CheckstyleException, IOException {
diff --git a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTask.java b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTask.java
index 50f079d..d579305 100644
--- a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTask.java
+++ b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTask.java
@@ -17,7 +17,7 @@
package org.onosproject.buckdaemon;
/**
- * Abstraction of a Buck task that can be spawned by the Buck daemon
+ * Abstraction of a Buck task that can be spawned by the Buck daemon.
*/
public interface BuckTask {
diff --git a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTaskContext.java b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTaskContext.java
index 2cfb35d..8dabfd2 100644
--- a/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTaskContext.java
+++ b/tools/build/conf/src/main/java/org/onosproject/buckdaemon/BuckTaskContext.java
@@ -25,8 +25,6 @@
import java.io.InputStreamReader;
import java.util.List;
-import static com.google.common.base.Preconditions.checkArgument;
-
/**
* Context for executing a single Buck task.
*/
@@ -74,6 +72,8 @@
/**
* Returns the symbolic task name.
+ *
+ * @return symbolic task name
*/
public String taskName() {
return taskName;
diff --git a/tools/build/conf/src/main/java/org/onosproject/checkstyle/package-info.java b/tools/build/conf/src/main/java/org/onosproject/checkstyle/package-info.java
new file mode 100644
index 0000000..241a819
--- /dev/null
+++ b/tools/build/conf/src/main/java/org/onosproject/checkstyle/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+/**
+ * checkstyle runner for BuckDaemon.
+ */
+package org.onosproject.checkstyle;