1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2016-2018 Huawei Technologies Co., Ltd.
4 Modifications copyright (C) 2017-2019 AT&T Intellectual Property
5 Modifications Copyright (C) 2020 Bell Canada.
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
11 http://www.apache.org/licenses/LICENSE-2.0
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.
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>
22 <groupId>org.onap.oparent</groupId>
23 <artifactId>version</artifactId>
24 <version>3.3.0-SNAPSHOT</version>
25 <packaging>pom</packaging>
27 <!-- oparent tools -->
28 <module>checkstyle</module>
29 <module>license</module>
30 <module>oparent</module>
31 <module>oparent-python</module>
32 <module>dependencies</module>
33 <module>dependencies-clm</module>
36 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
38 <!-- sitePath may be overridden in the inheriting POM if desired -->
39 <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
40 <maven.compiler.release>11</maven.compiler.release>
41 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
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>
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.
53 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
54 <onap.nexus.rawrepo.baseurl.upload>https://nexus.onap.org/content/sites/raw</onap.nexus.rawrepo.baseurl.upload>
55 <onap.nexus.rawrepo.baseurl.download>https://nexus.onap.org/service/local/repositories/raw/content</onap.nexus.rawrepo.baseurl.download>
56 <onap.nexus.rawrepo.serverid>ecomp-raw</onap.nexus.rawrepo.serverid>
57 <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>
59 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
60 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
63 <distributionManagement>
65 <id>ecomp-releases</id>
66 <url>${onap.nexus.url}/content/repositories/releases</url>
69 <id>ecomp-snapshots</id>
70 <url>${onap.nexus.url}/content/repositories/snapshots</url>
72 </distributionManagement>
77 <groupId>org.apache.maven.plugins</groupId>
78 <artifactId>maven-compiler-plugin</artifactId>
79 <version>3.8.0</version>
81 <release>${maven.compiler.release}</release>
85 <groupId>org.codehaus.mojo</groupId>
86 <artifactId>versions-maven-plugin</artifactId>
87 <version>2.7</version>
89 <generateBackupPoms>false</generateBackupPoms>
93 <groupId>org.apache.maven.plugins</groupId>
94 <artifactId>maven-deploy-plugin</artifactId>
95 <!-- This version supports the "deployAtEnd" parameter -->
96 <version>2.8</version>
102 <groupId>org.apache.maven.plugins</groupId>
103 <artifactId>maven-site-plugin</artifactId>
104 <version>3.6</version>
107 <groupId>org.apache.maven.wagon</groupId>
108 <artifactId>wagon-webdav-jackrabbit</artifactId>
109 <version>3.4.3</version>
114 <groupId>org.apache.maven.plugins</groupId>
115 <artifactId>maven-enforcer-plugin</artifactId>
116 <version>3.0.0-M2</version>
119 <id>enforce-property</id>
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>
134 <id>enforce-no-snapshots</id>
141 <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
142 <onlyWhenRelease>true</onlyWhenRelease>
144 </requireReleaseDeps>
150 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
152 <groupId>org.sonarsource.scanner.maven</groupId>
153 <artifactId>sonar-maven-plugin</artifactId>
154 <version>${sonar.scanner.version}</version>
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
161 Be sure to override ${project.parent.basedir} in order to find the XML file
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
168 mvn formatter:format spotless:apply process-sources -Dproject.parent.basedir=TODO
171 <groupId>net.revelc.code.formatter</groupId>
172 <artifactId>formatter-maven-plugin</artifactId>
173 <version>2.11.0</version>
175 <configFile>${project.parent.basedir}/onap-java-formatter.xml</configFile>
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 -->
182 <groupId>com.diffplug.spotless</groupId>
183 <artifactId>spotless-maven-plugin</artifactId>
184 <version>1.26.1</version>
188 <order>com,java,javax,org</order>
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 -->
200 <groupId>org.apache.maven.plugins</groupId>
201 <artifactId>maven-deploy-plugin</artifactId>
204 <groupId>org.apache.maven.plugins</groupId>
205 <artifactId>maven-site-plugin</artifactId>
208 <groupId>org.apache.maven.plugins</groupId>
209 <artifactId>maven-enforcer-plugin</artifactId>