Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
Gary Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 3 | Copyright (c) 2016-2018 Huawei Technologies Co., Ltd. |
Brian Freeman | bedb484 | 2019-11-01 08:48:01 -0500 | [diff] [blame] | 4 | Modifications copyright (C) 2017-2019 AT&T Intellectual Property |
puthuparambil.aditya | 563d636 | 2020-07-01 12:49:11 +0100 | [diff] [blame] | 5 | Modifications Copyright (C) 2020 Bell Canada. |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 6 | |
| 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 Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 21 | <name>oparent</name> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 22 | <groupId>org.onap.oparent</groupId> |
| 23 | <artifactId>version</artifactId> |
Pamela Dragosh | c6044f6 | 2021-01-26 07:55:09 -0500 | [diff] [blame] | 24 | <version>3.2.1-SNAPSHOT</version> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 25 | <packaging>pom</packaging> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 26 | <modules> |
| 27 | <!-- oparent tools --> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 28 | <module>checkstyle</module> |
| 29 | <module>license</module> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 30 | <module>oparent</module> |
DR695H | eb3dd60 | 2017-09-08 15:20:22 -0400 | [diff] [blame] | 31 | <module>oparent-python</module> |
Pamela Dragosh | 3d0fef4 | 2018-08-23 13:38:15 -0400 | [diff] [blame] | 32 | <module>dependencies</module> |
| 33 | <module>dependencies-clm</module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 34 | </modules> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 35 | <properties> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 36 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 37 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
Gary Wu | ff1f342 | 2017-08-23 13:24:41 -0700 | [diff] [blame] | 38 | <!-- sitePath may be overridden in the inheriting POM if desired --> |
| 39 | <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath> |
Brian Freeman | fcd164a | 2019-11-07 15:56:25 -0500 | [diff] [blame] | 40 | <maven.compiler.release>11</maven.compiler.release> |
Pamela Dragosh | 81f6ddb | 2020-01-09 20:21:59 -0500 | [diff] [blame] | 41 | <sonar.scanner.version>3.7.0.1746</sonar.scanner.version> |
| 42 | |
Brian Freeman | fcd164a | 2019-11-07 15:56:25 -0500 | [diff] [blame] | 43 | <!-- |
| 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 Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 49 | <!-- |
| 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 Ji | cbb9027 | 2017-09-01 17:43:02 +0000 | [diff] [blame] | 54 | <onap.nexus.rawrepo.baseurl.upload>https://nexus.onap.org/content/sites/raw</onap.nexus.rawrepo.baseurl.upload> |
Gary Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 55 | <onap.nexus.rawrepo.baseurl.download>https://nexus.onap.org/service/local/repositories/raw/content</onap.nexus.rawrepo.baseurl.download> |
Lusheng Ji | cbb9027 | 2017-09-01 17:43:02 +0000 | [diff] [blame] | 56 | <onap.nexus.rawrepo.serverid>ecomp-raw</onap.nexus.rawrepo.serverid> |
Lusheng Ji | cbb9027 | 2017-09-01 17:43:02 +0000 | [diff] [blame] | 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> |
Gary Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 59 | <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry> |
| 60 | <docker.push.registry>nexus3.onap.org:10003</docker.push.registry> |
| 61 | --> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 62 | </properties> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 63 | <distributionManagement> |
| 64 | <repository> |
Gary Wu | dcfc344 | 2017-10-11 12:58:43 -0700 | [diff] [blame] | 65 | <id>ecomp-releases</id> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 66 | <url>${onap.nexus.url}/content/repositories/releases</url> |
| 67 | </repository> |
| 68 | <snapshotRepository> |
Gary Wu | dcfc344 | 2017-10-11 12:58:43 -0700 | [diff] [blame] | 69 | <id>ecomp-snapshots</id> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 70 | <url>${onap.nexus.url}/content/repositories/snapshots</url> |
| 71 | </snapshotRepository> |
| 72 | </distributionManagement> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 73 | <build> |
| 74 | <pluginManagement> |
| 75 | <plugins> |
| 76 | <plugin> |
Brian Freeman | fcd164a | 2019-11-07 15:56:25 -0500 | [diff] [blame] | 77 | <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 Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 93 | <groupId>org.apache.maven.plugins</groupId> |
Gary Wu | 2a78a37 | 2017-08-21 14:03:14 -0700 | [diff] [blame] | 94 | <artifactId>maven-deploy-plugin</artifactId> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 95 | <!-- This version supports the "deployAtEnd" parameter --> |
| 96 | <version>2.8</version> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 97 | <configuration> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 98 | <skip/> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 99 | </configuration> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 100 | </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) | 5b3b007 | 2021-06-25 10:30:07 -0400 | [diff] [blame] | 109 | <version>3.4.3</version> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 110 | </dependency> |
| 111 | </dependencies> |
| 112 | </plugin> |
Anaël Closson | 9ab3bc5 | 2017-08-28 15:35:58 +0200 | [diff] [blame] | 113 | <plugin> |
Anaël Closson | d25cc10 | 2017-08-28 15:43:22 +0200 | [diff] [blame] | 114 | <groupId>org.apache.maven.plugins</groupId> |
| 115 | <artifactId>maven-enforcer-plugin</artifactId> |
Gary Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 116 | <version>3.0.0-M2</version> |
Anaël Closson | d25cc10 | 2017-08-28 15:43:22 +0200 | [diff] [blame] | 117 | <executions> |
| 118 | <execution> |
Gary Wu | 8789556 | 2018-09-11 14:28:49 -0700 | [diff] [blame] | 119 | <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 Closson | d25cc10 | 2017-08-28 15:43:22 +0200 | [diff] [blame] | 134 | <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 Wu | 926c756 | 2017-10-27 10:53:27 -0700 | [diff] [blame] | 143 | <level>ERROR</level> |
Anaël Closson | d25cc10 | 2017-08-28 15:43:22 +0200 | [diff] [blame] | 144 | </requireReleaseDeps> |
| 145 | </rules> |
| 146 | </configuration> |
| 147 | </execution> |
| 148 | </executions> |
| 149 | </plugin> |
Gary Wu | e3c423d | 2018-02-02 11:10:57 -0800 | [diff] [blame] | 150 | <!-- 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 Dragosh | 81f6ddb | 2020-01-09 20:21:59 -0500 | [diff] [blame] | 154 | <version>${sonar.scanner.version}</version> |
Gary Wu | e3c423d | 2018-02-02 11:10:57 -0800 | [diff] [blame] | 155 | </plugin> |
Pamela Dragosh | 8cf3f2e | 2020-06-24 10:37:30 -0400 | [diff] [blame] | 156 | <!-- |
| 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 Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 196 | </plugins> |
| 197 | </pluginManagement> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 198 | <plugins> |
| 199 | <plugin> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 200 | <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 Closson | 9ab3bc5 | 2017-08-28 15:35:58 +0200 | [diff] [blame] | 207 | <plugin> |
Anaël Closson | d25cc10 | 2017-08-28 15:43:22 +0200 | [diff] [blame] | 208 | <groupId>org.apache.maven.plugins</groupId> |
| 209 | <artifactId>maven-enforcer-plugin</artifactId> |
| 210 | </plugin> |
Gary Wu | 07a40c8 | 2017-08-23 12:03:32 -0700 | [diff] [blame] | 211 | </plugins> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 212 | </build> |
| 213 | </project> |