incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1373138 - in /incubator/easyant/core/trunk/src/main/java/org/apache/easyant: core/report/EasyAntReport.java core/services/impl/DefaultPluginServiceImpl.java tasks/GoOffline.java
Date Tue, 14 Aug 2012 22:06:16 GMT
Author: jlboudart
Date: Tue Aug 14 22:06:16 2012
New Revision: 1373138

URL: http://svn.apache.org/viewvc?rev=1373138&view=rev
Log:
Enhance PluginService to expose resolve report, offline task can now retrieve plugin dependencies

Modified:
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/EasyAntReport.java
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/GoOffline.java

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/EasyAntReport.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/EasyAntReport.java?rev=1373138&r1=1373137&r2=1373138&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/EasyAntReport.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/EasyAntReport.java
Tue Aug 14 22:06:16 2012
@@ -418,6 +418,14 @@ public class EasyAntReport {
 
         return extensionPoints;
     }
+    
+    public ResolveReport getResolveReport() {
+        return resolveReport;
+    }
+
+    public void setResolveReport(ResolveReport resolveReport) {
+        this.resolveReport = resolveReport;
+    }
 
     /**
      * Get attached module descriptor

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java?rev=1373138&r1=1373137&r2=1373138&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/services/impl/DefaultPluginServiceImpl.java
Tue Aug 14 22:06:16 2012
@@ -113,6 +113,7 @@ public class DefaultPluginServiceImpl im
             ResolveReport report = IvyContext.getContext().getIvy().getResolveEngine()
                     .resolve(moduleRevisionId, resolveOptions, true);
             eaReport = new EasyAntReport();
+            eaReport.setResolveReport(report);
             eaReport.setModuleDescriptor(report.getModuleDescriptor());
             Map<String, String> properties = new HashMap<String, String>();
             File antFile = null;

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/GoOffline.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/GoOffline.java?rev=1373138&r1=1373137&r2=1373138&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/GoOffline.java (original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/GoOffline.java Tue
Aug 14 22:06:16 2012
@@ -18,6 +18,7 @@
 package org.apache.easyant.tasks;
 
 import java.io.File;
+import java.util.Iterator;
 
 import org.apache.easyant.core.EasyAntMagicNames;
 import org.apache.easyant.core.ivy.IvyInstanceHelper;
@@ -28,6 +29,8 @@ import org.apache.ivy.ant.IvyAntSettings
 import org.apache.ivy.ant.IvyInstall;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.core.resolve.IvyNode;
 import org.apache.tools.ant.BuildException;
 
 /**
@@ -96,8 +99,10 @@ public class GoOffline extends AbstractE
             install(ModuleRevisionId.parse(importedModule.getModuleMrid()),getEasyantResolverName(),EasyAntMagicNames.EASYANT_IVY_INSTANCE);
             if (importedModule.getEasyantReport() != null) {
                 //install module dependencies
-                for (DependencyDescriptor dependencyDescriptor : importedModule.getEasyantReport().getModuleDescriptor().getDependencies())
{
-                    install(dependencyDescriptor.getDependencyRevisionId(), getEasyantResolverName(),
+                ResolveReport resolveReport=importedModule.getEasyantReport().getResolveReport();
+                for (Iterator iterator = resolveReport.getDependencies().iterator(); iterator.hasNext();)
{
+                    IvyNode dependency = (IvyNode) iterator.next();
+                    install(dependency.getResolvedId(), getEasyantResolverName(),
                             EasyAntMagicNames.EASYANT_IVY_INSTANCE);
                 }
                 // install plugins declared inside current module



Mime
View raw message