Create new version of sdnc/oam for ansible fix
[sdnc/oam.git] / installation / sdnc / pom.xml
index 6db2fd5..28c3811 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
        <parent>
-               <groupId>org.openecomp.sdnc.oam</groupId>
-               <artifactId>installation</artifactId>
-               <version>1.0.0</version>
+               <groupId>org.onap.ccsdk.parent</groupId>
+               <artifactId>odlparent-lite</artifactId>
+               <version>1.1.3</version>
        </parent>
 
        <modelVersion>4.0.0</modelVersion>
        <packaging>pom</packaging>
-       <groupId>org.openecomp.sdnc.oam</groupId>
+       <groupId>org.onap.sdnc.oam</groupId>
        <artifactId>installation-sdnc</artifactId>
-       <version>1.0.0</version>
+       <version>1.4.5-SNAPSHOT</version>
 
-       <name>Installation - sdnc</name>
+       <name>sdnc-oam :: installation :: ${project.artifactId}</name>
        <description>Creates SDN Controller Docker container</description>
 
        <properties>
-               <image.name>ecomp/sdnc-image</image.name>
-               <sdnc.core.version>${project.version}</sdnc.core.version>
-               <sdnc.adaptors.version>${project.version}</sdnc.adaptors.version>
-               <sdnc.northbound.version>${project.version}</sdnc.northbound.version>
-               <sdnc.plugins.version>${project.version}</sdnc.plugins.version>
+               <image.name>onap/sdnc-image</image.name>
+               <sdnc.project.version>${project.version}</sdnc.project.version>
+               <sdnc.northbound.version>1.4.3</sdnc.northbound.version>
+               <ccsdk.docker.version>0.3.3</ccsdk.docker.version>
+               <sdnc.keystore>keystore.sdnc.p12</sdnc.keystore>
+               <sdnc.keypass>onap3.0</sdnc.keypass>
+               <sdnc.secureport>8443</sdnc.secureport>
+               <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
+               <docker.push.phase>deploy</docker.push.phase>
+               <docker.verbose>true</docker.verbose>
+               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
        </properties>
 
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.sdnc.northbound</groupId>
+                       <artifactId>generic-resource-api-installer</artifactId>
+                       <version>${sdnc.northbound.version}</version>
+                       <classifier>repo</classifier>
+                       <type>zip</type>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.sdnc.northbound</groupId>
+                       <artifactId>vnfapi-installer</artifactId>
+                       <version>${sdnc.northbound.version}</version>
+                       <classifier>repo</classifier>
+                       <type>zip</type>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.sdnc.northbound</groupId>
+                       <artifactId>vnftools-installer</artifactId>
+                       <version>${sdnc.northbound.version}</version>
+                       <classifier>repo</classifier>
+                       <type>zip</type>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.sdnc.northbound</groupId>
+                       <artifactId>sdnc-northbound-features-installer</artifactId>
+                       <version>${sdnc.northbound.version}</version>
+                       <classifier>repo</classifier>
+                       <type>zip</type>
+               </dependency>
+       </dependencies>
 
        <build>
                <plugins>
 
 
+                       <plugin>
+                               <groupId>org.codehaus.groovy.maven</groupId>
+                               <artifactId>gmaven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <phase>validate</phase>
+                                               <goals>
+                                                       <goal>execute</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <source>
+                                                               println project.properties['sdnc.project.version'];
+                                                               def versionArray;
+                                                               if ( project.properties['sdnc.project.version'] != null ) {
+                                                                   versionArray = project.properties['sdnc.project.version'].split('\\.');
+                                                               }
+
+                                                               if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
+                                                               {
+                                                                   project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+                                                               } else {
+                                                                   project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+                                                               }
+
+                                                               println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
+                                                       </source>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
                        <plugin>
                                <groupId>io.fabric8</groupId>
                                <artifactId>docker-maven-plugin</artifactId>
                                <version>0.16.5</version>
                                <inherited>false</inherited>
                                <configuration>
-
                                        <images>
                                                <image>
                                                        <name>${image.name}</name>
                                                                <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
                                                                <tags>
                                                                        <tag>${project.version}</tag>
-                                                                       <tag>latest</tag>
+                                                                       <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+                                                                       <tag>${project.docker.latesttag.version}</tag>
                                                                </tags>
                                                        </build>
                                                </image>
                                <executions>
                                        <execution>
                                                <id>generate-images</id>
-                                               <phase>generate-sources</phase>
+                                               <phase>package</phase>
                                                <goals>
                                                        <goal>build</goal>
                                                </goals>
 
                                        <execution>
                                                <id>push-images</id>
-                                               <phase>deploy</phase>
+                                               <phase>${docker.push.phase}</phase>
                                                <goals>
                                                        <goal>build</goal>
                                                        <goal>push</goal>
                                </executions>
                        </plugin>
 
+
+
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                <version>2.6</version>
                                                </goals><!-- here the phase you need -->
                                                <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
+                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
                                                        <resources>
                                                                <resource>
                                                                        <directory>src/main/scripts</directory>
                                                        </resources>
                                                </configuration>
                                        </execution>
+
                                        <execution>
                                                <id>copy-tarballs</id>
                                                <goals>
                                                                <resource>
                                                                        <directory>src/main/resources</directory>
                                                                        <includes>
-                                                                               <include>*.tgz</include>
-                                                                               <include>*.tar.gz</include>
                                                                                <include>idmlight.db.mv.db</include>
+                                                                               <include>AAF_RootCA.cer</include>
+                                                                               <include>truststoreONAPall.jks</include>
                                                                        </includes>
                                                                        <filtering>false</filtering>
                                                                </resource>
                                                </goals><!-- here the phase you need -->
                                                <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
+                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
                                                        <resources>
                                                                <resource>
                                                                        <directory>src/main/resources</directory>
                                                </goals><!-- here the phase you need -->
                                                <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
+                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
                                                        <resources>
                                                                <resource>
                                                                        <directory>../src/main/properties</directory>
                                                </goals><!-- here the phase you need -->
                                                <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
+                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
                                                        <resources>
                                                                <resource>
                                                                        <directory>../src/main/stores</directory>
                                </executions>
                        </plugin>
                        <plugin>
-                               <artifactId>exec-maven-plugin</artifactId>
-                               <groupId>org.codehaus.mojo</groupId>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <version>3.0.2</version>
                                <executions>
-
                                        <execution>
-                                               <id>Get features</id>
+                                               <id>unpack sdnc features</id>
                                                <phase>generate-sources</phase>
                                                <goals>
-                                                       <goal>exec</goal>
+                                                       <goal>unpack-dependencies</goal>
                                                </goals>
                                                <configuration>
-                                                       <executable>/bin/bash</executable>
-                                                       <environmentVariables>
-                                                               <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
-                                                               <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
-                                                               <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
-                                                               <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
-                                                               <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
-                                                       </environmentVariables>
-                                                       <arguments>
-                                                               <argument>${basedir}/src/main/scripts/installZips.sh</argument>
-                                                               <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
-                                                       </arguments>
+                                                       <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                                                       <excludeTransitive>true</excludeTransitive>
                                                </configuration>
                                        </execution>
+                                       <execution>
+                                               <id>unpack dgs</id>
+                                               <phase>generate-sources</phase>
+                                               <goals>
+                                                       <goal>unpack</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
+                                                       <artifactItems>
+                                                               <artifactItem>
+                                                                       <groupId>${project.groupId}</groupId>
+                                                                       <artifactId>platform-logic-installer</artifactId>
+                                                                       <version>${project.version}</version>
+                                                                       <type>zip</type>
+                                                               </artifactItem>
+                                                       </artifactItems>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>exec-maven-plugin</artifactId>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <version>1.5.0</version>
+                               <executions>
 
                                        <execution>
                                                <id>change shell permissions</id>
                                                <configuration>
                                                        <executable>/usr/bin/find</executable>
                                                        <arguments>
-                                                               <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
+                                                               <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
                                                                <argument>-name</argument>
                                                                <argument>*.sh</argument>
                                                                <argument>-exec</argument>
 
        </build>
        <organization>
-               <name>openECOMP</name>
+               <name>ONAP</name>
        </organization>
 </project>