diff options
author | 2019-09-05 09:34:58 -0400 | |
---|---|---|
committer | 2019-09-05 09:37:56 -0400 | |
commit | 98624347bcadd2056a48b1062869f952959168ab (patch) | |
tree | 1b8ca2223408114a4e68ddfc4c17aec0b7996362 | |
parent | 7262f36b73f3c1ce982a9914760be5e3f63534ea (diff) |
Fix docker build job
Issue-ID: AAI-2579
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
Change-Id: I864e9409e189455f965eb5a77a1703fcda9256b8
-rw-r--r-- | elasticsearch-sg/pom.xml | 197 | ||||
-rw-r--r-- | pom.xml | 43 | ||||
-rw-r--r-- | search-data-service-app/pom.xml | 999 | ||||
-rw-r--r-- | search-data-service-app/src/main/assembly/descriptor.xml | 32 |
4 files changed, 744 insertions, 527 deletions
diff --git a/elasticsearch-sg/pom.xml b/elasticsearch-sg/pom.xml index f7a2c66..c97f52c 100644 --- a/elasticsearch-sg/pom.xml +++ b/elasticsearch-sg/pom.xml @@ -21,88 +21,129 @@ --> <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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>search-data-service</artifactId> - <groupId>org.onap.aai</groupId> - <version>1.5.1-SNAPSHOT</version> - </parent> + <parent> + <artifactId>search-data-service</artifactId> + <groupId>org.onap.aai</groupId> + <version>1.5.1-SNAPSHOT</version> + </parent> - <groupId>org.onap.aai.search-data-service</groupId> - <artifactId>elasticsearch-sg</artifactId> - <name>ElasticSearch with SearchGuard</name> - <version>1.5.1-SNAPSHOT</version> - <packaging>pom</packaging> + <groupId>org.onap.aai.search-data-service</groupId> + <artifactId>elasticsearch-sg</artifactId> + <name>ElasticSearch with SearchGuard</name> + <version>1.5.1-SNAPSHOT</version> + <packaging>pom</packaging> - <properties> - <nexusproxy>https://nexus.onap.org</nexusproxy> - </properties> + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.0.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.7</version> + <executions> + <execution> + <id>copy-docker-file</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${aai.build.directory}</outputDirectory> + <overwrite>true</overwrite> + <resources> + <resource> + <directory>${basedir}/src/main/docker</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>2.7</version> - <executions> - <execution> - <id>copy-docker-file</id> - <phase>process-resources</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>target</outputDirectory> - <overwrite>true</overwrite> - <resources> - <resource> - <directory>${basedir}/src/main/docker</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.4.11</version> - <configuration> - <verbose>true</verbose> - <serverId>docker-hub</serverId> - <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName> - <dockerDirectory>${basedir}/target</dockerDirectory> - <imageTags> - <imageTag>latest</imageTag> - </imageTags> - <forceTags>true</forceTags> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - </plugin> - </plugins> - </build> - - <distributionManagement> - <repository> - <id>ecomp-releases</id> - <name>ECOMP Release Repository</name> - <url>${nexusproxy}/content/repositories/releases/</url> - </repository> - <snapshotRepository> - <id>ecomp-snapshots</id> - <name>ECOMP Snapshot Repository</name> - <url>${nexusproxy}/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> + <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>${aai.build.directory}</dockerFileDir> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>clean-images</id> + <phase>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> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <distributionManagement> + <repository> + <id>ecomp-releases</id> + <name>ECOMP Release Repository</name> + <url>${nexusproxy}/content/repositories/releases/</url> + </repository> + <snapshotRepository> + <id>ecomp-snapshots</id> + <name>ECOMP Snapshot Repository</name> + <url>${nexusproxy}/content/repositories/snapshots/</url> + </snapshotRepository> + </distributionManagement> </project> @@ -41,19 +41,46 @@ <properties> <nexusproxy>https://nexus.onap.org</nexusproxy> + <!-- docker related properties --> + <docker.fabric.version>0.31.0</docker.fabric.version> + <aai.docker.version>1.0.0</aai.docker.version> + <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> + <aai.build.directory>${project.build.directory}/${project.artifactId}-build/</aai.build.directory> + <!-- 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> + <profiles> + <profile> + <id>docker</id> + <build> + <pluginManagement> + <plugins> + <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> + </plugins> + </pluginManagement> + </build> + </profile> + </profiles> + <build> <plugins> <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.4.11</version> - <configuration> - <skipDockerBuild>true</skipDockerBuild> - </configuration> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> </plugin> diff --git a/search-data-service-app/pom.xml b/search-data-service-app/pom.xml index be4b458..b4a7e81 100644 --- a/search-data-service-app/pom.xml +++ b/search-data-service-app/pom.xml @@ -21,462 +21,579 @@ --> <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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <artifactId>search-data-service</artifactId> - <groupId>org.onap.aai</groupId> - <version>1.5.1-SNAPSHOT</version> - </parent> - - <groupId>org.onap.aai.search-data-service</groupId> - <artifactId>search-data-service-app</artifactId> - <version>1.5.1-SNAPSHOT</version> - <name>AAI Search Data Service Application</name> - - <properties> - <docker.location>${basedir}/target</docker.location> - <docker.image.name.suffix>search-data-service</docker.image.name.suffix> - <nexusproxy>https://nexus.onap.org</nexusproxy> - <java.version>1.8</java.version> - <generatedSourceDir>${basedir}/src/main/java-gen</generatedSourceDir> - <checkstyle.config.location>google_checks.xml</checkstyle.config.location> - - <sonar.language>java</sonar.language> - <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> - <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports - </sonar.surefire.reportsPath> - <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec - </sonar.jacoco.reportPath> - <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero> - <sonar.projectVersion>${project.version}</sonar.projectVersion> - <jacoco.line.coverage.limit>0.58</jacoco.line.coverage.limit> - <spring.boot.version>1.5.21.RELEASE</spring.boot.version> - </properties> - - <dependencyManagement> - <dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>search-data-service</artifactId> + <groupId>org.onap.aai</groupId> + <version>1.5.1-SNAPSHOT</version> + </parent> + + <groupId>org.onap.aai.search-data-service</groupId> + <artifactId>search-data-service-app</artifactId> + <version>1.5.1-SNAPSHOT</version> + <name>AAI Search Data Service Application</name> + + <properties> + <docker.image.name.suffix>search-data-service</docker.image.name.suffix> + <java.version>1.8</java.version> + <generatedSourceDir>${basedir}/src/main/java-gen</generatedSourceDir> + <checkstyle.config.location>google_checks.xml</checkstyle.config.location> + + <sonar.language>java</sonar.language> + <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports + </sonar.surefire.reportsPath> + <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec + </sonar.jacoco.reportPath> + <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <jacoco.line.coverage.limit>0.58</jacoco.line.coverage.limit> + <spring.boot.version>1.5.21.RELEASE</spring.boot.version> + </properties> + + <dependencyManagement> + <dependencies> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>${spring.boot.version}</version> - <type>pom</type> - <scope>import</scope> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>com.jayway.jsonpath</groupId> - <artifactId>json-path</artifactId> - </dependency> - - <dependency> - <groupId>com.googlecode.json-simple</groupId> - <artifactId>json-simple</artifactId> - </dependency> - - <dependency> - <groupId>org.dom4j</groupId> - <artifactId>dom4j</artifactId> - <version>2.1.1</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.4</version> - </dependency> - - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.10.19</version> - <scope>test</scope> - </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + </dependency> + + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-library</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>com.jayway.jsonpath</groupId> + <artifactId>json-path</artifactId> + </dependency> + + <dependency> + <groupId>com.googlecode.json-simple</groupId> + <artifactId>json-simple</artifactId> + </dependency> + + <dependency> + <groupId>org.dom4j</groupId> + <artifactId>dom4j</artifactId> + <version>2.1.1</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.4</version> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-all</artifactId> + <version>1.10.19</version> + <scope>test</scope> + </dependency> <!-- Common logging framework --> - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>common-logging</artifactId> - <version>1.5.0</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>logging-api</artifactId> - <version>1.5.0</version> - </dependency> - - <dependency> - <groupId>org.onap.aai.logging-service</groupId> - <artifactId>eelf-logging</artifactId> - <version>1.5.0</version> - </dependency> + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>common-logging</artifactId> + <version>1.5.0</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>logging-api</artifactId> + <version>1.5.0</version> + </dependency> + + <dependency> + <groupId>org.onap.aai.logging-service</groupId> + <artifactId>eelf-logging</artifactId> + <version>1.5.0</version> + </dependency> <!-- For JSON Mapping Support. --> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.directory.studio</groupId> - <artifactId>org.apache.commons.lang</artifactId> - <version>2.6</version> - </dependency> - - <dependency> - <groupId>radeox</groupId> - <artifactId>radeox</artifactId> - <version>0.9</version> - </dependency> - - <dependency> - <groupId>com.github.fge</groupId> - <artifactId>json-schema-validator</artifactId> - <version>2.0.0</version> - </dependency> - - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <version>20180130</version> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - <exclusions> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-tomcat</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-jetty</artifactId> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter</artifactId> - <exclusions> - <exclusion> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-jersey</artifactId> - <exclusions> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-tomcat</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-actuator</artifactId> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-security</artifactId> - </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.directory.studio</groupId> + <artifactId>org.apache.commons.lang</artifactId> + <version>2.6</version> + </dependency> + + <dependency> + <groupId>radeox</groupId> + <artifactId>radeox</artifactId> + <version>0.9</version> + </dependency> + + <dependency> + <groupId>com.github.fge</groupId> + <artifactId>json-schema-validator</artifactId> + <version>2.0.0</version> + </dependency> + + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20180130</version> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jetty</artifactId> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter</artifactId> + <exclusions> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jersey</artifactId> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-actuator</artifactId> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-security</artifactId> + </dependency> <!--Logback classic--> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </dependency> - - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - </dependency> - - </dependencies> - - <repositories> - <repository> - <id>central</id> - <name>Maven 2 repository 2</name> - <url>http://repo2.maven.org/maven2/</url> - </repository> - <repository> - <id>ecomp-releases</id> - <name>ECOMP Release Repository</name> - <url>${nexusproxy}/content/repositories/releases/</url> - </repository> - <repository> - <id>ecomp-snapshots</id> - <name>ECOMP Snapshot Repository</name> - <url>${nexusproxy}/content/repositories/snapshots/</url> - </repository> - <repository> - <id>ecomp-staging</id> - <name>ECOMP Staging Repository</name> - <url>${nexusproxy}/content/repositories/staging/</url> - </repository> - </repositories> - - <build> - <finalName>search-data-service-package</finalName> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </dependency> + + </dependencies> + + <repositories> + <repository> + <id>central</id> + <name>Maven 2 repository 2</name> + <url>http://repo2.maven.org/maven2/</url> + </repository> + <repository> + <id>ecomp-releases</id> + <name>ECOMP Release Repository</name> + <url>${nexusproxy}/content/repositories/releases/</url> + </repository> + <repository> + <id>ecomp-snapshots</id> + <name>ECOMP Snapshot Repository</name> + <url>${nexusproxy}/content/repositories/snapshots/</url> + </repository> + <repository> + <id>ecomp-staging</id> + <name>ECOMP Staging Repository</name> + <url>${nexusproxy}/content/repositories/staging/</url> + </repository> + </repositories> + + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.0.0</version> + </plugin> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/main/assembly/descriptor.xml</descriptor> + </descriptors> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + <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> + <configuration> + <verbose>true</verbose> + <apiVersion>1.23</apiVersion> + <images> + <image> + <name>${docker.push.registry}/${aai.docker.namespace}/${docker.image.name.suffix}:%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>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> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> <!-- Checkstyle plugin - used to report on compliance with --> <!-- the Google style guide. --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <configuration> - <reportPlugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.17</version> - <reportSets> - <reportSet> - <reports> - <report>checkstyle</report> - </reports> - </reportSet> - </reportSets> - </plugin> - </reportPlugins> - </configuration> - </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <configuration> + <reportPlugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.17</version> + <reportSets> + <reportSet> + <reports> + <report>checkstyle</report> + </reports> + </reportSet> + </reportSets> + </plugin> + </reportPlugins> + </configuration> + </plugin> <!-- This plugin overrides the compiler settings to use java 1.8 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <compilerId>groovy-eclipse-compiler</compilerId> - <verbose>true</verbose> - <source>1.8</source> - <target>1.8</target> - </configuration> - <dependencies> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-eclipse-compiler</artifactId> - <version>2.9.0-01</version> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-eclipse-batch</artifactId> - <version>2.3.4-01</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.4.11</version> - <configuration> - <verbose>true</verbose> - <serverId>docker-hub</serverId> - <imageName>${docker.push.registry}/onap/${docker.image.name.suffix}</imageName> - <dockerDirectory>${docker.location}</dockerDirectory> - <imageTags> - <imageTag>latest</imageTag> - </imageTags> - <forceTags>true</forceTags> - </configuration> - </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <compilerId>groovy-eclipse-compiler</compilerId> + <verbose>true</verbose> + <source>1.8</source> + <target>1.8</target> + </configuration> + <dependencies> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-eclipse-compiler</artifactId> + <version>2.9.0-01</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-eclipse-batch</artifactId> + <version>2.3.4-01</version> + </dependency> + </dependencies> + </plugin> <!-- This plugin is used to generate Java POJO's from json format schema file. --> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <version>0.4.26</version> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <sourceDirectory>${basedir}/src/main/resources/json/schema</sourceDirectory> - <outputDirectory>${generatedSourceDir}</outputDirectory> - <targetPackage>org.onap.aai.sa.rest</targetPackage> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <executions> - <execution> - <id>copy-docker-file</id> - <phase>package</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>target</outputDirectory> - <overwrite>true</overwrite> - <resources> - <resource> - <directory>${basedir}/src/main/docker</directory> - <filtering>true</filtering> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <directory>${basedir}</directory> - <filtering>true</filtering> - <includes> - <include>bundleconfig-local/**</include> - </includes> - </resource> - <resource> - <directory>${basedir}/src/main/bin/</directory> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> + <plugin> + <groupId>org.jsonschema2pojo</groupId> + <artifactId>jsonschema2pojo-maven-plugin</artifactId> + <version>0.4.26</version> + <configuration> + <addCompileSourceRoot>true</addCompileSourceRoot> + <sourceDirectory>${basedir}/src/main/resources/json/schema</sourceDirectory> + <outputDirectory>${generatedSourceDir}</outputDirectory> + <targetPackage>org.onap.aai.sa.rest</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- license plugin --> - <plugin> - <groupId>com.mycila</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>3.0</version> - <configuration> - <header>License.txt</header> - <includes> - <include>src/main/java/**</include> - <include>src/test/java/**</include> - <include>pom.xml</include> - </includes> - <skipExistingHeaders>true</skipExistingHeaders> - </configuration> - <executions> - <execution> - <goals> - <goal>check</goal> - </goals> - <phase>validate</phase> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>sonar-maven-plugin</artifactId> - <version>3.2</version> - </plugin> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - <version>0.7.7.201606060606</version> - <configuration> - <dumpOnExit>true</dumpOnExit> - </configuration> - <executions> - <execution> - <id>jacoco-initialize-unit-tests</id> - <goals> - <goal>prepare-agent</goal> - </goals> - <configuration> - <destFile>${project.build.directory}/coverage-reports/jacoco.exec - </destFile> - <!-- <append>true</append> --> - </configuration> - </execution> - <execution> - <id>default-check</id> - <goals> - <goal>check</goal> - </goals> - <configuration> - <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile> - <rules> + <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + <version>3.0</version> + <configuration> + <header>License.txt</header> + <includes> + <include>src/main/java/**</include> + <include>src/test/java/**</include> + <include>pom.xml</include> + </includes> + <skipExistingHeaders>true</skipExistingHeaders> + </configuration> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + <phase>validate</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>sonar-maven-plugin</artifactId> + <version>3.2</version> + </plugin> + <!-- jacoco-maven-plugin provides the basic report creation during unit testing, such as code-coverage, sonar, etc. --> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <!-- Prepares the property pointing to the JaCoCo runtime agent which + is passed as VM argument when Maven the Surefire plugin is executed. --> + <execution> + <id>pre-unit-test</id> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + <destFile>${sonar.jacoco.reportPath}</destFile> + <propertyName>surefireArgLine</propertyName> + </configuration> + </execution> + <!-- Ensures that the code coverage report for unit tests is created + after unit tests have been run. --> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + <dataFile>${sonar.jacoco.reportPath}</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${jacoco.path}</outputDirectory> + </configuration> + </execution> + <!-- Prepares the property pointing to the JaCoCo runtime agent which + is passed as VM argument when Maven the Failsafe plugin is executed. --> + <execution> + <id>pre-integration-test</id> + <phase>pre-integration-test</phase> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + <destFile>${sonar.jacoco.itReportPath}</destFile> + <!-- Sets the name of the property containing the settings for JaCoCo + runtime agent. --> + <propertyName>failsafeArgLine</propertyName> + </configuration> + </execution> + <!-- Ensures that the code coverage report for integration tests after + integration tests have been run. --> + <execution> + <id>post-integration-test</id> + <phase>post-integration-test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + <dataFile>${sonar.jacoco.itReportPath}/</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${jacoco.itPath}</outputDirectory> + </configuration> + </execution> + <execution> + <id>default-check</id> + <goals> + <goal>check</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile> + <rules> <!-- implementation is needed only for Maven 2 --> - <rule implementation="org.jacoco.maven.RuleConfiguration"> - <element>BUNDLE</element> - <limits> - <limit implementation="org.jacoco.report.check.Limit"> - <counter>LINE</counter> - <value>COVEREDRATIO</value> - <minimum>${jacoco.line.coverage.limit}</minimum> - </limit> - </limits> - </rule> - </rules> - </configuration> - </execution> - </executions> - </plugin> - + <rule implementation="org.jacoco.maven.RuleConfiguration"> + <element>BUNDLE</element> + <limits> + <limit implementation="org.jacoco.report.check.Limit"> + <counter>LINE</counter> + <value>COVEREDRATIO</value> + <minimum>${jacoco.line.coverage.limit}</minimum> + </limit> + </limits> + </rule> + </rules> + </configuration> + </execution> + </executions> + </plugin> <!-- This plugin adds the generated sources directory to the clean lifecycle so that automatically generated code will get cleaned up properly. --> - <plugin> - <artifactId>maven-clean-plugin</artifactId> - <configuration> - <filesets> - <fileset> - <directory>${generatedSourceDir}</directory> - </fileset> - </filesets> - </configuration> - </plugin> - </plugins> - </build> - <distributionManagement> - <repository> - <id>ecomp-releases</id> - <name>ECOMP Release Repository</name> - <url>${nexusproxy}/content/repositories/releases/</url> - </repository> - <snapshotRepository> - <id>ecomp-snapshots</id> - <name>ECOMP Snapshot Repository</name> - <url>${nexusproxy}/content/repositories/snapshots/</url> - </snapshotRepository> - <site> - <id>ecomp-javadoc</id> - <url>dav:https://ecomp-nexus:8443/repository/aai/search-data-service-javadoc/${project.version}</url> - </site> - </distributionManagement> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <filesets> + <fileset> + <directory>${generatedSourceDir}</directory> + </fileset> + </filesets> + </configuration> + </plugin> + </plugins> + </build> + <distributionManagement> + <repository> + <id>ecomp-releases</id> + <name>ECOMP Release Repository</name> + <url>${nexusproxy}/content/repositories/releases/</url> + </repository> + <snapshotRepository> + <id>ecomp-snapshots</id> + <name>ECOMP Snapshot Repository</name> + <url>${nexusproxy}/content/repositories/snapshots/</url> + </snapshotRepository> + <site> + <id>ecomp-javadoc</id> + <url>dav:https://ecomp-nexus:8443/repository/aai/search-data-service-javadoc/${project.version}</url> + </site> + </distributionManagement> </project> diff --git a/search-data-service-app/src/main/assembly/descriptor.xml b/search-data-service-app/src/main/assembly/descriptor.xml new file mode 100644 index 0000000..5e46871 --- /dev/null +++ b/search-data-service-app/src/main/assembly/descriptor.xml @@ -0,0 +1,32 @@ +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>build</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/bundleconfig-local</directory>
+ <outputDirectory>/bundleconfig</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src/main/bin</directory>
+ <outputDirectory>/bin</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>${project.build.directory}/${project.artifactId}.jar</source>
+ <destName>${project.parent.artifactId}-package.jar</destName>
+ <outputDirectory>/</outputDirectory>
+ </file>
+ </files>
+</assembly>
|