You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by ro...@apache.org on 2019/12/06 16:48:45 UTC
[aries-cdi] branch master updated: cleanup version handling and
unused code
This is an automated email from the ASF dual-hosted git repository.
rotty3000 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-cdi.git
The following commit(s) were added to refs/heads/master by this push:
new 3ad3d27 cleanup version handling and unused code
new 9fc6373 Merge pull request #24 from rotty3000/master
3ad3d27 is described below
commit 3ad3d272a735bfcedd95ffe00c38358eb5fc5c6e
Author: Raymond Augé <ro...@apache.org>
AuthorDate: Fri Dec 6 11:12:28 2019 -0500
cleanup version handling and unused code
Signed-off-by: Raymond Augé <ro...@apache.org>
---
cdi-extension-mp-config/pom.xml | 13 +++----
cdi-extension-mp-metrics/pom.xml | 7 +---
.../aries/cdi/test/cases/MpMetricsTests.java | 42 ++++------------------
pom.xml | 23 +++++++-----
4 files changed, 29 insertions(+), 56 deletions(-)
diff --git a/cdi-extension-mp-config/pom.xml b/cdi-extension-mp-config/pom.xml
index ce50d51..d54d303 100644
--- a/cdi-extension-mp-config/pom.xml
+++ b/cdi-extension-mp-config/pom.xml
@@ -26,11 +26,6 @@
<relativePath>..</relativePath>
</parent>
- <properties>
- <mp.config.version>1.3</mp.config.version>
- <byte.buddy.version>1.10.3</byte.buddy.version>
- </properties>
-
<artifactId>org.apache.aries.cdi.extension.mp-config</artifactId>
<name>Apache Aries CDI - MicroProfile Config ${mp.config.version} Using Apache Geronimo</name>
<description>Apache Aries CDI - MicroProfile Config ${mp.config.version} Using Apache Geronimo</description>
@@ -132,6 +127,12 @@
<artifactId>geronimo-jcdi_2.0_spec</artifactId>
</dependency>
<dependency>
+ <groupId>org.eclipse.microprofile.config</groupId>
+ <artifactId>microprofile-config-api</artifactId>
+ <version>${mp.config.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.config</groupId>
<artifactId>geronimo-config-impl</artifactId>
<version>1.2.2</version>
@@ -155,4 +156,4 @@
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/cdi-extension-mp-metrics/pom.xml b/cdi-extension-mp-metrics/pom.xml
index 39b00c2..335143d 100644
--- a/cdi-extension-mp-metrics/pom.xml
+++ b/cdi-extension-mp-metrics/pom.xml
@@ -26,11 +26,6 @@
<relativePath>..</relativePath>
</parent>
- <properties>
- <mp.metrics.version>1.1.1</mp.metrics.version>
- <byte.buddy.version>1.10.3</byte.buddy.version>
- </properties>
-
<artifactId>org.apache.aries.cdi.extension.mp-metrics</artifactId>
<name>Apache Aries CDI - MicroProfile Metrics ${mp.metrics.version} Using Apache Geronimo</name>
<description>Apache Aries CDI - MicroProfile Metrics ${mp.metrics.version} Using Apache Geronimo</description>
@@ -208,4 +203,4 @@
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/MpMetricsTests.java b/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/MpMetricsTests.java
index d47801c..09a8c55 100644
--- a/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/MpMetricsTests.java
+++ b/cdi-itests/src/main/java/org/apache/aries/cdi/test/cases/MpMetricsTests.java
@@ -16,7 +16,6 @@ package org.apache.aries.cdi.test.cases;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.util.Collection;
@@ -34,9 +33,6 @@ import org.osgi.framework.ServiceReference;
import org.osgi.service.http.runtime.HttpServiceRuntime;
import org.osgi.service.jaxrs.runtime.JaxrsServiceRuntime;
import org.osgi.service.jaxrs.runtime.JaxrsServiceRuntimeConstants;
-import org.osgi.service.jaxrs.runtime.dto.ResourceDTO;
-import org.osgi.service.jaxrs.runtime.dto.ResourceMethodInfoDTO;
-import org.osgi.service.jaxrs.runtime.dto.RuntimeDTO;
import org.osgi.util.tracker.ServiceTracker;
public class MpMetricsTests extends SlimTestCase {
@@ -98,30 +94,6 @@ public class MpMetricsTests extends SlimTestCase {
return null;
}
- private ResourceDTO waitFor(String path) throws InterruptedException {
- return waitFor(path, 20);
- }
-
- private ResourceDTO waitFor(String path, int intervals) throws InterruptedException {
- for (int j = intervals; j > 0; j--) {
- RuntimeDTO runtimeDTO = jsr.getRuntimeDTO();
-
- for (ResourceDTO curResourceDTO : runtimeDTO.defaultApplication.resourceDTOs) {
- for (ResourceMethodInfoDTO rmid : curResourceDTO.resourceMethods) {
- if (path.equals(rmid.path)) {
- return curResourceDTO;
- }
- }
- }
-
- Thread.sleep(50);
- }
-
- assertTrue(String.format("%s not found in time", path), false);
-
- return null;
- }
-
@Before
@Override
public void setUp() throws Exception {
@@ -156,12 +128,12 @@ public class MpMetricsTests extends SlimTestCase {
cbTracker.close();
}
- private ServiceTracker<HttpServiceRuntime, HttpServiceRuntime> hsrTracker = new ServiceTracker<>(bundleContext, HttpServiceRuntime.class, null);
- private HttpServiceRuntime hsr;
- private ClientBuilder cb;
- private ServiceTracker<ClientBuilder, ClientBuilder> cbTracker;
- private JaxrsServiceRuntime jsr;
- private ServiceReference<JaxrsServiceRuntime> jsrReference;
- private ServiceTracker<JaxrsServiceRuntime, JaxrsServiceRuntime> jsrTracker;
+ ClientBuilder cb;
+ ServiceTracker<ClientBuilder, ClientBuilder> cbTracker;
+ HttpServiceRuntime hsr;
+ ServiceTracker<HttpServiceRuntime, HttpServiceRuntime> hsrTracker = new ServiceTracker<>(bundleContext, HttpServiceRuntime.class, null);
+ JaxrsServiceRuntime jsr;
+ ServiceReference<JaxrsServiceRuntime> jsrReference;
+ ServiceTracker<JaxrsServiceRuntime, JaxrsServiceRuntime> jsrTracker;
}
diff --git a/pom.xml b/pom.xml
index bb02d94..4b70611 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,14 +33,23 @@
<packaging>pom</packaging>
<properties>
- <bnd.version>4.3.1</bnd.version>
- <jsp.version>2.0</jsp.version>
+ <java.version>1.8</java.version>
+ <!-- <maven.compiler.release>${java.version}</maven.compiler.release> -->
+ <maven.compiler.source>${java.version}</maven.compiler.source>
+ <maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <!-- Versions -->
+ <bnd.version>4.3.1</bnd.version>
<byte.buddy.version>1.10.3</byte.buddy.version>
- <surefire.version>2.12</surefire.version>
+ <johnzon.version>1.2.3-SNAPSHOT</johnzon.version>
+ <jsp.version>2.0</jsp.version>
+ <mp.config.version>1.3</mp.config.version>
+ <mp.metrics.version>1.1.1</mp.metrics.version>
+ <owb.version>2.0.13</owb.version>
<slf4j.version>1.7.28</slf4j.version>
+ <surefire.version>2.12</surefire.version>
<weld.version>3.0.5.Final</weld.version>
- <owb.version>2.0.13</owb.version>
</properties>
<licenses>
@@ -357,11 +366,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
+ <version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>