use url resource for docker-tag -- models
[policy/models.git] / models-sim / packages / models-simulator-docker / pom.xml
index 453395d..c2d6df5 100644 (file)
@@ -2,6 +2,7 @@
   ============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.
@@ -25,7 +26,7 @@
     <parent>
         <groupId>org.onap.policy.models.sim</groupId>
         <artifactId>models-sim-packages</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.7.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>models-simulator-docker</artifactId>
@@ -52,9 +53,9 @@
         <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>
@@ -97,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>