use url resource for docker-tag -- models
[policy/models.git] / models-sim / packages / models-simulator-docker / pom.xml
index c6f4717..c2d6df5 100644 (file)
@@ -1,6 +1,8 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2020 Bell Canada.
+   Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+   Modifications Copyright (C) 2022 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -23,8 +25,8 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.policy.models.sim</groupId>
-        <artifactId>policy-models-sim</artifactId>
-        <version>2.3.2-SNAPSHOT</version>
+        <artifactId>models-sim-packages</artifactId>
+        <version>2.7.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>models-simulator-docker</artifactId>
         <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
         <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
+        <!-- There is no code in this sub-module, only holds interfaces. So skip sonar. -->
+        <sonar.skip>true</sonar.skip>
     </properties>
 
     <build>
         <finalName>${project.artifactId}-${project.version}</finalName>
         <plugins>
             <plugin>
-                <groupId>org.codehaus.groovy.maven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <version>1.0</version>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>groovy-maven-plugin</artifactId>
+                <version>2.1.1</version>
                 <executions>
                     <execution>
                         <phase>validate</phase>
                             <goal>execute</goal>
                         </goals>
                         <configuration>
-                            <source>
-                                println 'Project version: ' + project.properties['dist.project.version']
-                                if (project.properties['dist.project.version'] != null) {
-                                    def versionArray = project.properties['dist.project.version'].split('-')
-                                    def minMaxVersionArray = versionArray[0].tokenize('.')
-                                    if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
-                                        project.properties['project.docker.latest.minmax.tag.version'] =
-                                          minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
-                                    } else {
-                                        project.properties['project.docker.latest.minmax.tag.version'] =
-                                          minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
-                                    }
-                                    println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
-                                }
-                            </source>
+                            <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
                         </configuration>
                     </execution>
                 </executions>
@@ -94,7 +84,7 @@
                             <name>onap/policy-models-simulator</name>
                             <build>
                                 <cleanup>try</cleanup>
-                                <dockerFile>Dockerfile</dockerFile>
+                                <dockerFile>${dockerFile}</dockerFile>
                                 <tags>
                                     <tag>${project.version}</tag>
                                     <tag>${project.version}-${maven.build.timestamp}</tag>
         <dependency>
             <groupId>org.onap.policy.models.sim</groupId>
             <artifactId>models-simulator-tarball</artifactId>
-            <version>2.3.2-SNAPSHOT</version>
+           <version>${project.version}</version>
             <classifier>tarball</classifier>
             <type>tar.gz</type>
         </dependency>