summaryrefslogtreecommitdiffstats
path: root/datarouter-node
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node')
-rwxr-xr-xdatarouter-node/pom.xml155
1 files changed, 42 insertions, 113 deletions
diff --git a/datarouter-node/pom.xml b/datarouter-node/pom.xml
index 95b2aa00..9f5de17e 100755
--- a/datarouter-node/pom.xml
+++ b/datarouter-node/pom.xml
@@ -7,9 +7,9 @@
* 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.
@@ -196,12 +196,49 @@
<profile>
<id>docker</id>
<properties>
- <skip.docker.build>false</skip.docker.build>
- <skip.docker.tag>false</skip.docker.tag>
- <skip.docker.push>false</skip.docker.push>
+ <skipDockerBuild>false</skipDockerBuild>
+ <skipDockerTag>false</skipDockerTag>
+ <skipTests>true</skipTests>
</properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <imageName>${onap.nexus.dockerregistry.daily}/${datarouter.node.image.name}</imageName>
+ <dockerDirectory>${docker.location}</dockerDirectory>
+ <serverId>${onap.nexus.dockerregistry.daily}</serverId>
+ <skipDockerBuild>false</skipDockerBuild>
+ <imageTags>
+ <imageTag>${project.version}</imageTag>
+ <imageTag>latest</imageTag>
+ </imageTags>
+ <forceTags>true</forceTags>
+ <resources>
+ <resource>
+ <targetPath>/</targetPath>
+ <directory>${project.basedir}</directory>
+ <excludes>
+ <exclude>target/**/*</exclude>
+ <exclude>pom.xml</exclude>
+ </excludes>
+ </resource>
+
+ <resource>
+ <targetPath>/</targetPath>
+ <directory>${project.build.directory}</directory>
+ <include>**/**</include>
+ </resource>
+ </resources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
+
<build>
<finalName>datarouter-node</finalName>
<resources>
@@ -330,92 +367,6 @@
</executions>
</plugin>
<plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker.maven.plugin.version}</version>
- <configuration>
- <skipDockerBuild>false</skipDockerBuild>
- <imageName>${datarouter.node.image.name}</imageName>
- <dockerDirectory>${docker.location}</dockerDirectory>
- <serverId>docker-hub</serverId>
- <imageTags>
- <imageTag>${project.version}</imageTag>
- <imageTag>latest</imageTag>
- </imageTags>
- <forceTags>true</forceTags>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <directory>${docker.location}</directory>
- <include>${project.build.finalName}.jar</include>
- </resource>
- <resource>
- <targetPath>/</targetPath>
- <directory>${project.build.directory}</directory>
- <include>**/**</include>
- </resource>
- </resources>
- </configuration>
- <executions>
- <execution>
- <id>build-image</id>
- <phase>install</phase>
- <goals>
- <goal>build</goal>
- </goals>
- <configuration>
- <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
- </configuration>
- </execution>
- <execution>
- <id>tag-image-project-version</id>
- <phase>install</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>${datarouter.node.image.name}</image>
- <newName>${onap.nexus.dockerregistry.daily}/${datarouter.node.image.name}:${project.version}</newName>
- <skipDockerTag>${skip.docker.push}</skipDockerTag>
- </configuration>
- </execution>
- <execution>
- <id>tag-image-latest</id>
- <phase>install</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>${datarouter.node.image.name}</image>
- <newName>${onap.nexus.dockerregistry.daily}/${datarouter.node.image.name}:latest</newName>
- <skipDockerTag>${skip.docker.push}</skipDockerTag>
- </configuration>
- </execution>
- <execution>
- <id>push-image-latest</id>
- <phase>deploy</phase>
- <goals>
- <goal>push</goal>
- </goals>
- <configuration>
- <imageName>${onap.nexus.dockerregistry.daily}/${datarouter.node.image.name}:${project.version}</imageName>
- <skipDockerPush>${skip.docker.push}</skipDockerPush>
- </configuration>
- </execution>
- <execution>
- <id>push-image</id>
- <phase>deploy</phase>
- <goals>
- <goal>push</goal>
- </goals>
- <configuration>
- <imageName>${onap.nexus.dockerregistry.daily}/${datarouter.node.image.name}:latest</imageName>
- <skipDockerPush>${skip.docker.push}</skipDockerPush>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
@@ -546,26 +497,4 @@
</plugin>
</plugins>
</build>
- <distributionManagement>
- <repository>
- <id>ecomp-releases</id>
- <name>DR Release Repository</name>
- <url>${onap.nexus.url}${releaseNexusPath}</url>
- </repository>
- <snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>DR Snapshot Repository</name>
- <url>${onap.nexus.url}${snapshotNexusPath}</url>
- </snapshotRepository>
- <site>
- <id>ecomp-site</id>
- <url>dav:${onap.nexus.url}${sitePath}</url>
- </site>
- </distributionManagement>
- <pluginRepositories>
- <pluginRepository>
- <id>onap-plugin-snapshots</id>
- <url>${onap.nexus.url}${snapshotNexusPath}</url>
- </pluginRepository>
- </pluginRepositories>
</project>