7b85371ec4e22fc4d1067957e20123fe6dd6bb6a
[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.3.1-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.netconf.version>1.13.4</odl.netconf.version>
26     </properties>
27
28     <build>
29         <plugins>
30
31             <plugin>
32                 <groupId>org.codehaus.groovy.maven</groupId>
33                 <artifactId>gmaven-plugin</artifactId>
34                 <version>1.0</version>
35                 <executions>
36                     <execution>
37                         <phase>validate</phase>
38                         <goals>
39                             <goal>execute</goal>
40                         </goals>
41                         <configuration>
42                             <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source>
43                         </configuration>
44                     </execution>
45                 </executions>
46             </plugin>
47
48             <plugin>
49                 <groupId>org.apache.maven.plugins</groupId>
50                 <artifactId>maven-dependency-plugin</artifactId>
51                 <version>3.0.0</version>
52                 <executions>
53                     <execution>
54                         <id>get-odl-distribution</id>
55                         <phase>validate</phase>
56                         <goals>
57                             <goal>copy</goal>
58                         </goals>
59                         <configuration>
60                             <artifactItems>
61                                 <artifactItem>
62                                     <groupId>org.opendaylight.integration</groupId>
63                                     <artifactId>${odl.karaf.artifactId}</artifactId>
64                                     <version>${ccsdk.opendaylight.version}</version>
65                                     <type>tar.gz</type>
66                                     <overWrite>true</overWrite>
67                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
68                                 </artifactItem>
69                             </artifactItems>
70                             <overWriteReleases>false</overWriteReleases>
71                             <overWriteSnapshots>true</overWriteSnapshots>
72                             <overWriteIfNewer>true</overWriteIfNewer>
73                         </configuration>
74                     </execution>
75                     <execution>
76                         <id>copy-with-alternalte-repo-2</id>
77                         <phase>generate-sources</phase>
78                         <goals>
79                             <goal>copy</goal>
80                         </goals>
81                         <configuration>
82                             <artifactItems>
83                                 <artifactItem>
84                                     <groupId>com.highstreet-technologies.aaa</groupId>
85                                     <artifactId>aaa-authn-api</artifactId>
86                                     <version>${odl.shiro.version}</version>
87                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/aaa/aaa-authn-api/${odl.shiro.version}</outputDirectory>
88                                     <destFileName>aaa-authn-api-${odl.shiro.version}.jar</destFileName>
89                                     <excludes>*</excludes>
90                                 </artifactItem>
91                                 <artifactItem>
92                                     <groupId>com.highstreet-technologies.ops4j.pax.web</groupId>
93                                     <artifactId>pax-web-jetty</artifactId>
94                                     <version>${odl.ops4j.version}</version>
95                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/web/pax-web-jetty/${odl.ops4j.version}</outputDirectory>
96                                     <destFileName>pax-web-jetty-${odl.ops4j.version}.jar</destFileName>
97                                     <excludes>*</excludes>
98                                 </artifactItem>
99                                 <artifactItem>
100                                     <groupId>com.highstreet-technologies.netconf</groupId>
101                                     <artifactId>netconf-util</artifactId>
102                                     <version>${odl.netconf.version}</version>
103                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/netconf/netconf-util/${odl.netconf.version}</outputDirectory>
104                                     <destFileName>netconf-util-${odl.netconf.version}.jar</destFileName>
105                                     <excludes>*</excludes>
106                                 </artifactItem>
107                                 <artifactItem>
108                                     <groupId>com.highstreet-technologies.netconf</groupId>
109                                     <artifactId>sal-netconf-connector</artifactId>
110                                     <version>${odl.netconf.version}</version>
111                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/netconf/sal-netconf-connector/${odl.netconf.version}</outputDirectory>
112                                     <destFileName>sal-netconf-connector-${odl.netconf.version}.jar</destFileName>
113                                     <excludes>*</excludes>
114                                 </artifactItem>
115                             </artifactItems>
116                             <overWriteReleases>false</overWriteReleases>
117                             <overWriteSnapshots>true</overWriteSnapshots>
118                             <overWriteIfNewer>true</overWriteIfNewer>
119                         </configuration>
120                     </execution>
121                 </executions>
122             </plugin>
123
124             <plugin>
125                 <artifactId>maven-resources-plugin</artifactId>
126                 <version>2.6</version>
127                 <executions>
128                     <execution>
129                         <id>copy-dockerfile</id>
130                         <goals>
131                             <goal>copy-resources</goal>
132                         </goals><!-- here the phase you need -->
133                         <phase>validate</phase>
134                         <configuration>
135                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
136                             <resources>
137                                 <resource>
138                                     <directory>src/main/docker</directory>
139                                     <includes>
140                                         <include>Dockerfile</include>
141                                     </includes>
142                                     <filtering>true</filtering>
143                                 </resource>
144                                 <resource>
145                                     <directory>src/main/odlscripts</directory>
146                                     <includes>
147                                         <include>*</include>
148                                     </includes>
149                                     <filtering>false</filtering>
150                                 </resource>
151                             </resources>
152                         </configuration>
153                     </execution>
154                 </executions>
155             </plugin>
156
157         </plugins>
158     </build>
159
160     <profiles>
161         <profile>
162             <id>docker</id>
163             <build>
164                 <plugins>
165                     <plugin>
166                         <groupId>io.fabric8</groupId>
167                         <artifactId>docker-maven-plugin</artifactId>
168                         <version>0.34.0</version>
169                         <inherited>false</inherited>
170                         <configuration>
171                             <images>
172                                 <image>
173                                     <name>${image.name}</name>
174                                     <build>
175                                         <cleanup>try</cleanup>
176                                         <noCache>true</noCache>
177                                         <contextDir>${basedir}/target/docker-stage</contextDir>
178                                         <dockerFile>Dockerfile</dockerFile>
179                                         <tags>
180                                             <tag>${project.docker.latestminortag.version}</tag>
181                                             <tag>${project.docker.latestfulltag.version}</tag>
182                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
183                                         </tags>
184                                     </build>
185                                 </image>
186                             </images>
187                             <verbose>${docker.verbose}</verbose>
188                             <skipPush>${docker.skip.push}</skipPush>
189                         </configuration>
190                         <executions>
191                             <execution>
192                                 <id>build-push-images</id>
193                                 <goals>
194                                     <goal>build</goal>
195                                     <goal>push</goal>
196                                 </goals>
197                             </execution>
198                         </executions>
199                     </plugin>
200                 </plugins>
201             </build>
202         </profile>
203     </profiles>
204 </project>