incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1390737 - /incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/LoadModule.java
Date Wed, 26 Sep 2012 21:31:06 GMT
Author: jlboudart
Date: Wed Sep 26 21:31:06 2012
New Revision: 1390737

URL: http://svn.apache.org/viewvc?rev=1390737&view=rev
Log:
Make stuff loaded by LoadModule accessible by PluginService.
task needs to be added as child element of owning target
taskType is hardcoded as i have not found any methods to build it. ComponentHelper seems to
provide lot of useful methods but not that one.

I assume the way we initTask (see AbstractEasyantTask.initTask() method) is valid.
To our ant experts, please review this and tell us what we are doing wrong

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

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/LoadModule.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/LoadModule.java?rev=1390737&r1=1390736&r2=1390737&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/LoadModule.java (original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/LoadModule.java Wed
Sep 26 21:31:06 2012
@@ -277,12 +277,16 @@ public class LoadModule extends Abstract
                     propTask.setName(property.getName());
                     propTask.setValue(property.getValue());
                     propTask.setBuildConfigurations(property.getBuildConfigurations());
+                    propTask.setTaskType("antlib:org.apache.easyant:property");
+                    getOwningTarget().addTask(propTask);
                     initTask(propTask).execute();
                 }
             }
             if (md.getBuildType() != null) {
                 Import importTask = new Import();
                 importTask.setMrid(md.getBuildType());
+                importTask.setTaskType("antlib:org.apache.easyant:import");
+                getOwningTarget().addTask(importTask);
                 initTask(importTask).execute();
             }
             for (Iterator<?> iterator = md.getPlugins().iterator(); iterator.hasNext();)
{
@@ -298,6 +302,8 @@ public class LoadModule extends Abstract
                     importTask.setDependencies(plugin.getDependencies());
                     importTask.setConflicts(plugin.getConflicts());
                     importTask.setExcludes(plugin.getExcludes());
+                    importTask.setTaskType("antlib:org.apache.easyant:import");
+                    getOwningTarget().addTask(importTask);
                     initTask(importTask).execute();
                 }
             }



Mime
View raw message