ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1587669 - in /ant/ivy/ivyde/trunk: ./ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/
Date Tue, 15 Apr 2014 18:19:19 GMT
Author: hibou
Date: Tue Apr 15 18:19:19 2014
New Revision: 1587669

URL: http://svn.apache.org/r1587669
Log:
Actually Ivy 2.4 is needed for inner classpath support: activate the feture only if the expected
API is available

Modified:
    ant/ivy/ivyde/trunk/build.properties
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerMapper.java

Modified: ant/ivy/ivyde/trunk/build.properties
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/build.properties?rev=1587669&r1=1587668&r2=1587669&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/build.properties (original)
+++ ant/ivy/ivyde/trunk/build.properties Tue Apr 15 18:19:19 2014
@@ -48,4 +48,4 @@ hudson.download.zest.name=GEF-zest-3.6.2
 hudson.download.zest.dropdir=tools/gef/downloads/drops/3.6.2/R201102251600
 hudson.download.zest.md5=b7b6f7f07c876ebebdf987e0b3b758e1
 
-hudson.ivy.version=2.3.0-rc1
+hudson.ivy.version=2.4.0-rc1

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java?rev=1587669&r1=1587668&r2=1587669&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/IvyPlugin.java
Tue Apr 15 18:19:19 2014
@@ -101,6 +101,8 @@ public class IvyPlugin extends AbstractU
 
     private boolean osgiAvailable;
 
+    private boolean osgiClasspathAvailable;
+
     private IvyClasspathContainerSerializer ivyCpcSerializer;
 
     private IvyAttachementManager ivyAttachementManager;
@@ -187,8 +189,15 @@ public class IvyPlugin extends AbstractU
         try {
             Class.forName("org.apache.ivy.osgi.core.ManifestParser");
             osgiAvailable = true;
+            try {
+                Class.forName("org.apache.ivy.osgi.core.BundleInfo").getDeclaredMethod("getClasspath");
+                osgiClasspathAvailable = true;
+            } catch (Exception e) {
+                osgiClasspathAvailable = false;
+            }
         } catch (Exception e) {
             osgiAvailable = false;
+            osgiClasspathAvailable = false;
         }
 
         logInfo("IvyDE plugin started");
@@ -306,6 +315,10 @@ public class IvyPlugin extends AbstractU
         return osgiAvailable;
     }
 
+    public boolean isOsgiClasspathAvailable() {
+        return osgiClasspathAvailable;
+    }
+
     /**
      * Returns the active workbench shell
      * 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerMapper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerMapper.java?rev=1587669&r1=1587668&r2=1587669&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerMapper.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/cpcontainer/IvyClasspathContainerMapper.java
Tue Apr 15 18:19:19 2014
@@ -83,6 +83,8 @@ public class IvyClasspathContainerMapper
 
     private boolean osgiAvailable;
 
+    private boolean osgiClasspathAvailable;
+
     private IvyAttachementManager attachementManager = IvyPlugin.getDefault()
             .getIvyAttachementManager();
 
@@ -97,6 +99,7 @@ public class IvyClasspathContainerMapper
         this.artifactsByDependency = resolveResult.getArtifactsByDependency();
         this.retrievedArtifacts = resolveResult.getRetrievedArtifacts();
         this.osgiAvailable = IvyPlugin.getDefault().isOsgiAvailable();
+        this.osgiClasspathAvailable = IvyPlugin.getDefault().isOsgiClasspathAvailable();
     }
 
     public IClasspathEntry[] map() {
@@ -124,7 +127,7 @@ public class IvyClasspathContainerMapper
                 IvyDEMessage.verbose("Adding " + artifact.getName() + " to the classpath");
 
                 // handle unzipped jar with 'Bundle-Classpath'
-                if (artifact.getLocalFile().isDirectory() && classpathSetup.isReadOSGiMetadata())
{
+                if (osgiClasspathAvailable && artifact.getLocalFile().isDirectory()
&& classpathSetup.isReadOSGiMetadata()) {
                     File manifestFile = new File(artifact.getLocalFile(), "META-INF/MANIFEST.MF");
                     if (!manifestFile.exists()) {
                         // no manifest : back to simple classpath



Mime
View raw message