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