Update pom.xml to depend on official onos-dependencies parent pom
This patch fixes the issues seen when trying to release the app,
and in general, when trying to execute maven stages other than
build/install.
ONOS stopped publishing onos-dependencies with version 2.2.0, thus
requiring each app to explicitly declare dependencies and plugins. The
following ONOS patch revamps support for building 3rd-party apps with
Maven, including publishing of the onos-dependencies (parent) pom:
https://gerrit.onosproject.org/#/c/22790/
The new onos-dependencies exposes shared Java dependencies as well as
Maven plugins, already configured to support the whole life-cycle of
apps (from build, to reporting and release).
Change-Id: Ife088a86776582e9bcbbfcce0109e5d7affdaaa0
diff --git a/api/pom.xml b/api/pom.xml
index 5b0a95d..c5a349d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -49,15 +49,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>3.1.0</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
diff --git a/app/pom.xml b/app/pom.xml
index 1e425d4..338b11a 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -38,7 +38,6 @@
<onos.app.requires>
org.opencord.sadis
</onos.app.requires>
- <karaf.version>4.2.6</karaf.version>
</properties>
<dependencies>
@@ -86,20 +85,6 @@
</dependency>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.component.annotations</artifactId>
- <version>1.4.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>5.0.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
<groupId>org.onosproject</groupId>
<artifactId>onlab-osgi</artifactId>
<version>${onos.version}</version>
@@ -108,16 +93,8 @@
</dependency>
<dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>4.0.2</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.console</artifactId>
- <version>${karaf.version}</version>
<scope>provided</scope>
</dependency>
@@ -137,32 +114,11 @@
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.25</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>22.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- <version>2.9.5</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
@@ -170,30 +126,6 @@
<plugin>
<groupId>org.onosproject</groupId>
<artifactId>onos-maven-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>cfg</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>cfg</goal>
- </goals>
- </execution>
- <execution>
- <id>swagger</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>swagger</goal>
- </goals>
- </execution>
- <execution>
- <id>app</id>
- <phase>package</phase>
- <goals>
- <goal>app</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
@@ -201,11 +133,7 @@
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
- <Bundle-SymbolicName>
- ${project.groupId}.${project.artifactId}
- </Bundle-SymbolicName>
<Karaf-Commands>org.opencord.dhcpl2relay.cli</Karaf-Commands>
- <_dsannotations-options>inherit</_dsannotations-options>
</instructions>
</configuration>
</plugin>
diff --git a/pom.xml b/pom.xml
index 0de6965..f62c246 100755
--- a/pom.xml
+++ b/pom.xml
@@ -17,10 +17,14 @@
<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">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-dependencies</artifactId>
+ <version>2.2.1-b2</version>
+ </parent>
+
<groupId>org.opencord</groupId>
<artifactId>dhcpl2relay</artifactId>
- <!-- TODO: Should the version be bumped since we are now producing
- classes for JRE 11? -->
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -28,8 +32,6 @@
<url>http://opencord.org</url>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <onos.version>2.2.0</onos.version>
<sadis.api.version>4.0.0-SNAPSHOT</sadis.api.version>
</properties>
@@ -38,28 +40,6 @@
<module>api</module>
</modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>4.1.0</version>
- <extensions>true</extensions>
- <inherited>true</inherited>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
- <configuration>
- <release>11</release>
- </configuration>
- <inherited>true</inherited>
- </plugin>
- </plugins>
- </build>
-
<repositories>
<repository>
<id>central</id>