incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1373013 - in /incubator/easyant/core/trunk/src/main/java/org/apache/easyant: core/EasyAntEngine.java tasks/ConfigureEasyAntIvyInstance.java
Date Tue, 14 Aug 2012 18:39:31 GMT
Author: jlboudart
Date: Tue Aug 14 18:39:31 2012
New Revision: 1373013

URL: http://svn.apache.org/viewvc?rev=1373013&view=rev
Log:
ConfigureEasyantIvyInstance should also configure pluginservice

Modified:
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
    incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/ConfigureEasyAntIvyInstance.java

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java?rev=1373013&r1=1373012&r2=1373013&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/EasyAntEngine.java
Tue Aug 14 18:39:31 2012
@@ -263,7 +263,7 @@ public class EasyAntEngine {
         return path;
     }
 
-    protected void configurePluginService(Project project,
+    public void configurePluginService(Project project,
             Ivy easyantIvyInstance) {
         pluginService = new DefaultPluginServiceImpl(easyantIvyInstance);
         project.addReference(EasyAntMagicNames.PLUGIN_SERVICE_INSTANCE,

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/ConfigureEasyAntIvyInstance.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/ConfigureEasyAntIvyInstance.java?rev=1373013&r1=1373012&r2=1373013&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/ConfigureEasyAntIvyInstance.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/ConfigureEasyAntIvyInstance.java
Tue Aug 14 18:39:31 2012
@@ -25,12 +25,13 @@ import java.util.Set;
 import org.apache.easyant.core.EasyAntConfiguration;
 import org.apache.easyant.core.EasyAntEngine;
 import org.apache.easyant.core.factory.EasyantConfigurationFactory;
+import org.apache.ivy.Ivy;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
 
 /**
  * Configure easyant ivy instance in current project
- *
+ * 
  */
 public class ConfigureEasyAntIvyInstance extends Task {
     private EasyAntConfiguration easyantConfiguration = new EasyAntConfiguration();
@@ -38,33 +39,26 @@ public class ConfigureEasyAntIvyInstance
     @Override
     public void execute() throws BuildException {
         EasyAntEngine eaEngine = new EasyAntEngine(getEasyantConfiguration());
-        eaEngine.configureEasyAntIvyInstance(getProject());
+        Ivy easyantIvyInstance = eaEngine.configureEasyAntIvyInstance(getProject());
+        eaEngine.configurePluginService(getProject(), easyantIvyInstance);
     }
 
     public void setConfigurationFile(String configurationFile) {
         File f = new File(configurationFile);
         try {
-            EasyantConfigurationFactory.getInstance()
-                    .createConfigurationFromFile(getEasyantConfiguration(),
-                            f.toURL());
+            EasyantConfigurationFactory.getInstance().createConfigurationFromFile(getEasyantConfiguration(),
f.toURL());
         } catch (Exception e) {
-            throw new BuildException(
-                    "Can't create easyantConfiguration from File "
-                            + configurationFile, e);
+            throw new BuildException("Can't create easyantConfiguration from File " + configurationFile,
e);
         }
     }
 
     public void setConfigurationUrl(String configurationUrl) {
         try {
             URL url = new URL(configurationUrl);
-            EasyantConfigurationFactory
-                    .getInstance()
-                    .createConfigurationFromFile(getEasyantConfiguration(), url);
+            EasyantConfigurationFactory.getInstance().createConfigurationFromFile(getEasyantConfiguration(),
url);
 
         } catch (Exception e) {
-            throw new BuildException(
-                    "Can't create easyantConfiguration from URL "
-                            + configurationUrl, e);
+            throw new BuildException("Can't create easyantConfiguration from URL " + configurationUrl,
e);
         }
     }
 
@@ -74,16 +68,14 @@ public class ConfigureEasyAntIvyInstance
         for (String conf : buildConfs) {
             buildConfigurations.add(conf);
         }
-        getEasyantConfiguration().setActiveBuildConfigurations(
-                buildConfigurations);
+        getEasyantConfiguration().setActiveBuildConfigurations(buildConfigurations);
     }
 
     public EasyAntConfiguration getEasyantConfiguration() {
         return easyantConfiguration;
     }
 
-    public void setEasyantConfiguration(
-            EasyAntConfiguration easyantConfiguration) {
+    public void setEasyantConfiguration(EasyAntConfiguration easyantConfiguration) {
         this.easyantConfiguration = easyantConfiguration;
     }
 



Mime
View raw message