fix odl patches
[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         <odl.ops4j.version>8.0.15</odl.ops4j.version>
25     </properties>
26
27     <build>
28         <plugins>
29
30             <plugin>
31                 <groupId>org.codehaus.gmaven</groupId>
32                 <artifactId>groovy-maven-plugin</artifactId>
33                 <version>2.1.1</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-authn-api</artifactId>
85                                     <version>${odl.shiro.version}</version>
86                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/opendaylight/aaa/aaa-authn-api/${odl.shiro.version}</outputDirectory>
87                                     <destFileName>aaa-authn-api-${odl.shiro.version}.jar</destFileName>
88                                     <excludes>*</excludes>
89                                 </artifactItem>
90                                 <artifactItem>
91                                     <groupId>com.highstreet-technologies.ops4j.pax.web</groupId>
92                                     <artifactId>pax-web-jetty</artifactId>
93                                     <version>${odl.ops4j.version}</version>
94                                     <outputDirectory>${project.build.directory}/docker-stage/system/org/ops4j/pax/web/pax-web-jetty/${odl.ops4j.version}</outputDirectory>
95                                     <destFileName>pax-web-jetty-${odl.ops4j.version}.jar</destFileName>
96                                     <excludes>*</excludes>
97                                 </artifactItem>
98                             </artifactItems>
99                             <overWriteReleases>false</overWriteReleases>
100                             <overWriteSnapshots>true</overWriteSnapshots>
101                             <overWriteIfNewer>true</overWriteIfNewer>
102                         </configuration>
103                     </execution>
104                 </executions>
105             </plugin>
106
107             <plugin>
108                 <artifactId>maven-resources-plugin</artifactId>
109                 <version>2.6</version>
110                 <executions>
111                     <execution>
112                         <id>copy-dockerfile</id>
113                         <goals>
114                             <goal>copy-resources</goal>
115                         </goals><!-- here the phase you need -->
116                         <phase>validate</phase>
117                         <configuration>
118                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
119                             <resources>
120                                 <resource>
121                                     <directory>src/main/docker</directory>
122                                     <includes>
123                                         <include>Dockerfile</include>
124                                     </includes>
125                                     <filtering>true</filtering>
126                                 </resource>
127                                 <resource>
128                                     <directory>src/main/odlscripts</directory>
129                                     <includes>
130                                         <include>*</include>
131                                     </includes>
132                                     <filtering>false</filtering>
133                                 </resource>
134                             </resources>
135                         </configuration>
136                     </execution>
137                 </executions>
138             </plugin>
139
140         </plugins>
141     </build>
142
143     <profiles>
144         <profile>
145             <id>docker</id>
146             <build>
147                 <plugins>
148                     <plugin>
149                         <groupId>io.fabric8</groupId>
150                         <artifactId>docker-maven-plugin</artifactId>
151                         <version>0.34.0</version>
152                         <inherited>false</inherited>
153                         <configuration>
154                             <images>
155                                 <image>
156                                     <name>${image.name}</name>
157                                     <build>
158                                         <cleanup>try</cleanup>
159                                         <noCache>true</noCache>
160                                         <contextDir>${basedir}/target/docker-stage</contextDir>
161                                         <dockerFile>Dockerfile</dockerFile>
162                                         <tags>
163                                             <tag>${project.docker.latestminortag.version}</tag>
164                                             <tag>${project.docker.latestfulltag.version}</tag>
165                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
166                                         </tags>
167                                     </build>
168                                 </image>
169                             </images>
170                             <verbose>${docker.verbose}</verbose>
171                             <skipPush>${docker.skip.push}</skipPush>
172                         </configuration>
173                         <executions>
174                             <execution>
175                                 <id>build-push-images</id>
176                                 <goals>
177                                     <goal>build</goal>
178                                     <goal>push</goal>
179                                 </goals>
180                             </execution>
181                         </executions>
182                     </plugin>
183                 </plugins>
184             </build>
185         </profile>
186     </profiles>
187 </project>