[DCAEGEN2] Release dcaegen2-analytics-tca-gen2 container
[dcaegen2/analytics/tca-gen2.git] / dcae-analytics / dcae-analytics-tca-web / pom.xml
index 4cc7e5b..6cd34d2 100644 (file)
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+  ~ ============LICENSE_START=======================================================
+  ~ TCAgen2
   ~ ================================================================================
-  ~ Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+  ~ Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
+  ~ Copyright (c) 2019 IBM.
+  ~ Copyright (c) 2021 Samsung Electronics. All rights reserved.
+  ~ Copyright (c) 2021 Nokia Intellectual Property. All rights reserved.
+  ~ Copyright (c) 2021-2022 Wipro Limited.
+  ~ Copyright (C) 2023 Deutsche Telekom AG. 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.
@@ -27,7 +34,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
         <artifactId>dcae-analytics</artifactId>
-        <version>3.0.0-SNAPSHOT</version>
+        <version>${revision}</version>
     </parent>
 
     <artifactId>dcae-analytics-tca-web</artifactId>
     <description>Contains Web related code for TCA</description>
 
     <properties>
-        <main.basedir>${project.parent.basedir}</main.basedir>
+            <main.basedir>${project.parent.basedir}</main.basedir>
+            <undertow-core.version>2.3.0.Final</undertow-core.version>
+            <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
+            <onap-gerrit-review>-changelog-missing</onap-gerrit-review>
+    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
     </properties>
 
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.undertow</groupId>
+                    <artifactId>undertow-core</artifactId>
+              </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>io.micrometer</groupId>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger2</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.plugin</groupId>
+            <artifactId>spring-plugin-core</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger-ui</artifactId>
             <groupId>${project.groupId}</groupId>
             <artifactId>dcae-analytics-test</artifactId>
         </dependency>
+        <!-- https://mvnrepository.com/artifact/io.undertow/undertow-core -->
+        <dependency>
+            <groupId>io.undertow</groupId>
+            <artifactId>undertow-core</artifactId>
+            <version>${undertow-core.version}</version>
+        </dependency>
 
     </dependencies>
 
-
     <build>
         <resources>
             <resource>
             <resource>
                 <directory>${project.build.directory}/git</directory>
             </resource>
-            <resource>
-                <directory>docker</directory>
-                <includes>
-                    <include>Dockerfile</include>
-                </includes>
-                <targetPath>${project.basedir}</targetPath>
-                <filtering>true</filtering>
-            </resource>
         </resources>
 
         <plugins>
             </plugin>
             <!-- DOCKER PLUGIN -->
             <plugin>
-                <groupId>com.spotify</groupId>
-                <artifactId>dockerfile-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>docker-push</id>
-                        <goals>
-                            <goal>build</goal>
-                            <goal>push</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
+               <groupId>com.spotify</groupId>
+               <artifactId>dockerfile-maven-plugin</artifactId>
+               <version>1.4.10</version>
+                 <configuration>
+                  <contextDirectory>${project.basedir}</contextDirectory>
+                  <repository>${docker.repository}/${docker.image.name}</repository>
+                  <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+               <buildArgs>
+                 <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
+                 <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR>
+                 <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR>
+                 <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
+               </buildArgs>
+             </configuration>
+             <executions>
+            <execution>
+                <id>build-image</id>
+                <phase>install</phase>
+                <goals>
+                    <goal>build</goal>
+                </goals>
+            </execution>
+            <execution>
+                   <id>tag-version</id>
+                   <phase>install</phase>
+                   <goals>
+                       <goal>tag</goal>
+                       <goal>push</goal>
+                   </goals>
+                        <configuration>
+                              <tag>${project.version}</tag>
+                        </configuration>
+                  </execution>
+                        <execution>
+                               <id>tag-version-ts</id>
+                               <phase>install</phase>
+                               <goals>
+                                   <goal>tag</goal>
+                                   <goal>push</goal>
+                               </goals>
+                                <configuration>
+                              <tag>${project.version}-${maven.build.timestamp}Z</tag>
+                                </configuration>
+                        </execution>
+            </executions>
+           </plugin>
         </plugins>
     </build>
 </project>