Merge "Update schema-service dep to 1.6.0" master
authorVenkata Harish Kajur <vk250x@att.com>
Fri, 1 Nov 2019 14:03:41 +0000 (14:03 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 1 Nov 2019 14:03:41 +0000 (14:03 +0000)
1  2 
pom.xml

diff --combined pom.xml
+++ b/pom.xml
@@@ -37,7 -37,7 +37,7 @@@ limitations under the License
      <properties>
          <docker.location>${basedir}/target</docker.location>
          <version.org.onap.aai.aai-schema-ingest>1.4.1</version.org.onap.aai.aai-schema-ingest>
-         <version.org.onap.aai.aai-schema>1.5.1</version.org.onap.aai.aai-schema>
+         <version.org.onap.aai.aai-schema>1.6.0</version.org.onap.aai.aai-schema>
          <version.org.onap.aai.aai-utils>1.5.3</version.org.onap.aai.aai-utils>
          <version.org.onap.aai.aai-auth>1.5.3</version.org.onap.aai.aai-auth>
          <event.client.version>1.5.0</event.client.version>
@@@ -53,8 -53,6 +53,8 @@@
          <aai.docker.namespace>onap</aai.docker.namespace>
          <aai.base.image>alpine</aai.base.image>
          <aai.base.image.version>1.6.0</aai.base.image.version>
 +        <!-- This will be used for the docker images as the default format of maven build has issues -->
 +        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
      </properties>
  
      <dependencyManagement>
              <id>docker</id>
              <build>
                  <plugins>
 -                    <plugin>
 -                        <groupId>org.codehaus.groovy.maven</groupId>
 -                        <artifactId>gmaven-plugin</artifactId>
 -                        <version>1.0</version>
 -                        <executions>
 -                            <execution>
 -                                <phase>prepare-package</phase>
 -                                <goals>
 -                                    <goal>execute</goal>
 -                                </goals>
 -                                <configuration>
 -                                    <source>
 -                                        def userAaiBaseImage = session.userProperties['aai.base.image']
 -                                        def userAaiCommonVersion = session.userProperties['aai.base.image.version']
 -                                        if (userAaiCommonVersion != null) {
 -                                            project.properties['aai.base.image.version'] = userAaiCommonVersion
 -                                        }
 -                                        if (userAaiBaseImage != null) {
 -                                            project.properties['aai.base.image'] = userAaiBaseImage
 -                                        }
 -                                        log.info 'Base image flavour: ' + project.properties['aai.base.image']
 -                                        log.info 'Base image version: ' + project.properties['aai.base.image.version']
 -                                    </source>
 -                                </configuration>
 -                            </execution>
 -                        </executions>
 -                    </plugin>
 -                    <plugin>
 -                        <groupId>io.fabric8</groupId>
 -                        <artifactId>docker-maven-plugin</artifactId>
 -                        <version>${docker.fabric.version}</version>
 +                  <plugin>
 +                    <groupId>org.codehaus.mojo</groupId>
 +                    <artifactId>build-helper-maven-plugin</artifactId>
 +                    <version>3.0.0</version>
 +                    <executions>
 +                      <execution>
 +                        <phase>pre-clean</phase>
 +                        <id>parse-version</id>
 +                        <goals>
 +                          <goal>parse-version</goal>
 +                        </goals>
 +                      </execution>
 +                    </executions>
 +                  </plugin>
 +                  <plugin>
 +                    <groupId>org.codehaus.groovy.maven</groupId>
 +                    <artifactId>gmaven-plugin</artifactId>
 +                    <version>1.0</version>
 +                    <executions>
 +                      <execution>
 +                        <phase>pre-clean</phase>
 +                        <goals>
 +                          <goal>execute</goal>
 +                        </goals>
                          <configuration>
 -                            <verbose>true</verbose>
 -                            <apiVersion>1.23</apiVersion>
 -                            <images>
 -                                <image>
 -                                    <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
 -                                    </name>
 -                                    <build>
 -                                        <filter>@</filter>
 -                                        <tags>
 -                                            <tag>latest</tag>
 -                                        </tags>
 -                                        <cleanup>try</cleanup>
 -                                        <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
 -                                        <assembly>
 -                                            <inline>
 -                                                <fileSets>
 -                                                    <fileSet>
 -                                                        <directory>${aai.build.directory}</directory>
 -                                                        <outputDirectory>/${project.artifactId}</outputDirectory>
 -                                                    </fileSet>
 -                                                </fileSets>
 -                                            </inline>
 -                                        </assembly>
 -                                    </build>
 -                                </image>
 -                            </images>
 -                        </configuration>
 -                        <executions>
 -                            <execution>
 -                                <id>clean-images</id>
 -                                <phase>pre-clean</phase>
 -                                <goals>
 -                                    <goal>remove</goal>
 -                                </goals>
 -                                <configuration>
 -                                    <removeAll>true</removeAll>
 -                                </configuration>
 -                            </execution>
 -                            <execution>
 -                                <id>generate-images</id>
 -                                <phase>package</phase>
 -                                <goals>
 -                                    <goal>build</goal>
 -                                </goals>
 -                            </execution>
 -                            <execution>
 -                                <id>push-images</id>
 -                                <phase>deploy</phase>
 -                                <goals>
 -                                    <goal>push</goal>
 -                                </goals>
 -                            </execution>
 -                        </executions>
 -                    </plugin>
 -                </plugins>
 -            </build>
 -        </profile>
 +                          <source>
 +                            def userAaiBaseImage = session.userProperties['aai.base.image']
 +                            def userAaiCommonVersion = session.userProperties['aai.base.image.version']
 +                            if (userAaiCommonVersion != null) {
 +                               project.properties['aai.base.image.version'] = userAaiCommonVersion
 +                            }
 +                            if (userAaiBaseImage != null) {
 +                               project.properties['aai.base.image'] = userAaiBaseImage
 +                            }
 +                            log.info 'Base image flavour: ' + project.properties['aai.base.image']
 +                            log.info 'Base image version: ' + project.properties['aai.base.image.version']
 +                  </source>
 +                </configuration>
 +              </execution>
 +            </executions>
 +            </plugin>
 +            <plugin>
 +              <groupId>io.fabric8</groupId>
 +              <artifactId>docker-maven-plugin</artifactId>
 +              <version>${docker.fabric.version}</version>
 +              <configuration>
 +                <verbose>true</verbose>
 +                <apiVersion>1.23</apiVersion>
 +                <images>
 +                  <image>
 +                    <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
 +                    </name>
 +                    <build>
 +                      <filter>@</filter>
 +                      <tags>
 +                        <tag>latest</tag>
 +                        <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
 +                        <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
 +                      </tags>
 +                      <cleanup>try</cleanup>
 +                      <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
 +                      <assembly>
 +                        <inline>
 +                          <fileSets>
 +                            <fileSet>
 +                              <directory>${aai.build.directory}</directory>
 +                              <outputDirectory>/${project.artifactId}</outputDirectory>
 +                            </fileSet>
 +                          </fileSets>
 +                        </inline>
 +                      </assembly>
 +                    </build>
 +                  </image>
 +                </images>
 +              </configuration>
 +              <executions>
 +                <execution>
 +                  <id>clean-images</id>
 +                  <phase>pre-clean</phase>
 +                  <goals>
 +                    <goal>remove</goal>
 +                  </goals>
 +                  <configuration>
 +                    <removeAll>true</removeAll>
 +                  </configuration>
 +                </execution>
 +                <execution>
 +                  <id>generate-images</id>
 +                  <phase>package</phase>
 +                  <goals>
 +                    <goal>build</goal>
 +                  </goals>
 +                </execution>
 +                <execution>
 +                  <id>push-images</id>
 +                  <phase>deploy</phase>
 +                  <goals>
 +                    <goal>push</goal>
 +                  </goals>
 +                </execution>
 +              </executions>
 +            </plugin>
 +          </plugins>
 +        </build>
 +      </profile>
      </profiles>
  
      <build>
          <finalName>${project.artifactId}</finalName>
 -        <plugins>
 -            <!--
 +        <!--
              Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
              Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
              Use in combination to rewrite code and imports, then checkstyle
  
              mvn formatter:format spotless:apply process-sources
 -            -->
 -            <plugin>
 +        -->
 +      <plugins>
 +          <plugin>
                  <groupId>net.revelc.code.formatter</groupId>
                  <artifactId>formatter-maven-plugin</artifactId>
                  <version>2.8.1</version>
                       use mvn formatter:format to rewrite source files
                       use mvn formatter:validate to validate source files -->
              </plugin>
 +          <plugin>
 +            <groupId>org.codehaus.groovy.maven</groupId>
 +            <artifactId>gmaven-plugin</artifactId>
 +          </plugin>
              <plugin>
                  <groupId>com.diffplug.spotless</groupId>
                  <artifactId>spotless-maven-plugin</artifactId>
                                      <version>${version.org.onap.aai.aai-schema}</version>
                                      <type>jar</type>
                                      <includes>onap/**/</includes>
 +                                    <excludes>onap/*swagger**/</excludes>
                                      <outputDirectory>${aai.build.directory}/bundleconfig/etc</outputDirectory>
                                  </artifactItem>
                              </artifactItems>
                      </execution>
                  </executions>
              </plugin>
 -        <plugin>
 -            <groupId>org.codehaus.mojo</groupId>
 -            <artifactId>build-helper-maven-plugin</artifactId>
 -              <version>3.0.0</version>
 -              <executions>
 -              <execution>
 -                <id>parse-version</id>
 -                <goals>
 -                  <goal>parse-version</goal>
 -                </goals>
 -              </execution>
 -              </executions>
 -          </plugin>
 +
        </plugins>
      </build>