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