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