You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2016/05/27 18:12:40 UTC

svn commit: r1745799 - in /felix/trunk/connect: ./ pom.xml src/main/java/org/apache/felix/connect/PojoSR.java

Author: pauls
Date: Fri May 27 18:12:40 2016
New Revision: 1745799

URL: http://svn.apache.org/viewvc?rev=1745799&view=rev
Log:
Set compiler level to 1.6, mark dependencies as scope provided, and try to fix startup in spring boot (FELIX-5265,FELIX-5266, FELIX-5267).

Modified:
    felix/trunk/connect/   (props changed)
    felix/trunk/connect/pom.xml
    felix/trunk/connect/src/main/java/org/apache/felix/connect/PojoSR.java

Propchange: felix/trunk/connect/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 27 18:12:40 2016
@@ -0,0 +1 @@
+target

Modified: felix/trunk/connect/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/connect/pom.xml?rev=1745799&r1=1745798&r2=1745799&view=diff
==============================================================================
--- felix/trunk/connect/pom.xml (original)
+++ felix/trunk/connect/pom.xml Fri May 27 18:12:40 2016
@@ -59,17 +59,20 @@
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
             <version>5.0.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.jboss</groupId>
-			<artifactId>jboss-vfs</artifactId>
-			<version>3.2.11.Final</version>
-		</dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-vfs</artifactId>
+            <version>3.2.11.Final</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
     <repositories />
     <pluginRepositories />
@@ -100,8 +103,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <target>1.5</target>
-                    <source>1.5</source>
+                    <target>1.6</target>
+                    <source>1.6</source>
                 </configuration>
             </plugin>
             <plugin>

Modified: felix/trunk/connect/src/main/java/org/apache/felix/connect/PojoSR.java
URL: http://svn.apache.org/viewvc/felix/trunk/connect/src/main/java/org/apache/felix/connect/PojoSR.java?rev=1745799&r1=1745798&r2=1745799&view=diff
==============================================================================
--- felix/trunk/connect/src/main/java/org/apache/felix/connect/PojoSR.java (original)
+++ felix/trunk/connect/src/main/java/org/apache/felix/connect/PojoSR.java Fri May 27 18:12:40 2016
@@ -83,7 +83,7 @@ public class PojoSR implements PojoServi
     private final Map<Long, Bundle> m_bundles = new HashMap<Long, Bundle>();
     private final Map<String, Object> bundleConfig;
     private final boolean m_hasVFS;
-    
+
     public static BundleDescriptor createSystemBundle() {
         final Map<String, String> headers = new HashMap<String, String>();
         headers.put(Constants.BUNDLE_SYMBOLICNAME, "org.apache.felix.connect");
@@ -250,7 +250,7 @@ public class PojoSR implements PojoServi
             hasVFS = false;
         }
         m_hasVFS = hasVFS;
-        
+
         Collection<BundleDescriptor> scan = (Collection<BundleDescriptor>) config.get(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS);
 
         if (scan != null)
@@ -327,7 +327,7 @@ public class PojoSR implements PojoServi
         Revision r;
         URL url = new URL(desc.getUrl());
         URL u = new URL(desc.getUrl() + "META-INF/MANIFEST.MF");
-        String extF = u.toExternalForm(); 
+        String extF = u.toExternalForm();
         if (extF.startsWith("file:"))
         {
             File root = new File(URLDecoder.decode(url.getFile(), "UTF-8"));
@@ -340,8 +340,9 @@ public class PojoSR implements PojoServi
             {
                 String target = ((JarURLConnection) uc).getJarFileURL().toExternalForm();
                 String prefix = null;
-                if (!("jar:" + target + "!/").equals(desc.getUrl()))
+                if (!("jar:" + target + "!/").equals(desc.getUrl()) && desc.getUrl().startsWith("jar:" + target + "!/"))
                 {
+                    System.out.println(desc.getUrl() + " " + target);
                     prefix = desc.getUrl().substring(("jar:" + target + "!/").length());
                 }
                 r = new JarRevision(
@@ -350,7 +351,7 @@ public class PojoSR implements PojoServi
                         prefix,
                         uc.getLastModified());
             }
-            else if (m_hasVFS && extF.startsWith("vfs")) 
+            else if (m_hasVFS && extF.startsWith("vfs"))
             {
                 r = new VFSRevision(url, url.openConnection().getLastModified());
             }