karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r960124 - in /karaf/trunk: tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
Date Fri, 02 Jul 2010 22:13:17 GMT
Author: gertv
Date: Fri Jul  2 22:13:16 2010
New Revision: 960124

URL: http://svn.apache.org/viewvc?rev=960124&view=rev
Log:
Fix Hudson build failures

Modified:
    karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java
    karaf/trunk/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java

Modified: karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java
URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java?rev=960124&r1=960123&r2=960124&view=diff
==============================================================================
--- karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java
(original)
+++ karaf/trunk/tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/ValidateFeaturesMojo.java
Fri Jul  2 22:13:16 2010
@@ -28,6 +28,7 @@ import java.util.jar.Manifest;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
+import org.apache.karaf.features.BundleInfo;
 import org.apache.karaf.features.Feature;
 import org.apache.karaf.features.Repository;
 import org.apache.karaf.features.internal.RepositoryImpl;
@@ -268,7 +269,7 @@ public class ValidateFeaturesMojo extend
     private void analyzeExports(Repository repository) throws Exception {
         for (Feature feature : repository.getFeatures()) {
             Set<Clause> exports = new HashSet<Clause>();
-            for (String bundle : feature.getBundles()) {
+            for (String bundle : getBundleLocations(feature)) {
                 exports.addAll(getExports(getManifest(bundles.get(bundle))));
             }
             info("    scanning feature %s for exports", feature.getName());
@@ -281,7 +282,7 @@ public class ValidateFeaturesMojo extend
      */
     private void validateBundlesAvailable(Repository repository) throws Exception {
         for (Feature feature : repository.getFeatures()) {
-            for (String bundle : feature.getBundles()) {
+            for (String bundle : getBundleLocations(feature)) {
                 // this will throw an exception if the artifact can not be resolved
                 final Artifact artifact = resolve(bundle);
                 bundles.put(bundle, artifact);
@@ -295,6 +296,19 @@ public class ValidateFeaturesMojo extend
     }
 
     /*
+     * Get a list of bundle locations in a feature
+     */
+    private List<String> getBundleLocations(Feature feature) {
+        List<String> result = new LinkedList<String>();
+        if (feature != null && feature.getBundles() != null) {
+            for (BundleInfo bundle : feature.getBundles()) {
+                result.add(bundle.getLocation());
+            }
+        }
+        return result;
+    }
+
+    /*
      * Validate if all features in a repository have bundles which can be resolved
      */
     private void validateImportsExports(Repository repository) throws ArtifactResolutionException,
ArtifactNotFoundException, Exception {
@@ -319,7 +333,7 @@ public class ValidateFeaturesMojo extend
                 validateImportsExports(features.get(dependency.getName(), dependency.getVersion()));
             }
         }
-        for (String bundle : feature.getBundles()) {
+        for (String bundle : getBundleLocations(feature)) {
             Manifest meta = manifests.get(bundles.get(bundle));
             exports.addAll(getExports(meta));
             for (Clause clause : getMandatoryImports(meta)) {

Modified: karaf/trunk/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
URL: http://svn.apache.org/viewvc/karaf/trunk/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java?rev=960124&r1=960123&r2=960124&view=diff
==============================================================================
--- karaf/trunk/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
(original)
+++ karaf/trunk/webconsole/features/src/main/java/org/apache/karaf/webconsole/features/ExtendedFeature.java
Fri Jul  2 22:13:16 2010
@@ -20,6 +20,7 @@ package org.apache.karaf.webconsole.feat
 import java.util.List;
 import java.util.Map;
 
+import org.apache.karaf.features.BundleInfo;
 import org.apache.karaf.features.Feature;
 
 
@@ -64,7 +65,7 @@ public class ExtendedFeature implements 
     //
 
 
-    public List<String> getBundles()
+    public List<BundleInfo> getBundles()
     {
         return this.feature.getBundles();
     }



Mime
View raw message