blob: 589184c8a178b8fba4fee3ab32d9e42f7c2ab2f6 [file] [log] [blame]
Dan Timoneyf5937352018-02-08 15:20:51 -05001<?xml version="1.0" encoding="UTF-8"?>
Dan Timoney912f98b2018-02-27 14:10:22 -05002<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>
Dan Timoneyf5937352018-02-08 15:20:51 -05004
5 <parent>
6 <groupId>org.onap.ccsdk.distribution</groupId>
7 <artifactId>distribution-opendaylight</artifactId>
Timoney, Dan (dt5972)42862be2018-06-06 14:15:41 -04008 <version>0.3.0-SNAPSHOT</version>
Dan Timoneyf5937352018-02-08 15:20:51 -05009 </parent>
10
Dan Timoneyf5937352018-02-08 15:20:51 -050011 <artifactId>distribution-odl-nitrogen</artifactId>
Timoney, Dan (dt5972)42862be2018-06-06 14:15:41 -040012 <version>0.3.0-SNAPSHOT</version>
Dan Timoney912f98b2018-02-27 14:10:22 -050013 <packaging>pom</packaging>
Dan Timoneyf5937352018-02-08 15:20:51 -050014
Dan Timoney912f98b2018-02-27 14:10:22 -050015 <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
Dan Timoneyf5937352018-02-08 15:20:51 -050016 <description>Creates OpenDaylight container</description>
Dan Timoney912f98b2018-02-27 14:10:22 -050017 <organization>
18 <name>ONAP</name>
19 </organization>
Dan Timoneyf5937352018-02-08 15:20:51 -050020
21 <properties>
Timoney, Dan (dt5972)6f0c0102018-06-18 23:01:08 -040022 <image.name>onap/ccsdk-odl-nitrogen-image</image.name>
Dan Timoneyf5937352018-02-08 15:20:51 -050023 <ccsdk.project.version>${project.version}</ccsdk.project.version>
24 <ccsdk.opendaylight.version>0.7.1</ccsdk.opendaylight.version>
25 <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
26 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
27 </properties>
28
29 <dependencyManagement>
30 <dependencies>
31 <dependency>
32 <groupId>org.opendaylight.integration</groupId>
33 <artifactId>karaf</artifactId>
34 <version>${ccsdk.opendaylight.version}</version>
35 <type>tar.gz</type>
36 </dependency>
37 <dependency>
38 <groupId>org.mariadb.jdbc</groupId>
39 <artifactId>mariadb-java-client</artifactId>
40 <version>${ccsdk.mariadb-connector-java.version}</version>
41 <type>jar</type>
42 </dependency>
43 </dependencies>
44 </dependencyManagement>
45
46 <build>
47 <plugins>
48
49
50 <plugin>
51 <groupId>org.codehaus.groovy.maven</groupId>
52 <artifactId>gmaven-plugin</artifactId>
53 <executions>
54 <execution>
55 <phase>validate</phase>
56 <goals>
57 <goal>execute</goal>
58 </goals>
59 <configuration>
60 <source>
61 println project.properties['ccsdk.project.version'];
62 def versionArray;
63 if (project.properties['ccsdk.project.version'] != null ) {
64 versionArray = project.properties['ccsdk.project.version'].split('\\.');
65 }
66
67 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
68 {
69 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
70 } else {
71 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
72 }
73
74 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
75 </source>
76 </configuration>
77 </execution>
78 </executions>
79 </plugin>
80
81
82
83 <plugin>
84 <groupId>org.apache.maven.plugins</groupId>
85 <artifactId>maven-dependency-plugin</artifactId>
86 <version>3.0.0</version>
87 <executions>
88 <execution>
89 <id>get-odl-distribution</id>
90 <phase>validate</phase>
91 <goals>
92 <goal>copy</goal>
93 </goals>
94 <configuration>
95 <artifactItems>
96 <artifactItem>
97 <groupId>org.opendaylight.integration</groupId>
98 <artifactId>karaf</artifactId>
99 <version>${ccsdk.opendaylight.version}</version>
100 <type>tar.gz</type>
101
102 <overWrite>true</overWrite>
103 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
104 </artifactItem>
105 </artifactItems>
106 <overWriteReleases>false</overWriteReleases>
107 <overWriteSnapshots>true</overWriteSnapshots>
108 <overWriteIfNewer>true</overWriteIfNewer>
109 </configuration>
110 </execution>
111
112 <execution>
113 <id>get-mariadb-connector-jar</id>
114 <phase>validate</phase>
115 <goals>
116 <goal>copy</goal>
117 </goals>
118 <configuration>
119 <artifactItems>
120 <artifactItem>
121 <groupId>org.mariadb.jdbc</groupId>
122 <artifactId>mariadb-java-client</artifactId>
123 <version>${ccsdk.mariadb-connector-java.version}</version>
124 <type>jar</type>
125 <overWrite>true</overWrite>
126 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
127 </artifactItem>
128 </artifactItems>
129 <overWriteReleases>false</overWriteReleases>
130 <overWriteSnapshots>true</overWriteSnapshots>
131 <overWriteIfNewer>true</overWriteIfNewer>
132 </configuration>
133 </execution>
134 </executions>
135 </plugin>
136
137 <plugin>
138 <artifactId>maven-resources-plugin</artifactId>
139 <version>2.6</version>
140 <executions>
141 <execution>
142 <id>copy-dockerfile</id>
143 <goals>
144 <goal>copy-resources</goal>
145 </goals><!-- here the phase you need -->
146 <phase>validate</phase>
147 <configuration>
148 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
149 <resources>
150 <resource>
151 <directory>src/main/docker</directory>
152 <includes>
153 <include>Dockerfile</include>
154 </includes>
155 <filtering>true</filtering>
156 </resource>
157 </resources>
158 </configuration>
159 </execution>
160 </executions>
161 </plugin>
162
163
164
165 </plugins>
Dan Timoneyf5937352018-02-08 15:20:51 -0500166 </build>
167
168 <profiles>
169 <profile>
170 <id>docker</id>
171 <build>
172 <plugins>
173 <plugin>
174 <groupId>io.fabric8</groupId>
175 <artifactId>docker-maven-plugin</artifactId>
176 <version>0.16.5</version>
177 <inherited>false</inherited>
178 <configuration>
179 <images>
180 <image>
181 <name>${image.name}</name>
182 <build>
183 <cleanup>try</cleanup>
184 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
185 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
186 <tags>
187 <tag>${project.version}</tag>
188 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
189 <tag>${project.docker.latesttag.version}</tag>
190 </tags>
191 </build>
192 </image>
193 </images>
194 </configuration>
195 <executions>
196 <execution>
197 <id>generate-images</id>
198 <phase>package</phase>
199 <goals>
200 <goal>build</goal>
201 </goals>
202 </execution>
203
204 <execution>
205 <id>push-images</id>
206 <phase>deploy</phase>
207 <goals>
208 <goal>build</goal>
209 <goal>push</goal>
210 </goals>
211 </execution>
212 </executions>
213 </plugin>
214
215 </plugins>
216 </build>
217 </profile>
218
219 </profiles>
Dan Timoneyf5937352018-02-08 15:20:51 -0500220</project>