diff options
Diffstat (limited to 'datarouter-prov')
-rwxr-xr-x | datarouter-prov/pom.xml | 156 |
1 files changed, 41 insertions, 115 deletions
diff --git a/datarouter-prov/pom.xml b/datarouter-prov/pom.xml index a348c784..2107e9c0 100755 --- a/datarouter-prov/pom.xml +++ b/datarouter-prov/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.
@@ -218,18 +218,52 @@ <scope>compile</scope>
</dependency>
</dependencies>
-
<profiles>
<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.prov.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-prov</finalName>
<resources>
@@ -301,92 +335,6 @@ <version>3.6.0</version>
</plugin>
<plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker.maven.plugin.version}</version>
- <configuration>
- <skipDockerBuild>false</skipDockerBuild>
- <imageName>${datarouter.prov.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.prov.image.name}</image>
- <newName>${onap.nexus.dockerregistry.daily}/${datarouter.prov.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.prov.image.name}</image>
- <newName>${onap.nexus.dockerregistry.daily}/${datarouter.prov.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.prov.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.prov.image.name}:latest</imageName>
- <skipDockerPush>${skip.docker.push}</skipDockerPush>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
@@ -618,26 +566,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>
|