AT&T 2.0.19 Code drop, stage 4
[aaf/authz.git] / authz-service / pom.xml
index 3476055..0efeab7 100644 (file)
        <name>Authz Service</name>\r
        <description>API for Authorization and Authentication</description>\r
                <url>https://github.com/att/AAF</url>\r
-       <licenses>\r
-               <license>\r
-               <name>BSD License</name>\r
-               <url> </url>\r
-               </license>\r
-       </licenses>\r
+       \r
        <developers>\r
                <developer>\r
                <name>Jonathan Gathman</name>\r
        </developers>\r
 \r
        <properties>\r
+       <maven.build.timestamp.format>yyyy.MM.dd'T'hh.mm.ss'Z'</maven.build.timestamp.format>\r
                <maven.test.failure.ignore>true</maven.test.failure.ignore>\r
                <project.swmVersion>1</project.swmVersion>\r
                        <project.innoVersion>1.0.0-SNAPSHOT</project.innoVersion>\r
                <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
-           <dockerLocation>${basedir}/target/</dockerLocation>\r
-               <docker.registry>nexus3.onap.org</docker.registry>\r
+        <dockerLocation>${basedir}/target/</dockerLocation>\r
                <distFilesRootDirPath>opt/app/aaf/${project.artifactId}/${project.version}</distFilesRootDirPath>\r
                        <sonar.language>java</sonar.language>\r
+                       <sonar.skip>true</sonar.skip>\r
                <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
                <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
                <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
                <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
                <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
+               <docker.push.registry>localhost:5000</docker.push.registry>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
                <sitePath>/content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version}</sitePath>\r
+        <skip.docker.build>true</skip.docker.build>\r
+        <skip.docker.push>true</skip.docker.push>\r
+        <skip.staging.artifacts>false</skip.staging.artifacts>\r
        </properties>\r
        \r
                \r
                        <version>${project.cadiVersion}</version>\r
                </dependency>   \r
        </dependencies>\r
-<profiles>\r
-   <profile>   \r
+\r
+\r
        <build>\r
+       <finalName>authz-service</finalName>\r
            <plugins>\r
+       \r
                \r
-                       <plugin>\r
-                <groupId>com.spotify</groupId>\r
-                <artifactId>docker-maven-plugin</artifactId>\r
-                <version>0.4.11</version>\r
-                <configuration>\r
-                    <imageName>onap/aaf/authz-service</imageName>\r
-                    <dockerDirectory>${dockerLocation}</dockerDirectory>\r
-                    <serverId>docker-hub</serverId>\r
-                     <registryUrl>https://${docker.registry}</registryUrl>\r
-                    <imageTags>\r
-                        <imageTag>${project.version}</imageTag>\r
-                        <imageTag>latest</imageTag>\r
-                    </imageTags>\r
-                                            <resources>\r
-                                <resource>\r
-                                                               <targetPath>/</targetPath>\r
-                                    <directory>/${basedir}/target/opt</directory>\r
-                                    <filtering>true</filtering>\r
-                                    <includes>\r
-                                        <include>**/*</include>\r
-                                    </includes>\r
-                                </resource>\r
-                            </resources>\r
-                    <forceTags>true</forceTags>\r
-                </configuration>\r
-            </plugin>\r
-                       <plugin>\r
-    <artifactId>maven-resources-plugin</artifactId>\r
-    <version>2.7</version>\r
-    <executions>\r
-        <execution>\r
+<plugin>\r
+        <groupId>com.spotify</groupId>\r
+        <artifactId>docker-maven-plugin</artifactId>\r
+        <version>1.0.0</version>\r
+        <configuration>\r
+          <imageName>onap/aaf/authz-service</imageName>\r
+         <!-- <dockerDirectory>${dockerLocation}</dockerDirectory> -->\r
+                 <dockerDirectory>${basedir}/src/main/resources/docker</dockerDirectory>\r
+          <imageTags>\r
+            <imageTag>latest</imageTag>\r
+            <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>\r
+            <imageTag>${project.docker.latesttag.version}</imageTag>\r
+          </imageTags>\r
+          <forceTags>true</forceTags>\r
+                <!-- <resources>\r
+            <resource>\r
+                           <targetPath>/</targetPath>\r
+                    <directory>${project.build.directory}/opt</directory>\r
+                    <filtering>true</filtering>\r
+                     <includes>\r
+                        <include>**/**</include>\r
+                            </includes>\r
+            </resource>\r
+         </resources>  -->              \r
+                  <resources>\r
+            <resource>\r
+              <targetPath>/</targetPath>\r
+              <directory>${project.build.directory}/opt</directory>\r
+              <include>${project.build.finalName}.jar</include>\r
+            </resource>\r
+            <resource>\r
+              <targetPath>/</targetPath>\r
+              <directory>${project.build.directory}</directory>\r
+              <include>**/**</include>\r
+            </resource>\r
+          </resources>\r
+                </configuration>\r
+        <executions>\r
+       <execution>\r
+            <id>build-image</id>\r
+            <phase>package</phase>\r
+            <goals>\r
+              <goal>build</goal>\r
+            </goals>\r
+            <configuration>\r
+              <skipDockerBuild>${skip.docker.build}</skipDockerBuild>\r
+            </configuration>\r
+          </execution> \r
+\r
+          <execution>\r
+            <id>tag-image-project-version</id>\r
+            <phase>package</phase>\r
+            <goals>\r
+              <goal>tag</goal>\r
+            </goals>\r
+            <configuration>\r
+              <image>onap/aaf/authz-service</image>\r
+              <newName>${docker.push.registry}/onap/aaf/authz-service:${project.version}</newName>\r
+              <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
+            </configuration>\r
+          </execution>\r
+                 \r
+                 <execution>\r
+            <id>tag-image-latest</id>\r
+            <phase>package</phase>\r
+            <goals>\r
+              <goal>tag</goal>\r
+            </goals>\r
+            <configuration>\r
+              <image>onap/aaf/authz-service</image>\r
+              <newName>${docker.push.registry}/onap/aaf/authz-service:latest</newName>\r
+              <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
+            </configuration>\r
+          </execution>\r
+          \r
+         <execution>\r
+            <id>push-image-latest</id>\r
+            <phase>deploy</phase>\r
+            <goals>\r
+              <goal>push</goal>\r
+            </goals>\r
+            <configuration>\r
+              <imageName>${docker.push.registry}/onap/aaf/authz-service:${project.version}</imageName>\r
+              <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
+            </configuration>\r
+          </execution>\r
+          \r
+          <execution>\r
+            <id>push-image</id>\r
+            <phase>deploy</phase>\r
+            <goals>\r
+              <goal>push</goal>\r
+            </goals>\r
+            <configuration>\r
+              <imageName>${docker.push.registry}/onap/aaf/authz-service:latest</imageName>\r
+              <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
+            </configuration>\r
+          </execution>\r
+        </executions>\r
+      </plugin>\r
+\r
+ <plugin>\r
+                <artifactId>maven-resources-plugin</artifactId>\r
+                <version>2.7</version>\r
+              <executions>\r
+                   <execution>\r
                         <id>copy-docker-file</id>\r
                         <phase>package</phase>\r
                         <goals>\r
                                 </resource>\r
                             </resources>\r
                         </configuration>\r
-                    </execution>\r
+                    </execution>  \r
       <execution>\r
         <id>copy-resources-1</id>\r
         <phase>validate</phase>\r
                         </configuration>\r
                     </execution>\r
                                </executions>\r
-                       </plugin>\r
+                       </plugin>     \r
+\r
                \r
                        </plugins>\r
 \r
        </build>\r
-</profile>\r
-</profiles>\r
+\r
+\r
                <distributionManagement>\r
                <repository>\r
                        <id>ecomp-releases</id>\r
                        <url>dav:${nexusproxy}${sitePath}</url>\r
                </site>\r
        </distributionManagement>\r
-\r
+ <profiles>\r
+    <profile>\r
+      <id>docker</id>\r
+      <properties>\r
+        <skip.staging.artifacts>true</skip.staging.artifacts>\r
+        <skip.docker.build>false</skip.docker.build>\r
+        <skip.docker.tag>false</skip.docker.tag>\r
+        <skip.docker.push>false</skip.docker.push>\r
+      </properties>\r
+    </profile>\r
+  </profiles>\r
 </project>\r