incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1382148 - /incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
Date Fri, 07 Sep 2012 20:10:48 GMT
Author: jlboudart
Date: Fri Sep  7 20:10:48 2012
New Revision: 1382148

URL: http://svn.apache.org/viewvc?rev=1382148&view=rev
Log:
Update mandatory attributes on PluginReport

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

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java?rev=1382148&r1=1382147&r2=1382148&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/tasks/PluginReport.java
Fri Sep  7 20:10:48 2012
@@ -64,18 +64,18 @@ public class PluginReport extends Abstra
 
     private List<XSLTProcess.Param> params = new ArrayList<XSLTProcess.Param>();
 
-    private File moduleIvyFile;
+    private File moduleIvy;
 
     private File sourceDirectory;
 
     private String outputpattern;
 
-    public File getModuleIvyFile() {
-        return moduleIvyFile;
+    public File getModuleIvy() {
+        return moduleIvy;
     }
 
-    public void setModuleIvyFile(File moduleIvyFile) {
-        this.moduleIvyFile = moduleIvyFile;
+    public void setModuleIvy(File moduleIvy) {
+        this.moduleIvy = moduleIvy;
     }
 
     public File getSourceDirectory() {
@@ -128,7 +128,12 @@ public class PluginReport extends Abstra
 
     public void execute() throws BuildException {
         IvySettings settings = getEasyAntIvyInstance().getSettings();
-
+        if (moduleIvy == null || ! moduleIvy.exists()) {
+            throw new BuildException("moduleIvy attribute is not set or is not a file");
+        }
+        if (sourceDirectory == null || !  sourceDirectory.exists()) {
+            throw new BuildException("sourceDirectory attribute is not set or doesn't exists");
+        }
         conf = getProperty(conf, settings, "ivy.resolved.configurations");
         if ("*".equals(conf)) {
             conf = getProperty(settings, "ivy.resolved.configurations");
@@ -162,7 +167,7 @@ public class PluginReport extends Abstra
                 EasyAntMagicNames.PLUGIN_SERVICE_INSTANCE);
 
         try {
-            EasyAntReport easyantReport = pluginService.getPluginInfo(moduleIvyFile, sourceDirectory,
conf);
+            EasyAntReport easyantReport = pluginService.getPluginInfo(moduleIvy, sourceDirectory,
conf);
             ModuleRevisionId moduleRevisionId = easyantReport.getModuleDescriptor().getModuleRevisionId();
             File reportFile = new File(todir, getOutputPattern(moduleRevisionId, conf, "xml"));
             todir.mkdirs();



Mime
View raw message