tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r1565597 - /tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java
Date Fri, 07 Feb 2014 09:37:21 GMT
Author: jlmonteiro
Date: Fri Feb  7 09:37:21 2014
New Revision: 1565597

URL: http://svn.apache.org/r1565597
Log:
Initializing the SystemInstance so we get all properties mechanisms with overrides

Modified:
    tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java

Modified: tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java?rev=1565597&r1=1565596&r2=1565597&view=diff
==============================================================================
--- tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java
(original)
+++ tomee/tomee/trunk/arquillian/arquillian-tomee-common/src/main/java/org/apache/openejb/arquillian/common/MavenCache.java
Fri Feb  7 09:37:21 2014
@@ -17,6 +17,7 @@
 package org.apache.openejb.arquillian.common;
 
 import org.apache.openejb.loader.ProvisioningUtil;
+import org.apache.openejb.loader.SystemInstance;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -24,6 +25,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
+import java.util.Properties;
 import java.util.logging.Logger;
 
 public class MavenCache {
@@ -32,6 +34,13 @@ public class MavenCache {
     public static File getArtifact(final String artifactInfo, final String altUrl) {
         LOGGER.info("Downloading " + artifactInfo + " please wait...");
 
+        // initializing the SystemInstance because we'll need it for configuration
+        try {
+            SystemInstance.get().init(new Properties());
+        } catch (Exception e) {
+            // no-op
+        }
+
         try {
             return new File(ProvisioningUtil.realLocation(artifactInfo.startsWith("mvn")
? "" : "mvn:" + artifactInfo));
         } catch (Exception e) {



Mime
View raw message