diff options
author | 2018-04-20 18:52:39 +0530 | |
---|---|---|
committer | 2018-04-20 18:52:39 +0530 | |
commit | f69a266b4b856828eae17e2676925d1ca5d94dba (patch) | |
tree | 560225207336113f511eb2baf8441bcc846a7cbd /UniversalVesAdapter/pom.xml | |
parent | 7ea285597dd3c377ddec90255919d92084a5bd8e (diff) |
Add Docker and Spring Boot plugin
Adding Docker, Spring Boot plugin and License to pom
Change-Id: I623e62ad09ad75a264b8716beced34b826c53637
Issue-ID: DCAEGEN2-459
Signed-off-by: amshegokar <AS00500801@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter/pom.xml')
-rw-r--r-- | UniversalVesAdapter/pom.xml | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/UniversalVesAdapter/pom.xml b/UniversalVesAdapter/pom.xml index 0649cd0..5b90589 100644 --- a/UniversalVesAdapter/pom.xml +++ b/UniversalVesAdapter/pom.xml @@ -1,4 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- +* ============LICENSE_START======================================================= +* ONAP : DCAEGEN2/services/mapper +* ================================================================================ +* Copyright 2018 TechMahindra +*================================================================================= +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= + --> <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> @@ -112,7 +131,75 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + <configuration> + <mainClass>org.onap.universalvesadapter.Application</mainClass> + </configuration> + </execution> + </executions> </plugin> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>1.0.0</version> + <configuration> + <imageName>${onap.nexus.dockerregistry.daily}/onap/${project.groupId}.${project.artifactId}</imageName> + <baseImage>openjdk:8-jre</baseImage> + <entryPoint>["java", "-jar", "/opt/${project.build.finalName}.jar", "server"]</entryPoint> + <resources> + <resource> + <targetPath>/opt</targetPath> + <directory>${project.build.directory}</directory> + <include>${project.build.finalName}.jar</include> + </resource> + </resources> + <exposes> + <expose>8080</expose> + </exposes> + <imageTags> + <imageTag>${project.version}-SNAPSHOT-${maven.build.timestamp}Z</imageTag> + <imageTag>${project.version}</imageTag> + <imageTag>latest</imageTag> + </imageTags> + <serverId>${onap.nexus.dockerregistry.daily}</serverId> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.9.1</version> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>src/gen/java</source> + </sources> + </configuration> + </execution> + <execution> + <id>regex-property</id> + <goals> + <goal>regex-property</goal> + </goals> + <configuration> + <name>docker.version</name> + <value>${project.version}</value> + <regex>(^[0-9]+.[0-9]+.[0-9]+$)</regex> + <replacement>$1-STAGING</replacement> + <failIfNoMatch>false</failIfNoMatch> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> |