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