diff options
author | amshegokar <AS00500801@techmahindra.com> | 2018-04-20 18:52:39 +0530 |
---|---|---|
committer | amshegokar <AS00500801@techmahindra.com> | 2018-04-20 18:52:39 +0530 |
commit | f69a266b4b856828eae17e2676925d1ca5d94dba (patch) | |
tree | 560225207336113f511eb2baf8441bcc846a7cbd /snmpmapper | |
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 'snmpmapper')
-rw-r--r-- | snmpmapper/pom.xml | 93 |
1 files changed, 87 insertions, 6 deletions
diff --git a/snmpmapper/pom.xml b/snmpmapper/pom.xml index 67875b6..69fde73 100644 --- a/snmpmapper/pom.xml +++ b/snmpmapper/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> @@ -72,13 +91,75 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + <configuration> + <mainClass>org.onap.dcae.mapper.SnmpmapperApplication</mainClass> + </configuration> + </execution> + </executions> </plugin> - <!-- <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.19.1</version> - </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>8888</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> |