[jira] Updated: (IVY-904) support ant properties propagation to ant build with ant-build trigger

2008-09-15 Thread Xavier Hanin (JIRA)

 [ 
https://issues.apache.org/jira/browse/IVY-904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xavier Hanin updated IVY-904:
-

Fix Version/s: (was: 2.0-RC1)

 support ant properties propagation to ant build with ant-build trigger
 --

 Key: IVY-904
 URL: https://issues.apache.org/jira/browse/IVY-904
 Project: Ivy
  Issue Type: Improvement
  Components: Ant
Affects Versions: 2.0-RC1
Reporter: Steve Benigan

 An ant-build trigger calls a target in an ant build file but does not 
 propogate properties to the ant build.
 ant-call does propogate them - well I'm not sure it's doing anything special 
 but b/c it's calling a target within the current ant build they are 
 propogated by the nature of ant.
 If possible, some ivy properties should be propogated such as the 
 ivy.cache.dir.${settingsRef} properties as well as all of the other 
 properties set in the current build due to settings, resolve, etc.  
 Otherwise, the ant-build trigger is limited in what it can do based on the 
 context in which it was called.
 The workaround is to use ant-call and then within the called target use ant 
 task to call the desired target in an external ant file.  This is not ideal 
 since it means this target needs to be in every build file or at least in an 
 imported build file.
 PS This may be a Change Request rather than an actual bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (IVY-891) Change 'alwaysUseExactRevision' default value to false

2008-09-15 Thread Xavier Hanin (JIRA)

 [ 
https://issues.apache.org/jira/browse/IVY-891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xavier Hanin resolved IVY-891.
--

Resolution: Fixed

I've already implemented this, just forgot to mark it as resolved

 Change 'alwaysUseExactRevision' default value to false
 --

 Key: IVY-891
 URL: https://issues.apache.org/jira/browse/IVY-891
 Project: Ivy
  Issue Type: Improvement
Reporter: Xavier Hanin
Assignee: Xavier Hanin
 Fix For: 2.0-RC1


 As discussed on the mailing list, the default value for 
 alwaysUseExactRevision should be false rather than true

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



svn commit: r695371 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

2008-09-15 Thread bodewig
Author: bodewig
Date: Mon Sep 15 01:03:31 2008
New Revision: 695371

URL: http://svn.apache.org/viewvc?rev=695371view=rev
Log:
some more memoization.  try to ballance memory vs i/o costs.

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=695371r1=695370r2=695371view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Mon Sep 
15 01:03:31 2008
@@ -20,6 +20,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.ref.SoftReference;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -389,6 +390,13 @@
 private int maxLevelsOfSymlinks = MAX_LEVELS_OF_SYMLINKS;
 
 /**
+ * Temporary table to speed up checking of canonical file names.
+ *
+ * @since Ant 1.8.0
+ */
+private Map canonicalPathMap = new HashMap();
+
+/**
  * Sole constructor.
  */
 public DirectoryScanner() {
@@ -916,7 +924,7 @@
 File canonBase = null;
 if (basedir != null) {
 try {
-canonBase = basedir.getCanonicalFile();
+canonBase = getCanonicalFile(basedir);
 } catch (IOException ex) {
 throw new BuildException(ex);
 }
@@ -937,9 +945,9 @@
 // we need to double check.
 try {
 String path = (basedir == null)
-? myfile.getCanonicalPath()
+? getCanonicalPath(myfile)
 : FILE_UTILS.removeLeadingPath(canonBase,
-myfile.getCanonicalFile());
+ getCanonicalFile(myfile));
 if (!path.equals(currentelement) || ON_VMS) {
 myfile = findFile(basedir, currentelement, true);
 if (myfile != null  basedir != null) {
@@ -1604,13 +1612,20 @@
  * @since Ant 1.6
  */
 private String[] list(File file) {
-String[] files = (String[]) fileListMap.get(file);
+String[] files = null;
+SoftReference s = (SoftReference) fileListMap.get(file);
+if (s != null) {
+files = (String[]) s.get();
+if (files == null) {
+fileListMap.remove(file);
+}
+}
 if (files == null) {
 files = file.list();
 if (files != null) {
-fileListMap.put(file, files);
+fileListMap.put(file, new SoftReference(files));
 } else {
-fileListMap.put(file, NULL_FILE_LIST);
+fileListMap.put(file, new SoftReference(NULL_FILE_LIST));
 }
 } else if (files == NULL_FILE_LIST) {
 files = null;
@@ -1750,6 +1765,7 @@
  */
 private synchronized void clearCaches() {
 fileListMap.clear();
+canonicalPathMap.clear();
 includeNonPatterns.clear();
 excludeNonPatterns.clear();
 includePatterns = null;
@@ -1813,7 +1829,7 @@
 Stack s = (Stack) directoryNamesFollowed.clone();
 ArrayList files = new ArrayList();
 File f = FILE_UTILS.resolveFile(parent, dirName);
-String target = f.getCanonicalPath();
+String target = getCanonicalPath(f);
 files.add(target);
 
 String relPath = ;
@@ -1822,7 +1838,7 @@
 String dir = (String) s.pop();
 if (dirName.equals(dir)) {
 f = FILE_UTILS.resolveFile(parent, relPath + dir);
-files.add(f.getCanonicalPath());
+files.add(getCanonicalPath(f));
 if (CollectionUtils.frequency(files, target)
  maxLevelsOfSymlinks) {
 return true;
@@ -1838,4 +1854,36 @@
 }
 }
 
+/**
+ * Returns a cached canonical path for a given file or first
+ * obtains and adds it to the cache.
+ *
+ * @since Ant 1.8.0
+ */
+private String getCanonicalPath(File file) throws IOException {
+String path = null;
+SoftReference s = (SoftReference) canonicalPathMap.get(file);
+if (s != null) {
+path = (String) s.get();
+if (path == null) {
+canonicalPathMap.remove(file);
+}
+}
+if (path == null) {
+path = file.getCanonicalPath();
+canonicalPathMap.put(file, new SoftReference(path));
+}
+

svn commit: r695380 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

2008-09-15 Thread bodewig
Author: bodewig
Date: Mon Sep 15 01:30:43 2008
New Revision: 695380

URL: http://svn.apache.org/viewvc?rev=695380view=rev
Log:
whitespace

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=695380r1=695379r2=695380view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Mon Sep 
15 01:30:43 2008
@@ -1359,8 +1359,9 @@
 name = (name.endsWith(File.separator)) ? name : name + File.separator;
 for (int i = 0; i  excludes.length; i++) {
 String e = excludes[i];
-if (e.endsWith(SelectorUtils.DEEP_TREE_MATCH)  
SelectorUtils.matchPath(
-e.substring(0, e.length() - 2), name, isCaseSensitive())) {
+if (e.endsWith(SelectorUtils.DEEP_TREE_MATCH)
+ SelectorUtils.matchPath(e.substring(0, e.length() - 2),
+   name, isCaseSensitive())) {
 return true;
 }
 }




svn commit: r695389 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

2008-09-15 Thread bodewig
Author: bodewig
Date: Mon Sep 15 02:12:40 2008
New Revision: 695389

URL: http://svn.apache.org/viewvc?rev=695389view=rev
Log:
tiny optimization

Modified:
ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=695389r1=695388r2=695389view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Mon Sep 
15 02:12:40 2008
@@ -1850,8 +1850,9 @@
 if (dirName.equals(dir)) {
 f = FILE_UTILS.resolveFile(parent, relPath + dir);
 files.add(getCanonicalPath(f));
-if (CollectionUtils.frequency(files, target)
- maxLevelsOfSymlinks) {
+if (files.size()  maxLevelsOfSymlinks
+ CollectionUtils.frequency(files, target)
+  maxLevelsOfSymlinks) {
 return true;
 }
 }




svn commit: r695390 - in /ant/ivy/core/trunk/src/java/org/apache/ivy: core/cache/ plugins/parser/m2/ plugins/repository/sftp/ plugins/repository/url/ plugins/resolver/ util/ util/url/

2008-09-15 Thread xavier
Author: xavier
Date: Mon Sep 15 02:17:13 2008
New Revision: 695390

URL: http://svn.apache.org/viewvc?rev=695390view=rev
Log:
fix style

Modified:

ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java

ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java

ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ParserSettingsMonitor.java

ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java

ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java

ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java

ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/RepositoryResolver.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/ConfigurationUtils.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/AbstractURLHandler.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandler.java
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java?rev=695390r1=695389r2=695390view=diff
==
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
 (original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
 Mon Sep 15 02:17:13 2008
@@ -19,7 +19,6 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.net.MalformedURLException;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.Map;
@@ -238,7 +237,7 @@
 }
 
 public ModuleDescriptorMemoryCache getMemoryCache() {
-if (memoryModuleDescrCache==null) {
+if (memoryModuleDescrCache == null) {
 memoryModuleDescrCache = new 
ModuleDescriptorMemoryCache(DEFAULT_MEMORY_CACHE_SIZE);
 }
 return memoryModuleDescrCache;
@@ -637,7 +636,7 @@
 
 private ModuleDescriptor getMdFromCache(XmlModuleDescriptorParser 
mdParser, 
 CacheMetadataOptions options, File ivyFile) 
-throws ParseException, IOException, MalformedURLException {
+throws ParseException, IOException {
 ModuleDescriptorMemoryCache cache = getMemoryCache();
 ModuleDescriptorProvider mdProvider = new 
MyModuleDescriptorProvider(mdParser); 
 return cache.get(ivyFile, settings, options.isValidate(), mdProvider);
@@ -645,7 +644,7 @@
 
 private ModuleDescriptor getStaledMd(ModuleDescriptorParser mdParser, 
 CacheMetadataOptions options, File ivyFile) 
-throws ParseException, IOException, MalformedURLException {
+throws ParseException, IOException {
 ModuleDescriptorMemoryCache cache = getMemoryCache();
 ModuleDescriptorProvider mdProvider = new 
MyModuleDescriptorProvider(mdParser); 
 return cache.getStale(ivyFile, settings, options.isValidate(), 
mdProvider);

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java?rev=695390r1=695389r2=695390view=diff
==
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
 (original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCache.java
 Mon Sep 15 02:17:13 2008
@@ -53,7 +53,7 @@
 ModuleDescriptorProvider mdProvider) throws ParseException, 
IOException {
 
 ModuleDescriptor descriptor = getFromCache(ivyFile, ivySettings, 
validated);
-if (descriptor==null) {
+if (descriptor == null) {
 descriptor = getStale(ivyFile, ivySettings, validated, mdProvider);
 }
 return descriptor;
@@ -72,15 +72,15 @@
 }
 
 ModuleDescriptor getFromCache(File ivyFile, ParserSettings ivySettings, 
boolean validated) {
-if (maxSize=0) {
+if (maxSize = 0) {
 //cache is disbaled
 return null;
 }
 CacheEntry entry = (CacheEntry) valueMap.get(ivyFile);
-if (entry!=null) {
+if (entry != null) {
 if (entry.isStale(validated, ivySettings)) {
-Message.debug(Entry is found in the ModuleDescriptorCache but 
entry should be  +
-reevaluated :  + ivyFile);
+Message.debug(Entry is found in the ModuleDescriptorCache but 
entry should be  
++ reevaluated :  + ivyFile);
 valueMap.remove(ivyFile);
 return null;

svn commit: r695405 - in /ant/ivy/core/trunk: CHANGES.txt build.xml

2008-09-15 Thread gscokart
Author: gscokart
Date: Mon Sep 15 02:59:23 2008
New Revision: 695405

URL: http://svn.apache.org/viewvc?rev=695405view=rev
Log:
IMPROVEMENT: Additional descriptions of build.xml targets (IVY-499)

Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/build.xml

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=695405r1=695404r2=695405view=diff
==
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Sep 15 02:59:23 2008
@@ -111,6 +111,7 @@
 - IMPROVEMENT: Give the possibility to not compute ivy.deps.changed (IVY-876)
 - IMPROVEMENT: Add a memory cache for the module descriptor that are parsed 
from the cache (IVY-883)
 - IMPROVEMENT: Improve performance (IVY-872)
+- IMPROVEMENT: Additional descriptions of build.xml targets (IVY-499)
 
 - FIX: Publish Ant Task 'warnonmissing' ignored (IVY-867)
 - FIX: Ivy stand-alone ignores -cache argument (IVY-901) (thanks to Chris)

Modified: ant/ivy/core/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/build.xml?rev=695405r1=695404r2=695405view=diff
==
--- ant/ivy/core/trunk/build.xml (original)
+++ ant/ivy/core/trunk/build.xml Mon Sep 15 02:59:23 2008
@@ -116,7 +116,7 @@
mkdir dir=${ivy.report.dir} /
 /target
 
-target name=clean
+target name=clean description=delete all generated files keeping 
sources only
 delete dir=${classes.build.dir} /
 delete dir=${test.build.dir} /
 delete dir=${artifacts.build.dir} /