Unify integration-* image usage
[dcaegen2/platform.git] / mod2 / auth-service / pom.xml
index 1fd4f02..b25fe99 100644 (file)
@@ -5,6 +5,7 @@
   ~  *  org.onap.dcae
   ~  *  ================================================================================
   ~  *  Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+  ~  *  Copyright (c) 2021 Samsung Electronics. All rights reserved.
   ~  *  ================================================================================
   ~  *  Licensed under the Apache License, Version 2.0 (the "License");
   ~  *  you may not use this file except in compliance with the License.
@@ -31,7 +32,7 @@
        </parent>
        <groupId>org.onap.dcaegen2.platform.mod</groupId>
        <artifactId>auth-service</artifactId>
-       <version>1.0.0-SNAPSHOT</version>
+       <version>1.0.1-SNAPSHOT</version>
        <name>auth-service</name>
        <description>REST APIs to serve Auth Service</description>
 
@@ -39,6 +40,8 @@
                <java.version>11</java.version>
                <maven.compiler.source>${java.version}</maven.compiler.source>
                <maven.compiler.target>${java.version}</maven.compiler.target>
+               <dockerfile-maven-plugin.version>1.4.10</dockerfile-maven-plugin.version>
+               <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
        </properties>
 
        <dependencies>
                                </exclusion>
                        </exclusions>
                </dependency>
-               <dependency>
-                       <groupId>org.springframework.security</groupId>
-                       <artifactId>spring-security-test</artifactId>
-                       <scope>test</scope>
-               </dependency>
                <dependency>
                        <groupId>com.squareup.okhttp3</groupId>
                        <artifactId>mockwebserver</artifactId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.3.1</version>
                </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>RELEASE</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+<!--           <dependency>
+                       <groupId>org.testng</groupId>
+                       <artifactId>testng</artifactId>
+                       <version>RELEASE</version>
+                       <scope>test</scope>
+               </dependency>-->
+       </dependencies>
 
        <dependencyManagement>
                <dependencies>
                                        </execution>
                                </executions>
                        </plugin>
+                       <plugin>
+                               <groupId>com.spotify</groupId>
+                               <artifactId>dockerfile-maven-plugin</artifactId>
+                               <version>${dockerfile-maven-plugin.version}</version>
+                               <configuration>
+                                       <contextDirectory>${project.basedir}</contextDirectory>
+                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+                                       <buildArgs>
+                                               <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
+                                               <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
+                                       </buildArgs>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>build-image</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>build</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>tag-and-push-image-latest</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>tag</goal>
+                                                       <goal>push</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+                                                       <tag>latest</tag>
+                                                       <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>tag-and-push-image-with-version</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>tag</goal>
+                                                       <goal>push</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+                                                       <tag>${project.version}</tag>
+                                                       <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <version>2.22.2</version>
                        </plugin>
                </plugins>
+               <finalName>mod-auth-service</finalName>
        </build>
 </project>