ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject git commit: getModuleDescriptorParser now takes a file as argument. Currently ivy use XmlModuleDescriptorParser in DefaultResolutionCacheManager and DefaultRepositoryCacheManager by default like in previous versions
Date Thu, 03 Jul 2014 18:26:28 GMT
Repository: ant-ivy
Updated Branches:
  refs/heads/master 3076802a7 -> 5063d2562


getModuleDescriptorParser now takes a file as argument. Currently ivy use XmlModuleDescriptorParser
in DefaultResolutionCacheManager and DefaultRepositoryCacheManager by default like in previous
versions


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/5063d256
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/5063d256
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/5063d256

Branch: refs/heads/master
Commit: 5063d256221e7fe8a8c433401bea988d7ccb0a35
Parents: 3076802
Author: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Authored: Thu Jul 3 19:27:00 2014 +0200
Committer: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Committed: Thu Jul 3 19:27:00 2014 +0200

----------------------------------------------------------------------
 .../ivy/core/cache/DefaultRepositoryCacheManager.java    | 11 +++++++++--
 .../ivy/core/cache/DefaultResolutionCacheManager.java    | 11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/5063d256/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
index b9439a4..55f498d 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -722,7 +722,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager,
Iv
             if (ivyFile.exists()) {
                 // found in cache !
                 try {
-                    ModuleDescriptorParser parser = getModuleDescriptorParser();
+                    ModuleDescriptorParser parser = getModuleDescriptorParser(ivyFile);
                     ModuleDescriptor depMD = getMdFromCache(parser, options, ivyFile);
                     String resolverName = getSavedResolverName(depMD);
                     String artResolverName = getSavedArtResolverName(depMD);
@@ -790,7 +790,14 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager,
Iv
         return null;
     }
 
-    protected ModuleDescriptorParser getModuleDescriptorParser() {
+    /**
+     * Choose write module descriptor parser for a given moduleDescriptor
+     * 
+     * @param moduleDescriptorFile
+     *            a given module descriptor
+     * @return
+     */
+    protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile)
{
         return XmlModuleDescriptorParser.getInstance();
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/5063d256/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
index 5ad338c..2683702 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
@@ -155,10 +155,17 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager,
Iv
         ParserSettings pSettings = new CacheParserSettings(settings, paths);
 
         URL ivyFileURL = ivyFile.toURI().toURL();
-        return getModuleDescriptorParser().parseDescriptor(pSettings, ivyFileURL, false);
+        return getModuleDescriptorParser(ivyFile).parseDescriptor(pSettings, ivyFileURL,
false);
     }
 
-    protected ModuleDescriptorParser getModuleDescriptorParser() {
+    /**
+     * Choose write module descriptor parser for a given moduleDescriptor
+     * 
+     * @param moduleDescriptorFile
+     *            a given module descriptor
+     * @return
+     */
+    protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile)
{
         return XmlModuleDescriptorParser.getInstance();
     }
 


Mime
View raw message