fix odl patches
[ccsdk/distribution.git] / ansible-server / 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-root</artifactId>
8         <version>1.6.1-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.ccsdk.distribution</groupId>
12     <artifactId>ansible-server</artifactId>
13     <version>1.6.1-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>ccsdk-distribution :: ${project.artifactId}</name>
17     <description>Creates ansible-server Docker container</description>
18     <organization>
19         <name>ONAP</name>
20     </organization>
21
22     <properties>
23         <image.name>onap/ccsdk-ansible-server-image</image.name>
24                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
25                 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
26                 <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
27                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
28         <docker.verbose>true</docker.verbose>
29         <docker.skip.push>false</docker.skip.push>
30     </properties>
31
32     <build>
33         <plugins>
34             <plugin>
35                 <groupId>org.codehaus.gmaven</groupId>
36                 <artifactId>groovy-maven-plugin</artifactId>
37                 <version>2.1.1</version>
38                 <executions>
39                     <execution>
40                         <phase>validate</phase>
41                         <goals>
42                             <goal>execute</goal>
43                         </goals>
44                         <configuration>
45                             <source>${basedir}/../src/main/scripts/TagVersion.groovy</source>
46                         </configuration>
47                     </execution>
48                 </executions>
49             </plugin>
50
51             <plugin>
52                 <artifactId>maven-resources-plugin</artifactId>
53                 <version>2.6</version>
54                 <executions>
55                     <execution>
56                         <id>copy-dockerfile</id>
57                         <goals>
58                             <goal>copy-resources</goal>
59                         </goals><!-- here the phase you need -->
60                         <phase>validate</phase>
61                         <configuration>
62                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
63                             <resources>
64                                 <resource>
65                                     <directory>src/main</directory>
66                                     <includes>
67                                         <include>**/*</include>
68                                     </includes>
69                                     <filtering>false</filtering>
70                                 </resource>
71                             </resources>
72                         </configuration>
73                     </execution>
74                     <execution>
75                         <id>copy-certificates</id>
76                         <goals>
77                             <goal>copy-resources</goal>
78                         </goals><!-- here the phase you need -->
79                         <phase>validate</phase>
80                         <configuration>
81                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
82                             <resources>
83                                 <resource>
84                                     <directory>src/main/resources</directory>
85                                     <includes>
86                                         <include>*.pem</include>
87                                         <include>*.md</include>
88                                     </includes>
89                                     <filtering>false</filtering>
90                                 </resource>
91                             </resources>
92                         </configuration>
93                     </execution>
94                 </executions>
95             </plugin>
96             <plugin>
97                 <groupId>org.apache.maven.plugins</groupId>
98                 <artifactId>maven-antrun-plugin</artifactId>
99                 <version>1.8</version>
100                 <executions>
101                     <execution>
102                         <id>change-permissions</id>
103                         <phase>process-sources</phase>
104                         <configuration>
105                             <target>
106                                 <chmod perm="+x" type="file">
107                                     <fileset dir="${basedir}/target/docker-stage/ansible-server">
108                                         <include name="**/*.py"/>
109                                         <include name="**/*.sh"/>
110                                     </fileset>
111                                 </chmod>
112                             </target>
113                         </configuration>
114                         <goals>
115                             <goal>run</goal>
116                         </goals>
117                     </execution>
118                 </executions>
119             </plugin>
120         </plugins>
121     </build>
122
123     <profiles>
124         <profile>
125             <id>docker</id>
126             <build>
127                 <plugins>
128                     <plugin>
129                         <groupId>io.fabric8</groupId>
130                         <artifactId>docker-maven-plugin</artifactId>
131                         <version>0.34.0</version>
132                         <inherited>false</inherited>
133                         <configuration>
134                             <images>
135                                 <image>
136                                     <name>${image.name}</name>
137                                     <build>
138                                         <cleanup>try</cleanup>
139                                         <noCache>true</noCache>
140                                         <contextDir>${basedir}/target/docker-stage</contextDir>
141                                         <dockerFile>Dockerfile</dockerFile>
142                                         <tags>
143                                             <tag>${project.docker.latestminortag.version}</tag>
144                                             <tag>${project.docker.latestfulltag.version}</tag>
145                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
146                                         </tags>
147                                     </build>
148                                 </image>
149                             </images>
150                             <verbose>${docker.verbose}</verbose>
151                             <skipPush>${docker.skip.push}</skipPush>
152                         </configuration>
153                         <executions>
154                             <execution>
155                                 <id>build-push-images</id>
156                                 <goals>
157                                     <goal>build</goal>
158                                     <goal>push</goal>
159                                 </goals>
160                             </execution>
161                         </executions>
162                     </plugin>
163                 </plugins>
164             </build>
165         </profile>
166     </profiles>
167 </project>