tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject tomee git commit: #TOMEE-1538 ProvisioningUtil#fallback
Date Thu, 02 Apr 2015 11:38:01 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 5d117cb1a -> 980dafe76


#TOMEE-1538 ProvisioningUtil#fallback


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/980dafe7
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/980dafe7
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/980dafe7

Branch: refs/heads/tomee-1.7.x
Commit: 980dafe76454f5b9aa2782d9af3ba9cefcdca32f
Parents: 5d117cb
Author: andygumbrecht@apache.org <andygumbrecht@apache.org>
Authored: Thu Apr 2 13:37:50 2015 +0200
Committer: andygumbrecht@apache.org <andygumbrecht@apache.org>
Committed: Thu Apr 2 13:37:50 2015 +0200

----------------------------------------------------------------------
 .../arquillian/tests/jaxrs/apppath/AnnotatedApplication.java   | 3 ++-
 .../main/java/org/apache/openejb/loader/ProvisioningUtil.java  | 4 ++--
 .../java/org/apache/openejb/loader/ProvisioningUtilTest.java   | 6 ++++++
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/980dafe7/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/apppath/AnnotatedApplication.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/apppath/AnnotatedApplication.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/apppath/AnnotatedApplication.java
index 5884d7e..8bc0434 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/apppath/AnnotatedApplication.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/apppath/AnnotatedApplication.java
@@ -19,6 +19,7 @@ package org.apache.openejb.arquillian.tests.jaxrs.apppath;
 import javax.ws.rs.ApplicationPath;
 import javax.ws.rs.core.Application;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -33,6 +34,6 @@ import java.util.Set;
 @ApplicationPath("/rest")
 public class AnnotatedApplication extends Application {
     public Set<Class<?>> getClasses() {
-        return new HashSet<Class<?>>(Arrays.asList(Echo.class));
+        return new HashSet<Class<?>>(Collections.singletonList(Echo.class));
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/980dafe7/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
b/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
index f4c4f6d..fb25a8d 100644
--- a/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
+++ b/container/openejb-loader/src/main/java/org/apache/openejb/loader/ProvisioningUtil.java
@@ -149,7 +149,7 @@ public final class ProvisioningUtil {
         if (rawLocation.startsWith(MVN_PREFIX)) {
             try {
                 final String repo1Url = quickMvnUrl(rawLocation.substring(MVN_PREFIX.length()).replace(":",
"/"));
-                return realLocation(repo1Url);
+                return realLocation(repo1Url).replace(":", "/").replace("///","/");
             } catch (final MalformedURLException e1) {
                 Logger.getLogger(ProvisioningUtil.class.getName()).severe("Can't find " +
rawLocation);
             }
@@ -237,7 +237,7 @@ public final class ProvisioningUtil {
 
         final String version = segments[2];
         if (version.trim().isEmpty()) {
-            throw new MalformedURLException("Invalid artifactId. " + toParse);
+            throw new MalformedURLException("Invalid version. " + toParse);
         }
 
         builder.append(version).append("/");

http://git-wip-us.apache.org/repos/asf/tomee/blob/980dafe7/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
b/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
index 9c79c90..f59494e 100644
--- a/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
+++ b/container/openejb-loader/src/test/java/org/apache/openejb/loader/ProvisioningUtilTest.java
@@ -28,4 +28,10 @@ public class ProvisioningUtilTest {
         final String url = ProvisioningUtil.quickMvnUrl("org.apache.openejb/apache-tomee/x.y.z-SNAPSHOT");
         assertEquals("https://repository.apache.org/snapshots/org/apache/openejb/apache-tomee/x.y.z-SNAPSHOT/apache-tomee-x.y.z-SNAPSHOT.jar",
url);
     }
+
+    @Test
+    public void mvnUrlRawLocation() throws MalformedURLException {
+        final String url = ProvisioningUtil.realLocation("mvn:org.apache.openejb:apache-tomee:x.y.z-SNAPSHOT:zip");
+        assertEquals("https/repository.apache.org/snapshots/org/apache/openejb/apache-tomee/x.y.z-SNAPSHOT/apache-tomee-x.y.z-SNAPSHOT.zip",
url);
+    }
 }


Mime
View raw message