CL dependencies fixes for lab environment runtime 91/9591/2
authorJorge Hernandez <jh1730@att.com>
Thu, 31 Aug 2017 04:42:35 +0000 (23:42 -0500)
committerJorge Hernandez <jh1730@att.com>
Thu, 31 Aug 2017 05:00:52 +0000 (00:00 -0500)
This also includes workarounds to the recent oparent dependency
introduction that breaks runtime (with the version-check-maven-plugin).

manifested by loading control loops and failing to load some classes
due to different versions.

The issue was that underlying drools libraries use 3.2.5 and oparent
has included a had dependency with transitive dependencies for some maven
libraries in 3.2.3 and lower version xml parsers.   Bottomoline, the
classpath at runtime was formed by the union of both, with some
libraries being resolved to the oparent one, and others to the drools
one.   These errors are very obscured to debug.

Additional clean up of dependencies versions and order of build
was introduced to avoid issues loading dependencies at runtime in a
lab environment (non-junit)..

Issue-ID: POLICY-162
Change-Id: I019c82e6bed4eab4884cdbf8f6f32472c3a7352f
Signed-off-by: Jorge Hernandez <jh1730@att.com>
controlloop/common/eventmanager/pom.xml
controlloop/common/guard/pom.xml
controlloop/common/pom.xml
controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/__controlLoopName__.drl
controlloop/templates/template.demo/pom.xml
pom.xml

index b33763b..8447ff7 100644 (file)
        </parent>
        <artifactId>eventmanager</artifactId>
        <dependencies>
+               <dependency>
+                       <groupId>org.eclipse.persistence</groupId>
+                       <artifactId>org.eclipse.persistence.jpa</artifactId>
+                       <version>2.7.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>commons-io</groupId>
+                       <artifactId>commons-io</artifactId>
+                       <version>2.5</version>
+                       <scope>provided</scope>
+               </dependency>
                <dependency>
                        <groupId>org.onap.policy.drools-applications</groupId>
                        <artifactId>actorServiceProvider</artifactId>
index 388a233..2b173c3 100644 (file)
@@ -7,16 +7,6 @@
        </parent>
   <artifactId>guard</artifactId>
   <dependencies>
-       
-<!-- 
-       <dependency>
-               <groupId>org.onap.policy.drools-applications</groupId>
-               <artifactId>common</artifactId>
-               <version>1.1.0-SNAPSHOT</version>
-               <scope>provided</scope>
-       </dependency>
--->
-
                <dependency>
                        <groupId>org.onap.policy.drools-applications</groupId>
                        <artifactId>policy-yaml</artifactId>
        <dependency>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
-                       <version>2.4</version>
+                       <version>2.5</version>
+                       <scope>provided</scope>
                </dependency>
        <dependency>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                        <version>4.5.2</version>
+                       <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>org.drools</groupId>
                        <artifactId>drools-core</artifactId>
-                       <version>6.3.0.Final</version>
+                       <version>6.5.0.Final</version>
+                       <scope>provided</scope>
                </dependency>
                <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>org.eclipse.persistence.jpa</artifactId>
-            <version>2.6.4</version>
+            <version>2.7.0</version>
+                       <scope>provided</scope>
         </dependency>
-               
-      
   </dependencies>
 </project>
index f3975b9..b6db666 100644 (file)
@@ -34,8 +34,8 @@
 
     <modules>
        <module>actors</module>
-       <module>eventmanager</module>
         <module>guard</module>
+       <module>eventmanager</module>
         <module>model-impl</module>
        <module>policy-yaml</module>
     </modules>
index c7451cf..989f16e 100644 (file)
        </parent>
        <artifactId>template.demo</artifactId>
        <dependencies>
+               <dependency>
+                       <groupId>org.eclipse.persistence</groupId>
+                       <artifactId>org.eclipse.persistence.jpa</artifactId>
+                       <version>2.7.0</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>commons-io</groupId>
+                       <artifactId>commons-io</artifactId>
+                       <version>2.5</version>
+                       <scope>provided</scope>
+               </dependency>
                <dependency>
                        <groupId>org.drools</groupId>
                        <artifactId>drools-core</artifactId>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.12</version>
-                       <scope>provided</scope>
+                       <scope>test</scope>
                </dependency>
        </dependencies>
 </project>
diff --git a/pom.xml b/pom.xml
index 739998f..4d89206 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                </configuration>
                        </plugin>
 
-               <plugin>
-                 <groupId>org.apache.maven.plugins</groupId>
-                 <artifactId>maven-site-plugin</artifactId>
-                 <dependencies>
-                   <dependency>
-                     <groupId>org.apache.maven.wagon</groupId>
-                     <artifactId>wagon-webdav-jackrabbit</artifactId>
-                     <version>2.10</version>
-                   </dependency>
-                 </dependencies>
-               </plugin>
+                       <plugin>
+                         <groupId>org.apache.maven.plugins</groupId>
+                         <artifactId>maven-site-plugin</artifactId>
+                         <dependencies>
+                           <dependency>
+                             <groupId>org.apache.maven.wagon</groupId>
+                             <artifactId>wagon-webdav-jackrabbit</artifactId>
+                             <version>2.10</version>
+                           </dependency>
+                         </dependencies>
+                       </plugin>
+               
+                       <plugin>
+                               <groupId>org.onap.oparent</groupId>
+                               <artifactId>version-check-maven-plugin</artifactId>
+                               <executions>
+                                    <execution>
+                                      <id>version-check</id>
+                                      <phase/>
+                                    </execution>    
+                               </executions>
+                       </plugin>
 
            </plugins>
         <pluginManagement>
            </plugin>
          </plugins>
        </reporting>
+
        <dependencies>
                <dependency>
-               <groupId>ch.qos.logback</groupId>
-               <artifactId>logback-classic</artifactId>
-               <version>1.2.3</version>
-               <scope>provided</scope>
+                       <groupId>ch.qos.logback</groupId>
+                       <artifactId>logback-classic</artifactId>
+                       <version>1.2.3</version>
+                       <scope>provided</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.onap.oparent</groupId>
+                       <artifactId>version-check-maven-plugin</artifactId>
+                       <version>1.0.0-SNAPSHOT</version>
+                       <scope>provided</scope>
+                       <optional>true</optional>
+                       <exclusions>
+                       <exclusion>
+                               <groupId>*</groupId>
+                               <artifactId>*</artifactId>
+                               </exclusion>
+                        </exclusions>
+                </dependency>
+
        </dependencies>
+
+
 </project>