mod-runtimeapi fix docker build and code coverage 19/100419/1
authorAndrew Gauld <agauld@att.com>
Fri, 17 Jan 2020 16:53:12 +0000 (16:53 +0000)
committerAndrew Gauld <agauld@att.com>
Fri, 17 Jan 2020 16:54:17 +0000 (16:54 +0000)
Change-Id: I2038934553b831d98bbbdbd893d253cb5b733aa6
Issue-ID: DCAEGEN2-1860
Signed-off-by: Andrew Gauld <agauld@att.com>
mod/runtimeapi/pom.xml
mod/runtimeapi/runtime-web/pom.xml

index d33596e..0f79be4 100644 (file)
@@ -2,46 +2,46 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-    <packaging>pom</packaging>
-    <modules>
-        <module>runtime-core</module>
+       <packaging>pom</packaging>
+       <modules>
+               <module>runtime-core</module>
                <module>runtime-web</module>
        </modules>
-    <parent>
-               <groupId>org.springframework.boot</groupId>
-               <artifactId>spring-boot-starter-parent</artifactId>
-               <version>2.1.7.RELEASE</version>
-               <relativePath/> <!-- lookup parent from repository -->
+       <parent>
+               <groupId>org.onap.oparent</groupId>
+               <artifactId>oparent</artifactId>
+               <version>2.0.0</version>
        </parent>
        <groupId>org.onap.dcaegen2.platform.mod</groupId>
        <artifactId>runtimeapi</artifactId>
        <version>1.0.0</version>
-       <name>runtimeapi</name>
+       <name>dcaegen2-platform-mod-runtimeapi</name>
        <description>MOD Runtime API</description>
-
        <properties>
+               <maven.deploy.skip>true</maven.deploy.skip>
                <java.version>1.8</java.version>
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
        </properties>
 
-    <build>
-        <pluginManagement>
-            <plugins>
-            <plugin>
-              <artifactId>maven-deploy-plugin</artifactId>
-              <version>2.8.2</version>
-              <configuration>
-                <skip>true</skip>
-              </configuration>
-            </plugin>
-            </plugins>
-        </pluginManagement>
+       <build>
        <plugins>
-           <!-- support sonar in multi-module project -->
-           <plugin>
-               <groupId>org.sonarsource.scanner.maven</groupId>
-               <artifactId>sonar-maven-plugin</artifactId>
-               <version>3.6.0.1398</version>
-           </plugin>
+               <!-- support sonar in multi-module project -->
+               <plugin>
+                       <groupId>org.sonarsource.scanner.maven</groupId>
+                       <artifactId>sonar-maven-plugin</artifactId>
+                       <version>3.6.0.1398</version>
+               </plugin>
        </plugins>
-    </build>
+       </build>
+       <dependencyManagement>
+       <dependencies>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-parent</artifactId>
+                       <version>2.1.7.RELEASE</version>
+                       <type>pom</type>
+                       <scope>import</scope>
+               </dependency>
+       </dependencies>
+       </dependencyManagement>
 </project>
index 19d2af7..27cc960 100644 (file)
@@ -2,23 +2,16 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <parent>
-               <groupId>org.springframework.boot</groupId>
-               <artifactId>spring-boot-starter-parent</artifactId>
-               <version>2.1.7.RELEASE</version>
-               <relativePath/> <!-- lookup parent from repository -->
+       <parent>
+               <groupId>org.onap.dcaegen2.platform.mod</groupId>
+               <artifactId>runtimeapi</artifactId>
+               <version>1.0.0</version>
        </parent>
-       <groupId>org.onap.dcae</groupId>
        <artifactId>runtime-web</artifactId>
        <version>1.0.0</version>
+       <packaging>jar</packaging>
        <name>runtime-web</name>
        <description>MOD Runtime Web Module</description>
-
-       <properties>
-               <java.version>1.8</java.version>
-       </properties>
-
        <dependencies>
                <dependency>
                        <groupId>org.onap.dcaegen2.platform.mod</groupId>
                        <groupId>io.springfox</groupId>
                        <artifactId>springfox-swagger-ui</artifactId>
                        <version>2.9.2</version>
-        </dependency>
-        <dependency>
+               </dependency>
+               <dependency>
                        <groupId>org.json</groupId>
                        <artifactId>json</artifactId>
                        <version>20190722</version>
-        </dependency>
+               </dependency>
        </dependencies>
 
        <build>
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-maven-plugin</artifactId>
                        </plugin>
+                       <plugin>
+                               <groupId>io.fabric8</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <configuration>
+                                       <verbose>true</verbose>
+                                       <imagePullPolicy>IfNotPresent</imagePullPolicy>
+                                       <images>
+                                               <image>
+                                                       <name>onap/${project.groupId}.${project.artifactId}</name>
+                                                       <registry>${onap.nexus.dockerregistry.daily}</registry>
+                                                       <build>
+                                                               <contextDir>${project.basedir}</contextDir>
+                                                               <cleanup>none</cleanup>
+                                                               <tags>
+                                                                       <tag>latest</tag>
+                                                                       <tag>${project.version}</tag>
+                                                                       <tag>${project.version}-${maven.build.timestamp}Z</tag>
+                                                               </tags>
+                                                       </build>
+                                               </image>
+                                       </images>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>build</goal>
+                                                       <goal>push</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
-        <pluginManagement>
-            <plugins>
-            <plugin>
-              <artifactId>maven-deploy-plugin</artifactId>
-              <version>2.8.2</version>
-              <configuration>
-                <skip>true</skip>
-              </configuration>
-            </plugin>
-            </plugins>
-        </pluginManagement>
        </build>
 
 </project>