a353ca9fd27c411d654c4b60ee87e5d6c649631f
[ccsdk/distribution.git] / opendaylight / silicon / silicon-alpine / pom.xml
1 <?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-silicon</artifactId>
8         <version>1.4.0-SNAPSHOT</version>
9     </parent>
10
11     <artifactId>distribution-odl-silicon-docker</artifactId>
12     <packaging>pom</packaging>
13
14     <name>ccsdk-distribution :: opendaylight :: silicon :: docker</name>
15     <description>Creates OpenDaylight container</description>
16     <organization>
17         <name>ONAP</name>
18     </organization>
19
20     <properties>
21         <image.name>onap/ccsdk-odl-silicon-alpine-image</image.name>
22         <odl.karaf.artifactId>onap-karaf</odl.karaf.artifactId>
23         <odl.shiro.version>0.13.5</odl.shiro.version>
24         <odl.ops4j.version>7.3.16</odl.ops4j.version>
25         <odl.pax.logging.version>2.0.9</odl.pax.logging.version>
26         <patch.pax.logging.version>2.0.14</patch.pax.logging.version>
27         <odl.karaf.framework.version>4.3.2</odl.karaf.framework.version>
28         <odl.netconf.version>1.13.4</odl.netconf.version>
29     </properties>
30
31     <build>
32         <plugins>
33
34             <plugin>
35                 <groupId>org.codehaus.groovy.maven</groupId>
36                 <artifactId>gmaven-plugin</artifactId>
37                 <version>1.0</version>
38                 <executions>
39                     <execution>
40                         <phase>validate</phase>
41                         <goals>
42                             <goal>execute</goal>
43                         </goals>
44                         <configuration>
45                             <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source>
46                         </configuration>
47                     </execution>
48                 </executions>
49             </plugin>
50
51             <plugin>
52                 <groupId>org.apache.maven.plugins</groupId>
53                 <artifactId>maven-dependency-plugin</artifactId>
54                 <version>3.0.0</version>
55                 <executions>
56                     <execution>
57                         <id>get-odl-distribution</id>
58                         <phase>validate</phase>
59                         <goals>
60                             <goal>copy</goal>
61                         </goals>
62                         <configuration>
63                             <artifactItems>
64                                 <artifactItem>
65                                     <groupId>org.opendaylight.integration</groupId>
66                                     <artifactId>${odl.karaf.artifactId}</artifactId>
67                                     <version>${ccsdk.opendaylight.version}</version>
68                                     <type>tar.gz</type>
69                                     <overWrite>true</overWrite>
70                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
71                                 </artifactItem>
72                             </artifactItems>
73                             <overWriteReleases>false</overWriteReleases>
74                             <overWriteSnapshots>true</overWriteSnapshots>
75                             <overWriteIfNewer>true</overWriteIfNewer>
76                         </configuration>
77                     </execution>
78                     <execution>
79                         <id>copy-with-alternalte-repo-2</id>
80                         <phase>generate-sources</phase>
81                         <goals>
82                             <goal>copy</goal>
83                         </goals>
84                         <configuration>
85                             <artifactItems>
86                                 <artifactItem>
87                                     <groupId>com.highstreet-technologies.aaa</groupId>
88                                     <artifactId>aaa-authn-api</artifactId>
89                                     <version>${odl.shiro.version}</version>
90                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/aaa/aaa-authn-api/${odl.shiro.version}</outputDirectory>
91                                     <destFileName>aaa-authn-api-${odl.shiro.version}.jar</destFileName>
92                                     <excludes>*</excludes>
93                                 </artifactItem>
94                                 <artifactItem>
95                                     <groupId>com.highstreet-technologies.ops4j.pax.web</groupId>
96                                     <artifactId>pax-web-jetty</artifactId>
97                                     <version>${odl.ops4j.version}</version>
98                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/web/pax-web-jetty/${odl.ops4j.version}</outputDirectory>
99                                     <destFileName>pax-web-jetty-${odl.ops4j.version}.jar</destFileName>
100                                     <excludes>*</excludes>
101                                 </artifactItem>
102                                 <artifactItem>
103                                     <groupId>com.highstreet-technologies.netconf</groupId>
104                                     <artifactId>netconf-util</artifactId>
105                                     <version>${odl.netconf.version}</version>
106                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/netconf/netconf-util/${odl.netconf.version}</outputDirectory>
107                                     <destFileName>netconf-util-${odl.netconf.version}.jar</destFileName>
108                                     <excludes>*</excludes>
109                                 </artifactItem>
110                                 <artifactItem>
111                                     <groupId>com.highstreet-technologies.netconf</groupId>
112                                     <artifactId>sal-netconf-connector</artifactId>
113                                     <version>${odl.netconf.version}</version>
114                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/netconf/sal-netconf-connector/${odl.netconf.version}</outputDirectory>
115                                     <destFileName>sal-netconf-connector-${odl.netconf.version}.jar</destFileName>
116                                     <excludes>*</excludes>
117                                 </artifactItem>
118                                 <artifactItem>
119                                     <groupId>org.ops4j.pax.logging</groupId>
120                                     <artifactId>pax-logging-log4j2</artifactId>
121                                     <version>${patch.pax.logging.version}</version>
122                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-log4j2/${patch.pax.logging.version}</outputDirectory>
123                                     <destFileName>pax-logging-log4j2-${patch.pax.logging.version}.jar</destFileName>
124                                     <excludes>*</excludes>
125                                 </artifactItem>
126                                 <artifactItem>
127                                     <groupId>org.ops4j.pax.logging</groupId>
128                                     <artifactId>pax-logging-logback</artifactId>
129                                     <version>${patch.pax.logging.version}</version>
130                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-logback/${patch.pax.logging.version}</outputDirectory>
131                                     <destFileName>pax-logging-logback-${patch.pax.logging.version}.jar</destFileName>
132                                     <excludes>*</excludes>
133                                 </artifactItem>
134                                 <artifactItem>
135                                     <groupId>org.ops4j.pax.logging</groupId>
136                                     <artifactId>pax-logging-api</artifactId>
137                                     <version>${patch.pax.logging.version}</version>
138                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-api/${patch.pax.logging.version}</outputDirectory>
139                                     <destFileName>pax-logging-api-${patch.pax.logging.version}.jar</destFileName>
140                                     <excludes>*</excludes>
141                                 </artifactItem>
142                             </artifactItems>
143                             <overWriteReleases>false</overWriteReleases>
144                             <overWriteSnapshots>true</overWriteSnapshots>
145                             <overWriteIfNewer>true</overWriteIfNewer>
146                         </configuration>
147                     </execution>
148                 </executions>
149             </plugin>
150
151             <plugin>
152                 <artifactId>maven-resources-plugin</artifactId>
153                 <version>2.6</version>
154                 <executions>
155                     <execution>
156                         <id>copy-dockerfile</id>
157                         <goals>
158                             <goal>copy-resources</goal>
159                         </goals><!-- here the phase you need -->
160                         <phase>validate</phase>
161                         <configuration>
162                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
163                             <resources>
164                                 <resource>
165                                     <directory>src/main/docker</directory>
166                                     <includes>
167                                         <include>Dockerfile</include>
168                                     </includes>
169                                     <filtering>true</filtering>
170                                 </resource>
171                                 <resource>
172                                     <directory>src/main/odlscripts</directory>
173                                     <includes>
174                                         <include>*</include>
175                                     </includes>
176                                     <filtering>false</filtering>
177                                 </resource>
178                             </resources>
179                         </configuration>
180                     </execution>
181                     <execution>
182                         <id>copy-karaf-framework-features</id>
183                         <goals>
184                             <goal>copy-resources</goal>
185                         </goals><!-- here the phase you need -->
186                         <phase>validate</phase>
187                         <configuration>
188                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
189                             <resources>
190                                 <resource>
191                                     <directory>src/main/resources</directory>
192                                     <includes>
193                                         <include>framework-${odl.karaf.framework.version}-features.xml</include>
194                                         <include>startup.properties</include>
195                                     </includes>
196                                     <filtering>true</filtering>
197                                 </resource>
198                             </resources>
199                         </configuration>
200                     </execution>
201                 </executions>
202             </plugin>
203
204         </plugins>
205     </build>
206
207     <profiles>
208         <profile>
209             <id>docker</id>
210             <build>
211                 <plugins>
212                     <plugin>
213                         <groupId>io.fabric8</groupId>
214                         <artifactId>docker-maven-plugin</artifactId>
215                         <version>0.34.0</version>
216                         <inherited>false</inherited>
217                         <configuration>
218                             <images>
219                                 <image>
220                                     <name>${image.name}</name>
221                                     <build>
222                                         <cleanup>try</cleanup>
223                                         <noCache>true</noCache>
224                                         <contextDir>${basedir}/target/docker-stage</contextDir>
225                                         <dockerFile>Dockerfile</dockerFile>
226                                         <tags>
227                                             <tag>${project.docker.latestminortag.version}</tag>
228                                             <tag>${project.docker.latestfulltag.version}</tag>
229                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
230                                         </tags>
231                                     </build>
232                                 </image>
233                             </images>
234                             <verbose>${docker.verbose}</verbose>
235                             <skipPush>${docker.skip.push}</skipPush>
236                         </configuration>
237                         <executions>
238                             <execution>
239                                 <id>build-push-images</id>
240                                 <goals>
241                                     <goal>build</goal>
242                                     <goal>push</goal>
243                                 </goals>
244                             </execution>
245                         </executions>
246                     </plugin>
247                 </plugins>
248             </build>
249         </profile>
250     </profiles>
251 </project>