blob: ec183454f6e8df5f8a45826456b15fb716040d33 [file] [log] [blame]
Timoney, Dan (dt5972)428403f2019-06-12 14:45:15 +02001<?xml version="1.0" encoding="UTF-8"?>
2<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">
3 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
6 <groupId>org.onap.ccsdk.distribution</groupId>
7 <artifactId>distribution-odl-neon</artifactId>
Timoney, Dan (dt5972)3948e2a2019-09-12 10:04:46 -04008 <version>0.7.0-SNAPSHOT</version>
Timoney, Dan (dt5972)428403f2019-06-12 14:45:15 +02009 </parent>
10
Timoney, Dan (dt5972)707c6a12019-09-24 16:04:42 -040011 <artifactId>distribution-odl-neon-docker</artifactId>
Timoney, Dan (dt5972)3948e2a2019-09-12 10:04:46 -040012 <version>0.7.0-SNAPSHOT</version>
Timoney, Dan (dt5972)428403f2019-06-12 14:45:15 +020013 <packaging>pom</packaging>
14
Timoney, Dan (dt5972)707c6a12019-09-24 16:04:42 -040015 <name>ccsdk-distribution :: opendaylight :: neon :: docker</name>
Timoney, Dan (dt5972)428403f2019-06-12 14:45:15 +020016 <description>Creates OpenDaylight container</description>
17 <organization>
18 <name>ONAP</name>
19 </organization>
20
21 <properties>
22 <image.name>onap/ccsdk-odl-neon-alpine-image</image.name>
23 </properties>
24 <build>
25 <plugins>
26
27
28 <plugin>
29 <groupId>org.codehaus.groovy.maven</groupId>
30 <artifactId>gmaven-plugin</artifactId>
31 <executions>
32 <execution>
33 <phase>validate</phase>
34 <goals>
35 <goal>execute</goal>
36 </goals>
37 <configuration>
38 <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source>
39 </configuration>
40 </execution>
41 </executions>
42 </plugin>
43
44
45
46 <plugin>
47 <groupId>org.apache.maven.plugins</groupId>
48 <artifactId>maven-dependency-plugin</artifactId>
49 <version>3.0.0</version>
50 <executions>
51 <execution>
52 <id>get-odl-distribution</id>
53 <phase>validate</phase>
54 <goals>
55 <goal>copy</goal>
56 </goals>
57 <configuration>
58 <artifactItems>
59 <artifactItem>
Timoney, Dan (dt5972)707c6a12019-09-24 16:04:42 -040060 <groupId>${project.groupId}</groupId>
61 <artifactId>odl-neon-karaf</artifactId>
62 <version>${project.version}</version>
Timoney, Dan (dt5972)428403f2019-06-12 14:45:15 +020063 <type>tar.gz</type>
64
65 <overWrite>true</overWrite>
66 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
67 </artifactItem>
68 </artifactItems>
69 <overWriteReleases>false</overWriteReleases>
70 <overWriteSnapshots>true</overWriteSnapshots>
71 <overWriteIfNewer>true</overWriteIfNewer>
72 </configuration>
73 </execution>
74
75 <execution>
76 <id>get-mariadb-connector-jar</id>
77 <phase>validate</phase>
78 <goals>
79 <goal>copy</goal>
80 </goals>
81 <configuration>
82 <artifactItems>
83 <artifactItem>
84 <groupId>org.mariadb.jdbc</groupId>
85 <artifactId>mariadb-java-client</artifactId>
86 <version>${ccsdk.mariadb-connector-java.version}</version>
87 <type>jar</type>
88 <overWrite>true</overWrite>
89 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
90 </artifactItem>
91 </artifactItems>
92 <overWriteReleases>false</overWriteReleases>
93 <overWriteSnapshots>true</overWriteSnapshots>
94 <overWriteIfNewer>true</overWriteIfNewer>
95 </configuration>
96 </execution>
97 </executions>
98 </plugin>
99
100 <plugin>
101 <artifactId>maven-resources-plugin</artifactId>
102 <version>2.6</version>
103 <executions>
104 <execution>
105 <id>copy-dockerfile</id>
106 <goals>
107 <goal>copy-resources</goal>
108 </goals><!-- here the phase you need -->
109 <phase>validate</phase>
110 <configuration>
111 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
112 <resources>
113 <resource>
114 <directory>src/main/docker</directory>
115 <includes>
116 <include>Dockerfile</include>
117 </includes>
118 <filtering>true</filtering>
119 </resource>
120 </resources>
121 </configuration>
122 </execution>
123 </executions>
124 </plugin>
125
126
127
128 </plugins>
129 </build>
130
131 <profiles>
132 <profile>
133 <id>docker</id>
134 <build>
135 <plugins>
136 <plugin>
137 <groupId>io.fabric8</groupId>
138 <artifactId>docker-maven-plugin</artifactId>
139 <version>0.28.0</version>
140 <inherited>false</inherited>
141 <configuration>
142 <images>
143 <image>
144 <name>${image.name}</name>
145 <build>
146 <cleanup>try</cleanup>
147 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
148 <dockerFile>Dockerfile</dockerFile>
149 <tags>
150 <tag>${project.docker.latestminortag.version}</tag>
151 <tag>${project.docker.latestfulltag.version}</tag>
152 <tag>${project.docker.latesttagtimestamp.version}</tag>
153 </tags>
154 </build>
155 </image>
156 </images>
157 </configuration>
158 <executions>
159 <execution>
160 <id>generate-images</id>
161 <phase>package</phase>
162 <goals>
163 <goal>build</goal>
164 </goals>
165 </execution>
166
167 <execution>
168 <id>push-images</id>
169 <phase>${docker.push.phase}</phase>
170 <goals>
171 <goal>build</goal>
172 <goal>push</goal>
173 </goals>
174 </execution>
175 </executions>
176 </plugin>
177
178 </plugins>
179 </build>
180 </profile>
181
182 </profiles>
183</project>