HC2VPP-397: add support for java 11 05/16705/9
authorMichal Cmarada <[email protected]>
Thu, 11 Apr 2019 08:18:16 +0000 (04:18 -0400)
committerMichal Cmarada <[email protected]>
Thu, 11 Apr 2019 08:18:16 +0000 (04:18 -0400)
- dependency updates
- compilation error fixes
- javadoc fixes

Change-Id: Ic7371931b0728c888a39350a77c959121afb9786
Signed-off-by: Michal Cmarada <[email protected]>
32 files changed:
acl/acl-impl/pom.xml
common/impl-parent/pom.xml
common/minimal-distribution-parent/pom.xml
dhcp/dhcp-impl/pom.xml
fib-management/fib-management-api/src/main/yang/[email protected]
fib-management/fib-management-impl/pom.xml
ioam/impl/pom.xml
ipsec/ipsec-impl/pom.xml
l3/impl/pom.xml
lisp/lisp2vpp/pom.xml
nat/nat2vpp/pom.xml
nsh/impl/pom.xml
release-notes/pom.xml
routing/routing-impl/pom.xml
srv6/srv6-impl/pom.xml
v3po/v3po2vpp/pom.xml
v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java
v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
vpp-classifier/impl/pom.xml
vpp-common/vpp-common-integration/pom.xml
vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java
vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/FutureProducer.java
vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java
vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java
vpp-common/vpp-translate-utils/pom.xml
vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/TagRewriteOperation.java
vpp-integration/api-docs/core/pom.xml
vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/MethodDelegatingClassVisitor.java
vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/MethodPluginCoverageVisitor.java
vpp-integration/api-docs/docs/pom.xml
vpp-integration/api-docs/scripts/pom.xml
vpp-integration/api-docs/scripts/src/main/groovy/io/fd/hc2vpp/docs/scripts/ApiDocsIndexGenerator.groovy

index 3ea1d09..e7edd57 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index d02e394..96b051c 100644 (file)
@@ -86,7 +86,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
-                    <version>2.10</version>
+                    <version>3.1.1</version>
                     <executions>
                         <execution>
                             <id>copy-dependencies</id>
                 </plugin>
                 <!-- Generate module to yang provider index -->
                 <plugin>
-                    <groupId>org.codehaus.gmaven</groupId>
-                    <artifactId>groovy-maven-plugin</artifactId>
+                    <groupId>org.codehaus.gmavenplus</groupId>
+                    <artifactId>gmavenplus-plugin</artifactId>
                     <executions>
                         <execution>
                             <id>generate-yang-index</id>
                                 <goal>execute</goal>
                             </goals>
                             <configuration>
-                                <source>
-                                    io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator.generateIndexForPresentModules(project, log)
-                                </source>
+                                <scripts>
+                                    <script>
+                                        <![CDATA[
+                                            import io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator
+                                            ModuleYangIndexGenerator.generateIndexForPresentModules(project, log)
+                                        ]]>
+                                    </script>
+                                </scripts>
                             </configuration>
                         </execution>
                     </executions>
index bb456f3..c3b0eef 100644 (file)
@@ -64,7 +64,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
-                    <version>2.10</version>
+                    <version>3.1.1</version>
                     <executions>
                         <execution>
                             <id>unpack-configuration</id>
@@ -83,8 +83,8 @@
                 <!-- Generate shell script -->
                 <!-- Extract modules started by distribution -->
                 <plugin>
-                    <groupId>org.codehaus.gmaven</groupId>
-                    <artifactId>groovy-maven-plugin</artifactId>
+                    <groupId>org.codehaus.gmavenplus</groupId>
+                    <artifactId>gmavenplus-plugin</artifactId>
                     <executions>
                         <execution>
                             <id>start-scripts-generation</id>
                                 <goal>execute</goal>
                             </goals>
                             <configuration>
-                                <source>
-                                    io.fd.honeycomb.common.scripts.StartupScriptGenerator.generate(project, properties, log)
-                                </source>
+                                <scripts>
+                                    <script>
+                                        <![CDATA[
+                                            import io.fd.honeycomb.common.scripts.StartupScriptGenerator
+                                            StartupScriptGenerator.generate(project, properties, log)
+                                        ]]>
+                                    </script>
+                                </scripts>
                             </configuration>
                         </execution>
                         <execution>
                                 <goal>execute</goal>
                             </goals>
                             <configuration>
-                                <source>
-                                    io.fd.honeycomb.common.scripts.ModulesListGenerator.generate(project, properties, log)
-                                </source>
+                                <scripts>
+                                    <script>
+                                        <![CDATA[
+                                            import io.fd.honeycomb.common.scripts.ModulesListGenerator
+                                            ModulesListGenerator.generate(project, log)
+                                        ]]>
+                                    </script>
+                                </scripts>
                             </configuration>
                         </execution>
                         <execution>
                                 <goal>execute</goal>
                             </goals>
                             <configuration>
-                                <source>
-                                    io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator.pairDistributionModulesWithYangModules(project, log)
-                                </source>
+                                <scripts>
+                                    <script>
+                                        <![CDATA[
+                                            import io.fd.honeycomb.common.scripts.ModuleYangIndexGenerator
+                                            ModuleYangIndexGenerator.pairDistributionModulesWithYangModules(project, log)
+                                        ]]>
+                                    </script>
+                                </scripts>
                             </configuration>
                         </execution>
                     </executions>
                 </plugin>
             </plugins>
         </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+        </plugins>
     </build>
 </project>
\ No newline at end of file
index e62d537..b9024eb 100644 (file)
@@ -84,7 +84,7 @@
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index d7d0f0a..4b2ba93 100644 (file)
@@ -86,10 +86,10 @@ module vpp-fib-table-management {
                      In VPP this table is mapped to ip_table_add_del VPP API message:
                      Add/del table request
                          A table can be added multiple times, but need be deleted only once.
-                         @param is_ipv6 - V4 or V6 table
-                         @param table_id - table ID associated with the route
+                         param is_ipv6 - V4 or V6 table
+                         param table_id - table ID associated with the route
                                            This table ID will apply to both the unicats and mlticast FIBs
-                         @param name - A client provided name/tag for the table. If this is
+                         param name - A client provided name/tag for the table. If this is
                                        not set by the client, then VPP will generate something meaningfull";
                 leaf address-family {
                     type identityref {
index 77732b2..fd6a05d 100644 (file)
@@ -87,7 +87,7 @@
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 42de48a..2536d7a 100644 (file)
@@ -60,7 +60,7 @@
     </dependency>
     <dependency>
         <groupId>org.hamcrest</groupId>
-        <artifactId>hamcrest-all</artifactId>
+        <artifactId>hamcrest</artifactId>
         <scope>test</scope>
     </dependency>
 
index bf705c4..7d112d7 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index fcfc703..e6fbef5 100644 (file)
@@ -63,7 +63,7 @@
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 9a0060c..26c0cdf 100755 (executable)
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index cab6187..413852f 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 1d7d08d..958d024 100644 (file)
@@ -29,7 +29,7 @@
   <packaging>bundle</packaging>
 
   <properties>
-    <guice.version>4.1.0</guice.version>
+    <guice.version>4.2.2</guice.version>
     <guice.config.version>1.2.0</guice.config.version>
   </properties>
 
@@ -62,7 +62,7 @@
     </dependency>
     <dependency>
         <groupId>org.hamcrest</groupId>
-        <artifactId>hamcrest-all</artifactId>
+        <artifactId>hamcrest</artifactId>
         <scope>test</scope>
     </dependency>
 
index 11e199c..cb54478 100644 (file)
@@ -60,7 +60,7 @@
       <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
-         <version>2.10</version>
+         <version>3.1.1</version>
          <executions>
             <execution>
                 <id>unpack-configuration</id>
index 3a4d16e..f13e3d0 100644 (file)
@@ -93,7 +93,7 @@
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 8b7c279..fdcad9a 100644 (file)
@@ -88,7 +88,7 @@
         <!-- Tests -->
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 7f59142..4794c01 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 5e025c5..659a7fe 100644 (file)
@@ -71,7 +71,7 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo
      * @param vppPhysAddress byte array of bytes in big endian order, constructing the network IF physical address.
      * @return String like "aa:bb:cc:dd:ee:ff"
      * @throws NullPointerException     if vppPhysAddress is null
-     * @throws IllegalArgumentException if vppPhysAddress.length < 6
+     * @throws IllegalArgumentException if vppPhysAddress.length &lt; 6
      */
     default String vppPhysAddrToYang(@Nonnull final byte[] vppPhysAddress) {
         Objects.requireNonNull(vppPhysAddress, "Empty physical address bytes");
@@ -171,11 +171,15 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo
     }
 
     /**
-     * Checks whether provided {@link SwInterfaceDetails} is detail of sub-interface<br> <li>subId == unique number of
-     * sub-interface within set of sub-interfaces of single interface <li>swIfIndex == unique index of
-     * interface/sub-interface within all interfaces <li>supSwIfIndex == unique index of parent interface <li>in case of
-     * interface , swIfIndex value equals supSwIfIndex <li>in case of subinterface, supSwIfIndex equals index of parent
-     * interface, swIfIndex is index of subinterface itselt
+     * Checks whether provided {@link SwInterfaceDetails} is detail of sub-interface<br>
+     *     <ul>
+     *         <li>subId == unique number of sub-interface within set of sub-interfaces of single interface</li>
+     *         <li>swIfIndex == unique index of interface/sub-interface within all interfaces</li>
+     *         <li>supSwIfIndex == unique index of parent interface</li>
+     *         <li>in case of interface , swIfIndex value equals supSwIfIndex</li>
+     *         <li>in case of subinterface, supSwIfIndex equals index of parent interface, swIfIndex is index of
+     *             subinterface itselt</li>
+     *     </ul>
      */
     default boolean isSubInterface(@Nonnull final SwInterfaceDetails elt) {
         //cant check by subId != 0, because you can pick 0 as value
@@ -183,11 +187,15 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo
     }
 
     /**
-     * Checks whether provided {@link SwInterfaceDetails} is detail of interface<br> <li>subId == unique number of
-     * subinterface within set of subinterfaces of single interface <li>swIfIndex == unique index of
-     * interface/subinterface within all interfaces <li>supSwIfIndex == unique index of parent interface <li>in case of
-     * interface , swIfIndex value equals supSwIfIndex <li>in case of subinterface, supSwIfIndex equals index of parent
-     * interface, swIfIndex is index of subinterface itselt
+     * Checks whether provided {@link SwInterfaceDetails} is detail of interface<br>
+     *     <ul>
+     *         <li>subId == unique number of subinterface within set of subinterfaces of single interface</li>
+     *         <li>swIfIndex == unique index of interface/subinterface within all interfaces</li>
+     *         <li>supSwIfIndex == unique index of parent interface</li>
+     *         <li>in case of interface , swIfIndex value equals supSwIfIndex</li>
+     *         <li>in case of subinterface, supSwIfIndex equals index of parent interface, swIfIndex is index
+     *             of subinterface itselt</li>
+     *     </ul>
      */
     default boolean isRegularInterface(@Nonnull final SwInterfaceDetails elt) {
         return !isSubInterface(elt);
index baf321a..8d4b93a 100644 (file)
@@ -121,7 +121,7 @@ final class InterfaceChangeNotificationProducer implements ManagedNotificationPr
      * Get mapped name for the interface. Best effort only! The mapping might not yet be stored in context data tree
      * (write transaction is still in progress and context changes have not been committed yet, or VPP sends the
      * notification before it returns create request(that would store mapping)).
-     * <p/>
+     *
      * In case mapping is not available, index is used as name.
      */
     private InterfaceNameOrIndex getIfcName(final SwInterfaceEvent swInterfaceEventNotification) {
index 1b362c6..662d42d 100644 (file)
             <artifactId>vpp-translate-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.4.0-b180725.0427</version>
+        </dependency>
 
 
         <!-- TODO - HC2VPP-97 change once interfaces-impl once modules present
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 4c96405..f567738 100644 (file)
@@ -31,7 +31,7 @@
 
     <properties>
         <jvpp.version>19.04-SNAPSHOT</jvpp.version>
-        <hamcrest.version>1.3</hamcrest.version>
+        <hamcrest.version>2.1</hamcrest.version>
     </properties>
 
     <build>
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <version>${hamcrest.version}</version>
             <scope>test</scope>
         </dependency>
index 45c28aa..88a0126 100644 (file)
@@ -61,6 +61,11 @@ public abstract class JvppDumpExecutorTest<T extends EntityDumpExecutor<?, ?>> i
     /**
      * Return pre-stubed mock that will throw {@link TimeoutException},
      * while performing desired method
+     *
+     * @return pre-stubed mock that will throw {@link TimeoutException}
+     * @throws InterruptedException when the operation is interrupted
+     * @throws ExecutionException when execution fails
+     * @throws TimeoutException when timeout occurs
      */
     protected FutureJVppCore doThrowTimeoutExceptionWhen()
             throws InterruptedException, ExecutionException, TimeoutException {
@@ -76,6 +81,8 @@ public abstract class JvppDumpExecutorTest<T extends EntityDumpExecutor<?, ?>> i
     /**
      * Return pre-stubed mock that will throw {@link VppInvocationException},
      * while performing desired method
+     *
+     * @return pre-stubed mock that will throw {@link VppInvocationException}
      */
     protected FutureJVppCore doThrowFailExceptionWhen() {
         return doReturn(failedFuture()).when(api);
@@ -84,6 +91,9 @@ public abstract class JvppDumpExecutorTest<T extends EntityDumpExecutor<?, ?>> i
     /**
      * Return pre-stubed mock that will return specified result
      * while performing desired method
+     *
+     * @param replyDump type of reply dump
+     * @return pre-stubed mock that will return specified result
      */
     protected <U> FutureJVppCore doReturnResponseWhen(U replyDump) {
         return doReturn(future(replyDump)).when(api);
index b277123..7e15997 100644 (file)
@@ -33,6 +33,7 @@ public interface FutureProducer {
      *
      * @param result returned when {@link CompletableFuture#get()} is invoked
      * @param <T>    the result type of returned future
+     * @return {@link CompletableFuture} with desired result
      */
     default <T> CompletableFuture<T> future(@Nonnull final T result) {
         final CompletableFuture<T> future = new CompletableFuture<>();
@@ -45,6 +46,7 @@ public interface FutureProducer {
      *
      * @param exception to be thrown when {@link CompletableFuture#get()} is invoked
      * @param <T>       the result type of returned future
+     * @return {@link CompletableFuture} with provided {@link Exception} as a result
      */
     default <T> CompletableFuture<T> failedFuture(@Nonnull final Exception exception) {
         final CompletableFuture<T> future = new CompletableFuture<>();
@@ -56,6 +58,7 @@ public interface FutureProducer {
      * Returns {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause.
      *
      * @param <T> the result type of returned future
+     * @return {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause
      */
     default <T> CompletableFuture<T> failedFuture() {
         return failedFuture(new VppCallbackException("test-call", "test error msg", 1 /* ctxId */, -1 /* retval */));
index f4f9790..5273a5a 100644 (file)
@@ -35,7 +35,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 
 /**
- * Utility that helps stubbing {@link io.fd.hc2vpp.common.translate.util.NamingContext} methods.
+ * Utility that helps stubbing {@link NamingContext} methods.
  */
 // TODO(HONEYCOMB-226): the class needs to be refactored or even removed after extracting interface from NamingContext
 public interface NamingContextHelper {
@@ -86,7 +86,7 @@ public interface NamingContextHelper {
     }
 
     /**
-     * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#absent} for provided
+     * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#empty} for provided
      * name.
      *
      * @param mappingContext    mock instance of {@link MappingContext}
index 6a8fc24..7edb964 100644 (file)
@@ -57,6 +57,8 @@ public abstract class WriterCustomizerTest implements FutureProducer,
 
     /**
      * Optional setup for subclasses. Invoked after parent initialization.
+     *
+     * @throws Exception unspecified exception while setting up tests
      */
     protected void setUpTest() throws Exception {
         // this method would normally trigger this warning while compiling:
index 0d87515..ae49ca5 100644 (file)
@@ -94,7 +94,7 @@
         </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-all</artifactId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 32b2b16..25c7862 100644 (file)
@@ -23,7 +23,7 @@ import javax.annotation.Nullable;
 
 /**
  * Defines vlan tag rewrite config options for VPP.
- * <p/>
+ *
  * TODO HONEYCOMB-184 corresponding enum (defined in l2_vtr.h) should be defined in vpe.api
  * (does vpp's IDL support enum type definition?)
  * which would allow to generate this class in jvpp
index 5df6324..b36c901 100644 (file)
@@ -33,8 +33,8 @@
     <properties>
         <mockito-core.version>2.2.9</mockito-core.version>
         <junit.version>4.11</junit.version>
-        <guice.version>4.1.0</guice.version>
-        <asm.version>5.2</asm.version>
+        <guice.version>4.2.2</guice.version>
+        <asm.version>7.0</asm.version>
         <asciidoctorj.version>1.5.4</asciidoctorj.version>
         <slf4j-simple.version>1.7.25</slf4j-simple.version>
         <jvpp.version>19.04-SNAPSHOT</jvpp.version>
index 39a06e6..47c605a 100644 (file)
@@ -35,7 +35,7 @@ public class MethodDelegatingClassVisitor extends ClassVisitor {
                                         String reference,
                                         Set<PluginMethodReference> foundReferences,
                                         Set<String> allreadyProcessedLocalMethods) {
-        super(Opcodes.ASM5);
+        super(Opcodes.ASM7);
         this.currentClass = currentClass;
         this.methodName = methodName;
         this.reference = reference;
index fe15f5e..a1e7a61 100644 (file)
@@ -38,7 +38,7 @@ public class MethodPluginCoverageVisitor extends MethodVisitor {
     public MethodPluginCoverageVisitor(String currentClass, Set<PluginMethodReference> foundReferences,
                                        String reference,
                                        Set<String> allreadyProcessedLocal) {
-        super(Opcodes.ASM5);
+        super(Opcodes.ASM7);
         this.currentClass = currentClass;
         this.foundReferences = foundReferences;
         this.reference = reference;
index 018578e..38ad967 100644 (file)
@@ -26,6 +26,8 @@
     <name>${project.artifactId}</name>
 
     <properties>
+        <maven.groovy.version>1.6.2</maven.groovy.version>
+        <groovy.version>2.5.4</groovy.version>
         <!-- List of modules that are used to extract Writer/Reader factories, and therefore generate api documentation -->
         <api.docs.modules>
             io.fd.hc2vpp.docs.core.mock.binding.MockBindingModule,
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.6.1</version>
+                <version>3.8.0</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.gmaven</groupId>
-                <artifactId>groovy-maven-plugin</artifactId>
+                <groupId>org.codehaus.gmavenplus</groupId>
+                <artifactId>gmavenplus-plugin</artifactId>
+                <version>${maven.groovy.version}</version>
                 <executions>
                     <execution>
                         <id>generate-coverage-doc</id>
                             <goal>execute</goal>
                         </goals>
                         <configuration>
-                            <source>
-                                io.fd.hc2vpp.docs.scripts.ApiDocsIndexGenerator.generate(project, log)
-                            </source>
+                            <scripts>
+                              <script>
+                                <![CDATA[
+                                  import io.fd.hc2vpp.docs.scripts.ApiDocsIndexGenerator
+                                  ApiDocsIndexGenerator.generate(project, log)
+                                ]]>
+                              </script>
+                            </scripts>
                         </configuration>
                     </execution>
                 </executions>
                 <dependencies>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-all</artifactId>
+                        <type>pom</type>
+                        <version>${groovy.version}</version>
+                    </dependency>
                     <dependency>
                         <groupId>io.fd.hc2vpp.docs</groupId>
                         <artifactId>scripts</artifactId>
index f9fa65d..b1196fb 100644 (file)
@@ -26,9 +26,9 @@
     <name>${project.artifactId}</name>
 
     <properties>
-        <groovy.version>2.4.7</groovy.version>
-        <groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version>
-        <groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version>
+        <groovy.version>2.5.4</groovy.version>
+        <groovy.eclipse.compiler.version>3.3.0-01</groovy.eclipse.compiler.version>
+        <groovy.eclipse.batch.version>2.5.6-02</groovy.eclipse.batch.version>
 
         <jvpp.version>19.04-SNAPSHOT</jvpp.version>
         <junit.version>4.11</junit.version>
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy-all</artifactId>
             <version>${groovy.version}</version>
+            <type>pom</type>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-templates</artifactId>
+            <version>${groovy.version}</version>
         </dependency>
         <dependency>
             <groupId>io.fd.jvpp</groupId>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
+                <version>3.1.1</version>
                 <executions>
                     <!-- Dependencies are copied by parent project -->
                     <execution>
                             <goal>unpack-dependencies</goal>
                         </goals>
                         <configuration>
+                            <excludeTypes>pom</excludeTypes>
                             <includes>**/honeycomb-minimal-resources/</includes>
                             <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
                         </configuration>
                         <artifactId>groovy-eclipse-batch</artifactId>
                         <version>${groovy.eclipse.batch.version}</version>
                     </dependency>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-templates</artifactId>
+                        <version>${groovy.version}</version>
+                    </dependency>
                 </dependencies>
             </plugin>
         </plugins>
index 2c6b24f..7c920f3 100644 (file)
@@ -70,7 +70,7 @@ class ApiDocsIndexGenerator {
                 .map { moduleName -> moduleName.trim() }
                 .map { moduleName ->
             log.info "Loading class $moduleName"
-            loader.loadClass(moduleName).newInstance()
+            loader.loadClass(moduleName).getDeclaredConstructor().newInstance()
         }
         .collect(toList())
 
@@ -82,6 +82,7 @@ class ApiDocsIndexGenerator {
         ClassPathTypeIndex classPathIndex = new ClassPathTypeIndex(projectRoot)
 
         log.info "Generating VPP API to YANG mapping"
+
         PLUGIN_CLASSES.stream()
                 .forEach { pluginClass ->
             log.info "Generating mapping for ${pluginClass}"