Enable building of the tosca PoC code 96/117696/5
authorliamfallon <liam.fallon@est.tech>
Wed, 10 Feb 2021 19:03:47 +0000 (19:03 +0000)
committerliamfallon <liam.fallon@est.tech>
Thu, 11 Feb 2021 09:08:50 +0000 (09:08 +0000)
At the moment, because the code in the tosca-controlloop directory is
not linked to the CLAMP pom, it is not built by the Jenkins jobs.

This commit makes a change to the pom.xml file on the tosca-poc branch
only so that the tosca-controlloop code is built.

The maven-invoker-plugin runs a build of the code in the
tosca-controlloop subdirectory by invoking a build of its pom.xml. The
output artifacts are placed in target/tosca-controlloop and do not
interfere in any way with the main CLAMP build.

However, if there are compile erors/test fails/maven errors in the
tosca-controlloop coode, the build wil and should fail.

Issue-ID: POLICY-2995
Change-Id: Ie4d3e3189af6afe0a046ab565a7cc2703afa503d
Signed-off-by: liamfallon <liam.fallon@est.tech>
pom.xml
tosca-controlloop/common/pom.xml
tosca-controlloop/design/pom.xml
tosca-controlloop/models/pom.xml
tosca-controlloop/participants/pom.xml
tosca-controlloop/pom.xml
tosca-controlloop/runtime/pom.xml

diff --git a/pom.xml b/pom.xml
index 92caece..e85483d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -5,6 +5,7 @@
   ================================================================================
   Copyright (C) 2017-2021 AT&T Intellectual Property. All rights
                               reserved.
+  Modifications Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <artifactId>maven-invoker-plugin</artifactId>
+                <version>3.2.1</version>
+                <configuration>
+                    <projectsDirectory>tosca-controlloop</projectsDirectory>
+                    <cloneProjectsTo>${project.build.directory}/tosca-controlloop</cloneProjectsTo>
+                    <pomIncludes>
+                        <pomInclude>*/pom.xml</pomInclude>
+                    </pomIncludes>
+                    <streamLogs>true</streamLogs>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>build-tosca-controlloop</id>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
index ad69440..fef79f0 100755 (executable)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -26,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
+        <groupId>org.onap.policy.clamp.controlloop</groupId>
         <artifactId>controlloop</artifactId>
         <version>6.0.0-SNAPSHOT</version>
     </parent>
index a3a0962..d17933f 100755 (executable)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -26,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
+        <groupId>org.onap.policy.clamp.controlloop</groupId>
         <artifactId>controlloop</artifactId>
         <version>6.0.0-SNAPSHOT</version>
     </parent>
index 45e4798..2c5dd7d 100755 (executable)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -26,7 +25,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
+        <groupId>org.onap.policy.clamp.controlloop</groupId>
         <artifactId>controlloop</artifactId>
         <version>6.0.0-SNAPSHOT</version>
     </parent>
index b84aa15..4707a5c 100644 (file)
@@ -1,7 +1,6 @@
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -24,7 +23,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
+        <groupId>org.onap.policy.clamp.controlloop</groupId>
         <artifactId>controlloop</artifactId>
         <version>6.0.0-SNAPSHOT</version>
     </parent>
                 </exclusion>
             </exclusions>
         </dependency>
-
-        <!--test dependencies -->
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito2</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
index a328c03..008f45e 100755 (executable)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
-        <artifactId>clamp</artifactId>
-        <version>6.0.0-SNAPSHOT</version>
+        <groupId>org.onap.policy.parent</groupId>
+        <artifactId>integration</artifactId>
+        <version>3.3.0-SNAPSHOT</version>
+        <relativePath/>
     </parent>
 
+    <groupId>org.onap.policy.clamp.controlloop</groupId>
     <artifactId>controlloop</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>pom</packaging>
 
+    <properties>
+        <policy.common.version>1.8.0-SNAPSHOT</policy.common.version>
+        <policy.models.version>2.4.0-SNAPSHOT</policy.models.version>
+    </properties>
+
     <modules>
         <module>common</module>
         <module>models</module>
             <artifactId>utils</artifactId>
             <version>${policy.common.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.onap.policy.common</groupId>
-            <artifactId>utils-test</artifactId>
-            <version>${policy.common.version}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.onap.policy.common</groupId>
             <artifactId>policy-endpoints</artifactId>
             <artifactId>policy-models-provider</artifactId>
             <version>${policy.models.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils-test</artifactId>
+            <version>${policy.common.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-mockito2</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-module-junit4</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
-
     <build>
         <resources>
             <!-- Output the version of the control loop system -->
index d3bfd39..93498f5 100644 (file)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-   Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-   Modifications Copyright (C) 2020 Nordix Foundation.
+  Copyright (C) 2021 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.onap.policy.clamp</groupId>
+        <groupId>org.onap.policy.clamp.controlloop</groupId>
         <artifactId>controlloop</artifactId>
         <version>6.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>controlloop-runtime</artifactId>
     <name>${project.artifactId}</name>
-    
+
     <dependencies>
-      <dependency>
-            <groupId>org.onap.policy.clamp</groupId>
-            <artifactId>controlloop-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
-            <groupId>org.onap.policy.clamp</groupId>
-            <artifactId>controlloop-models</artifactId>
-            <version>${project.version}</version>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 </project>