incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1375126 - in /incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report: EasyAntReport.java ImportedModuleReport.java
Date Mon, 20 Aug 2012 17:33:52 GMT
Author: jlboudart
Date: Mon Aug 20 17:33:51 2012
New Revision: 1375126

URL: http://svn.apache.org/viewvc?rev=1375126&view=rev
Log:
Make EasyAntReport.getImportedModule method recursive (remember that buildtype import/include
plugins)

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/report/ImportedModuleReport.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=1375126&r1=1375125&r2=1375126&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
Mon Aug 20 17:33:51 2012
@@ -217,16 +217,22 @@ public class EasyAntReport {
         }
         ImportedModuleReport retVal = null;
         for(ImportedModuleReport moduleRep : importedModuleReports) {
-            if(moduleRep.moduleMrid.startsWith(module)) {
+            if(moduleRep.moduleMrid != null && moduleRep.moduleMrid.startsWith(module))
{
                 retVal = moduleRep;
                 break;
-            } else if (module.equals(moduleRep.getModule())) {
+            } else if (module.equals(moduleRep.getModuleRevisionId().getName())) {
                 retVal = moduleRep;
                 break;
             } else if(moduleRep.as != null && moduleRep.as.equals(module)) {
                 retVal = moduleRep;
                 break;
             }
+            if (moduleRep.getEasyantReport() != null) {
+                retVal = moduleRep.getEasyantReport().getImportedModuleReport(module);
+                if (retVal != null) {
+                    break;
+                }
+            }
         }
         return retVal;
     }

Modified: incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/ImportedModuleReport.java
URL: http://svn.apache.org/viewvc/incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/ImportedModuleReport.java?rev=1375126&r1=1375125&r2=1375126&view=diff
==============================================================================
--- incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/ImportedModuleReport.java
(original)
+++ incubator/easyant/core/trunk/src/main/java/org/apache/easyant/core/report/ImportedModuleReport.java
Mon Aug 20 17:33:51 2012
@@ -58,6 +58,10 @@ public class ImportedModuleReport {
         return moduleMrid != null ? moduleMrid : ModuleRevisionId.newInstance(
                 organisation, module, revision).toString();
     }
+    
+    public ModuleRevisionId getModuleRevisionId() {
+        return ModuleRevisionId.parse(getModuleMrid());
+    }
 
     public void setModuleMrid(String moduleMrid) {
         this.moduleMrid = moduleMrid;



Mime
View raw message