blob: 78f8237262bc7e5df76c5b1a0b11baea5cd2977b [file] [log] [blame]
Gary Wu7f1c1522017-06-21 15:03:17 -07001<?xml version="1.0" encoding="UTF-8"?>
2<!--
Gary Wu87895562018-09-11 14:28:49 -07003 Copyright (c) 2016-2018 Huawei Technologies Co., Ltd.
Brian Freemanbedb4842019-11-01 08:48:01 -05004 Modifications copyright (C) 2017-2019 AT&T Intellectual Property
puthuparambil.aditya563d6362020-07-01 12:49:11 +01005 Modifications Copyright (C) 2020 Bell Canada.
Gary Wu7f1c1522017-06-21 15:03:17 -07006
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18-->
19<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">
20 <modelVersion>4.0.0</modelVersion>
Gary Wu7f1c1522017-06-21 15:03:17 -070021 <name>oparent</name>
Gary Wu2a78a372017-08-21 14:03:14 -070022 <groupId>org.onap.oparent</groupId>
23 <artifactId>version</artifactId>
Pamela Dragoshc6044f62021-01-26 07:55:09 -050024 <version>3.2.1-SNAPSHOT</version>
Gary Wu7f1c1522017-06-21 15:03:17 -070025 <packaging>pom</packaging>
Gary Wu7f1c1522017-06-21 15:03:17 -070026 <modules>
27 <!-- oparent tools -->
Gary Wu7f1c1522017-06-21 15:03:17 -070028 <module>checkstyle</module>
29 <module>license</module>
Gary Wu2a78a372017-08-21 14:03:14 -070030 <module>oparent</module>
DR695Heb3dd602017-09-08 15:20:22 -040031 <module>oparent-python</module>
Pamela Dragosh3d0fef42018-08-23 13:38:15 -040032 <module>dependencies</module>
33 <module>dependencies-clm</module>
Gary Wu7f1c1522017-06-21 15:03:17 -070034 </modules>
Gary Wu2a78a372017-08-21 14:03:14 -070035 <properties>
Gary Wu2a78a372017-08-21 14:03:14 -070036 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Gary Wuff1f3422017-08-23 13:24:41 -070038 <!-- sitePath may be overridden in the inheriting POM if desired -->
39 <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
Brian Freemanfcd164a2019-11-07 15:56:25 -050040 <maven.compiler.release>11</maven.compiler.release>
Pamela Dragosh81f6ddb2020-01-09 20:21:59 -050041 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
42
Brian Freemanfcd164a2019-11-07 15:56:25 -050043 <!--
44 In the java 8 version of oparent there were two variables defined for 1.8 source and target. These are no longer
45 applicable in Java 11 but you may be referencing them in your child poms so review and update as appropriate.
46 <maven.compiler.source>1.8</maven.compiler.source>
47 <maven.compiler.target>1.8</maven.compiler.target>
48 -->
Gary Wu87895562018-09-11 14:28:49 -070049 <!--
50 The following properties should be defined in your own ~/.m2/settings.xml based on your own build infastructure setup.
51 See the settings.xml in this directory for default settings based on the Linux Foundation ONAP infrastructure.
52
53 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
Lusheng Jicbb90272017-09-01 17:43:02 +000054 <onap.nexus.rawrepo.baseurl.upload>https://nexus.onap.org/content/sites/raw</onap.nexus.rawrepo.baseurl.upload>
Gary Wu87895562018-09-11 14:28:49 -070055 <onap.nexus.rawrepo.baseurl.download>https://nexus.onap.org/service/local/repositories/raw/content</onap.nexus.rawrepo.baseurl.download>
Lusheng Jicbb90272017-09-01 17:43:02 +000056 <onap.nexus.rawrepo.serverid>ecomp-raw</onap.nexus.rawrepo.serverid>
Lusheng Jicbb90272017-09-01 17:43:02 +000057 <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
58 <onap.nexus.dockerregistry.release>nexus3.onap.org:10002</onap.nexus.dockerregistry.release>
Gary Wu87895562018-09-11 14:28:49 -070059 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
60 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
61 -->
Gary Wu7f1c1522017-06-21 15:03:17 -070062 </properties>
Gary Wu2a78a372017-08-21 14:03:14 -070063 <distributionManagement>
64 <repository>
Gary Wudcfc3442017-10-11 12:58:43 -070065 <id>ecomp-releases</id>
Gary Wu2a78a372017-08-21 14:03:14 -070066 <url>${onap.nexus.url}/content/repositories/releases</url>
67 </repository>
68 <snapshotRepository>
Gary Wudcfc3442017-10-11 12:58:43 -070069 <id>ecomp-snapshots</id>
Gary Wu2a78a372017-08-21 14:03:14 -070070 <url>${onap.nexus.url}/content/repositories/snapshots</url>
71 </snapshotRepository>
72 </distributionManagement>
Gary Wu7f1c1522017-06-21 15:03:17 -070073 <build>
74 <pluginManagement>
75 <plugins>
76 <plugin>
Brian Freemanfcd164a2019-11-07 15:56:25 -050077 <groupId>org.apache.maven.plugins</groupId>
78 <artifactId>maven-compiler-plugin</artifactId>
79 <version>3.8.0</version>
80 <configuration>
81 <release>${maven.compiler.release}</release>
82 </configuration>
83 </plugin>
84 <plugin>
85 <groupId>org.codehaus.mojo</groupId>
86 <artifactId>versions-maven-plugin</artifactId>
87 <version>2.7</version>
88 <configuration>
89 <generateBackupPoms>false</generateBackupPoms>
90 </configuration>
91 </plugin>
92 <plugin>
Gary Wu7f1c1522017-06-21 15:03:17 -070093 <groupId>org.apache.maven.plugins</groupId>
Gary Wu2a78a372017-08-21 14:03:14 -070094 <artifactId>maven-deploy-plugin</artifactId>
Gary Wu07a40c82017-08-23 12:03:32 -070095 <!-- This version supports the "deployAtEnd" parameter -->
96 <version>2.8</version>
Gary Wu7f1c1522017-06-21 15:03:17 -070097 <configuration>
Gary Wu07a40c82017-08-23 12:03:32 -070098 <skip/>
Gary Wu7f1c1522017-06-21 15:03:17 -070099 </configuration>
Gary Wu07a40c82017-08-23 12:03:32 -0700100 </plugin>
101 <plugin>
102 <groupId>org.apache.maven.plugins</groupId>
103 <artifactId>maven-site-plugin</artifactId>
104 <version>3.6</version>
105 <dependencies>
106 <dependency>
107 <groupId>org.apache.maven.wagon</groupId>
108 <artifactId>wagon-webdav-jackrabbit</artifactId>
Dragosh, Pamela (pd1248)5b3b0072021-06-25 10:30:07 -0400109 <version>3.4.3</version>
Gary Wu07a40c82017-08-23 12:03:32 -0700110 </dependency>
111 </dependencies>
112 </plugin>
Anaël Closson9ab3bc52017-08-28 15:35:58 +0200113 <plugin>
Anaël Clossond25cc102017-08-28 15:43:22 +0200114 <groupId>org.apache.maven.plugins</groupId>
115 <artifactId>maven-enforcer-plugin</artifactId>
Gary Wu87895562018-09-11 14:28:49 -0700116 <version>3.0.0-M2</version>
Anaël Clossond25cc102017-08-28 15:43:22 +0200117 <executions>
118 <execution>
Gary Wu87895562018-09-11 14:28:49 -0700119 <id>enforce-property</id>
120 <goals>
121 <goal>enforce</goal>
122 </goals>
123 <configuration>
124 <rules>
125 <requireProperty>
126 <property>onap.nexus.url</property>
127 <message>You must set a onap.nexus.url property in your ~/.m2/settings.xml. See oparent/settings.xml for an example.</message>
128 </requireProperty>
129 </rules>
130 <fail>true</fail>
131 </configuration>
132 </execution>
133 <execution>
Anaël Clossond25cc102017-08-28 15:43:22 +0200134 <id>enforce-no-snapshots</id>
135 <goals>
136 <goal>enforce</goal>
137 </goals>
138 <configuration>
139 <rules>
140 <requireReleaseDeps>
141 <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
142 <onlyWhenRelease>true</onlyWhenRelease>
Gary Wu926c7562017-10-27 10:53:27 -0700143 <level>ERROR</level>
Anaël Clossond25cc102017-08-28 15:43:22 +0200144 </requireReleaseDeps>
145 </rules>
146 </configuration>
147 </execution>
148 </executions>
149 </plugin>
Gary Wue3c423d2018-02-02 11:10:57 -0800150 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
151 <plugin>
152 <groupId>org.sonarsource.scanner.maven</groupId>
153 <artifactId>sonar-maven-plugin</artifactId>
Pamela Dragosh81f6ddb2020-01-09 20:21:59 -0500154 <version>${sonar.scanner.version}</version>
Gary Wue3c423d2018-02-02 11:10:57 -0800155 </plugin>
Pamela Dragosh8cf3f2e2020-06-24 10:37:30 -0400156 <!--
157 Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
158 Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
159 Use in combination to rewrite code and imports, then checkstyle
160
161 Be sure to override ${project.parent.basedir} in order to find the XML file
162
163 1st - your project should be inheriting from this oparent java dependency
164 2nd - go into your project's source directory
165 3rd - type in the following and make sure you set the path to where you have oparent cloned and its
166 onap-java-formatter.xml file
167
168 mvn formatter:format spotless:apply process-sources -Dproject.parent.basedir=TODO
169 -->
170 <plugin>
171 <groupId>net.revelc.code.formatter</groupId>
172 <artifactId>formatter-maven-plugin</artifactId>
173 <version>2.11.0</version>
174 <configuration>
175 <configFile>${project.parent.basedir}/onap-java-formatter.xml</configFile>
176 </configuration>
177 <!-- https://code.revelc.net/formatter-maven-plugin/
178 use mvn formatter:format to rewrite source files
179 use mvn formatter:validate to validate source files -->
180 </plugin>
181 <plugin>
182 <groupId>com.diffplug.spotless</groupId>
183 <artifactId>spotless-maven-plugin</artifactId>
184 <version>1.26.1</version>
185 <configuration>
186 <java>
187 <importOrder>
188 <order>com,java,javax,org</order>
189 </importOrder>
190 </java>
191 </configuration>
192 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
193 use mvn spotless:apply to rewrite source files
194 use mvn spotless:check to validate source files -->
195 </plugin>
Gary Wu7f1c1522017-06-21 15:03:17 -0700196 </plugins>
197 </pluginManagement>
Gary Wu07a40c82017-08-23 12:03:32 -0700198 <plugins>
199 <plugin>
Gary Wu07a40c82017-08-23 12:03:32 -0700200 <groupId>org.apache.maven.plugins</groupId>
201 <artifactId>maven-deploy-plugin</artifactId>
202 </plugin>
203 <plugin>
204 <groupId>org.apache.maven.plugins</groupId>
205 <artifactId>maven-site-plugin</artifactId>
206 </plugin>
Anaël Closson9ab3bc52017-08-28 15:35:58 +0200207 <plugin>
Anaël Clossond25cc102017-08-28 15:43:22 +0200208 <groupId>org.apache.maven.plugins</groupId>
209 <artifactId>maven-enforcer-plugin</artifactId>
210 </plugin>
Gary Wu07a40c82017-08-23 12:03:32 -0700211 </plugins>
Gary Wu7f1c1522017-06-21 15:03:17 -0700212 </build>
213</project>