9abc7ea647a2986bfe5e374484573aeda5d382a3
[ccsdk/distribution.git] / opendaylight / phosphorus / phosphorus-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-phosphorus</artifactId>
8         <version>1.4.0-SNAPSHOT</version>
9     </parent>
10
11     <artifactId>distribution-odl-phosphorus-docker</artifactId>
12     <packaging>pom</packaging>
13
14     <name>ccsdk-distribution :: opendaylight :: phosphorus :: 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-phosphorus-alpine-image</image.name>
22         <odl.karaf.artifactId>onap-karaf</odl.karaf.artifactId>
23         <odl.shiro.version>0.14.7</odl.shiro.version>
24         <odl.netconf.version>2.0.11</odl.netconf.version>
25         <odl.ops4j.version>7.3.19</odl.ops4j.version>
26         <odl.pax.logging.version>2.0.10</odl.pax.logging.version>
27         <patch.pax.logging.version>2.0.14</patch.pax.logging.version>
28         <odl.karaf.framework.version>4.3.3</odl.karaf.framework.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>sal-netconf-connector</artifactId>
105                                     <version>${odl.netconf.version}</version>
106                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/netconf/sal-netconf-connector/${odl.netconf.version}</outputDirectory>
107                                     <destFileName>sal-netconf-connector-${odl.netconf.version}.jar</destFileName>
108                                     <excludes>*</excludes>
109                                 </artifactItem>
110                                 <artifactItem>
111                                     <groupId>org.ops4j.pax.logging</groupId>
112                                     <artifactId>pax-logging-log4j2</artifactId>
113                                     <version>${patch.pax.logging.version}</version>
114                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-log4j2/${patch.pax.logging.version}</outputDirectory>
115                                     <destFileName>pax-logging-log4j2-${patch.pax.logging.version}.jar</destFileName>
116                                     <excludes>*</excludes>
117                                 </artifactItem>
118                                 <artifactItem>
119                                     <groupId>org.ops4j.pax.logging</groupId>
120                                     <artifactId>pax-logging-logback</artifactId>
121                                     <version>${patch.pax.logging.version}</version>
122                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-logback/${patch.pax.logging.version}</outputDirectory>
123                                     <destFileName>pax-logging-logback-${patch.pax.logging.version}.jar</destFileName>
124                                     <excludes>*</excludes>
125                                 </artifactItem>
126                                 <artifactItem>
127                                     <groupId>org.ops4j.pax.logging</groupId>
128                                     <artifactId>pax-logging-api</artifactId>
129                                     <version>${patch.pax.logging.version}</version>
130                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/logging/pax-logging-api/${patch.pax.logging.version}</outputDirectory>
131                                     <destFileName>pax-logging-api-${patch.pax.logging.version}.jar</destFileName>
132                                     <excludes>*</excludes>
133                                 </artifactItem>
134                             </artifactItems>
135                             <overWriteReleases>false</overWriteReleases>
136                             <overWriteSnapshots>true</overWriteSnapshots>
137                             <overWriteIfNewer>true</overWriteIfNewer>
138                         </configuration>
139                     </execution>
140                 </executions>
141             </plugin>
142
143             <plugin>
144                 <artifactId>maven-resources-plugin</artifactId>
145                 <version>2.6</version>
146                 <executions>
147                     <execution>
148                         <id>copy-dockerfile</id>
149                         <goals>
150                             <goal>copy-resources</goal>
151                         </goals><!-- here the phase you need -->
152                         <phase>validate</phase>
153                         <configuration>
154                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
155                             <resources>
156                                 <resource>
157                                     <directory>src/main/docker</directory>
158                                     <includes>
159                                         <include>Dockerfile</include>
160                                     </includes>
161                                     <filtering>true</filtering>
162                                 </resource>
163                                 <resource>
164                                     <directory>src/main/odlscripts</directory>
165                                     <includes>
166                                         <include>*</include>
167                                     </includes>
168                                     <filtering>false</filtering>
169                                 </resource>
170                             </resources>
171                         </configuration>
172                     </execution>
173                     <execution>
174                         <id>copy-karaf-framework-features</id>
175                         <goals>
176                             <goal>copy-resources</goal>
177                         </goals><!-- here the phase you need -->
178                         <phase>validate</phase>
179                         <configuration>
180                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
181                             <resources>
182                                 <resource>
183                                     <directory>src/main/resources</directory>
184                                     <includes>
185                                         <include>framework-${odl.karaf.framework.version}-features.xml</include>
186                                         <include>startup.properties</include>
187                                     </includes>
188                                     <filtering>true</filtering>
189                                 </resource>
190                             </resources>
191                         </configuration>
192                     </execution>
193                 </executions>
194             </plugin>
195
196         </plugins>
197     </build>
198
199     <profiles>
200         <profile>
201             <id>docker</id>
202             <build>
203                 <plugins>
204                     <plugin>
205                         <groupId>io.fabric8</groupId>
206                         <artifactId>docker-maven-plugin</artifactId>
207                         <version>0.34.0</version>
208                         <inherited>false</inherited>
209                         <configuration>
210                             <images>
211                                 <image>
212                                     <name>${image.name}</name>
213                                     <build>
214                                         <cleanup>try</cleanup>
215                                         <noCache>true</noCache>
216                                         <contextDir>${basedir}/target/docker-stage</contextDir>
217                                         <dockerFile>Dockerfile</dockerFile>
218                                         <tags>
219                                             <tag>${project.docker.latestminortag.version}</tag>
220                                             <tag>${project.docker.latestfulltag.version}</tag>
221                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
222                                         </tags>
223                                     </build>
224                                 </image>
225                             </images>
226                             <verbose>${docker.verbose}</verbose>
227                             <skipPush>${docker.skip.push}</skipPush>
228                         </configuration>
229                         <executions>
230                             <execution>
231                                 <id>build-push-images</id>
232                                 <goals>
233                                     <goal>build</goal>
234                                     <goal>push</goal>
235                                 </goals>
236                             </execution>
237                         </executions>
238                     </plugin>
239                 </plugins>
240             </build>
241         </profile>
242     </profiles>
243 </project>