592c9461c2be456b08fbd30bece58a8e60ac87b2
[oam/tr069-adapter.git] / factory / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3 /*\r
4  * ============LICENSE_START========================================================================\r
5  * ONAP : tr-069-adapter\r
6  * =================================================================================================\r
7  * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
8  * =================================================================================================\r
9  * This tr-069-adapter software file is distributed by CommScope Inc\r
10  * under the Apache License, Version 2.0 (the "License");\r
11  * you may not use this file except in compliance with the License.\r
12  * You may obtain a copy of the License at\r
13  *\r
14  * http://www.apache.org/licenses/LICENSE-2.0\r
15  *\r
16  * This file is distributed on an "AS IS" BASIS,\r
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
18  * See the License for the specific language governing permissions and\r
19  * limitations under the License.\r
20  * ===============LICENSE_END=======================================================================\r
21 */\r
22 -->\r
23 <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 https://maven.apache.org/xsd/maven-4.0.0.xsd">\r
24    <modelVersion>4.0.0</modelVersion>\r
25    <parent>\r
26       <groupId>org.commscope.tr069adapter</groupId>\r
27       <artifactId>tr069adapter</artifactId>\r
28       <version>1.0.0</version>\r
29    </parent>\r
30    <groupId>org.commscope.tr069adapter.factory</groupId>\r
31    <artifactId>factory</artifactId>\r
32    <name>factory</name>\r
33    <description>Factory import project for Spring Boot</description>\r
34    <licenses>\r
35       <license>\r
36          <name>The Apache Software License, Version 2.0</name>\r
37          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\r
38       </license>\r
39    </licenses>\r
40    <repositories>\r
41       <repository>\r
42          <id>onap-releases</id>\r
43          <name>onap-releases</name>\r
44          <url>https://nexus.onap.org/content/repositories/releases/</url>\r
45       </repository>\r
46    </repositories>\r
47    <properties>\r
48       <docker.image.name>tr069adapter-acs-factorydb</docker.image.name>\r
49    </properties>\r
50    <dependencies>\r
51       <dependency>\r
52          <groupId>org.springframework.boot</groupId>\r
53          <artifactId>spring-boot-starter-web</artifactId>\r
54          <exclusions>\r
55             <exclusion>\r
56                <groupId>org.springframework.boot</groupId>\r
57                <artifactId>spring-boot-starter-logging</artifactId>\r
58             </exclusion>\r
59          </exclusions>\r
60       </dependency>\r
61       <dependency>\r
62          <groupId>org.springframework.boot</groupId>\r
63          <artifactId>spring-boot-starter-log4j2</artifactId>\r
64       </dependency>\r
65       <dependency>\r
66          <groupId>org.springframework.boot</groupId>\r
67          <artifactId>spring-boot-starter-test</artifactId>\r
68          <scope>test</scope>\r
69       </dependency>\r
70       <dependency>\r
71          <groupId>com.fasterxml.jackson.core</groupId>\r
72          <artifactId>jackson-databind</artifactId>\r
73       </dependency>\r
74       <dependency>\r
75          <groupId>org.commscope.tr069adapter.acs.common</groupId>\r
76          <artifactId>acs-common</artifactId>\r
77          <version>1.0.0</version>\r
78       </dependency>\r
79    </dependencies>\r
80    <build>\r
81       <plugins>\r
82          <plugin>\r
83             <groupId>org.springframework.boot</groupId>\r
84             <artifactId>spring-boot-maven-plugin</artifactId>\r
85          </plugin>\r
86          <plugin>\r
87             <groupId>net.revelc.code.formatter</groupId>\r
88             <artifactId>formatter-maven-plugin</artifactId>\r
89             <version>${formatter-maven-plugin.version}</version>\r
90             <configuration>\r
91                <configFile>${project.parent.basedir}/eclipse-formatter.xml</configFile>\r
92             </configuration>\r
93             <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format\r
94                                         spotless:apply process-sources -->\r
95          </plugin>\r
96          <plugin>\r
97             <groupId>com.diffplug.spotless</groupId>\r
98             <artifactId>spotless-maven-plugin</artifactId>\r
99             <version>${spotless-maven-plugin.version}</version>\r
100             <configuration>\r
101                <java>\r
102                   <removeUnusedImports />\r
103                   <importOrder>\r
104                      <order>com,java,javax,org</order>\r
105                   </importOrder>\r
106                </java>\r
107             </configuration>\r
108             <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use\r
109                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate\r
110                                         source files -->\r
111          </plugin>\r
112          <plugin>\r
113             <groupId>org.apache.maven.plugins</groupId>\r
114             <artifactId>maven-surefire-plugin</artifactId>\r
115             <configuration>\r
116                <skipTests>false</skipTests>\r
117             </configuration>\r
118          </plugin>\r
119          <plugin>\r
120             <artifactId>maven-failsafe-plugin</artifactId>\r
121          </plugin>\r
122          <plugin>\r
123             <groupId>io.fabric8</groupId>\r
124             <artifactId>docker-maven-plugin</artifactId>\r
125             <version>${docker-maven-plugin}</version>\r
126             <inherited>false</inherited>\r
127             <executions>\r
128                <execution>\r
129                   <id>generate-policy-agent-image</id>\r
130                   <phase>package</phase>\r
131                   <goals>\r
132                      <goal>build</goal>\r
133                                          <goal>save</goal>\r
134                   </goals>\r
135                   <configuration>\r
136                      <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>\r
137                      <images>\r
138                         <image>\r
139                            <name>${docker.image.name}:${build.version}</name>\r
140                            <build>\r
141                               <cleanup>try</cleanup>\r
142                               <contextDir>${basedir}</contextDir>\r
143                               <dockerFile>Dockerfile</dockerFile>\r
144                               <args>\r
145                                  <JAR>${project.build.finalName}.jar</JAR>\r
146                               </args>\r
147                               <tags>\r
148                                  <tag>${project.version}</tag>\r
149                               </tags>\r
150                            </build>\r
151                         </image>\r
152                      </images>\r
153                   </configuration>\r
154                </execution>\r
155                <execution>\r
156                   <id>push-policy-agent-image</id>\r
157                   <goals>\r
158                      <goal>build</goal>\r
159                      <goal>push</goal>\r
160                   </goals>\r
161                   <configuration>\r
162                      <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>\r
163                      <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>\r
164                      <images>\r
165                         <image>\r
166                            <name>${docker.image.name}:${project.version}</name>\r
167                            <build>\r
168                               <contextDir>${basedir}</contextDir>\r
169                               <dockerFile>Dockerfile</dockerFile>\r
170                               <args>\r
171                                  <JAR>${project.build.finalName}.jar</JAR>\r
172                               </args>\r
173                               <tags>\r
174                                  <tag>latest</tag>\r
175                               </tags>\r
176                            </build>\r
177                         </image>\r
178                      </images>\r
179                   </configuration>\r
180                </execution>\r
181             </executions>\r
182          </plugin>\r
183          <!-- support sonar in multi-module project -->\r
184          <plugin>\r
185             <groupId>org.sonarsource.scanner.maven</groupId>\r
186             <artifactId>sonar-maven-plugin</artifactId>\r
187             <version>${sonar-maven-plugin.version}</version>\r
188          </plugin>\r
189       </plugins>\r
190    </build>\r
191    <issueManagement>\r
192       <system>JIRA</system>\r
193       <url>https://jira.o-ran-sc.org/</url>\r
194    </issueManagement>\r
195 </project>