svn commit: r705626 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml docs/manual/CoreTasks/concat.html src/main/org/apache/tools/ant/taskdefs/Concat.java src/tests/antunit/taskdefs/concat-

2008-10-17 Thread bodewig
Author: bodewig
Date: Fri Oct 17 07:16:26 2008
New Revision: 705626

URL: http://svn.apache.org/viewvc?rev=705626view=rev
Log:
allow control over whether concat creates a file when there are no resources. 
 Submitted by Mark Salter.  PR 46010.

Modified:
ant/core/trunk/CONTRIBUTORS
ant/core/trunk/WHATSNEW
ant/core/trunk/contributors.xml
ant/core/trunk/docs/manual/CoreTasks/concat.html
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
ant/core/trunk/src/tests/antunit/taskdefs/concat-test.xml

Modified: ant/core/trunk/CONTRIBUTORS
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=705626r1=705625r2=705626view=diff
==
Binary files - no diff available.

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=705626r1=705625r2=705626view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Oct 17 07:16:26 2008
@@ -463,6 +463,12 @@
  * cvs and friends now support modules with spaces in their names
via nested module elements.
 
+ * A new attribute ignoreEmpty controls how concat deals when
+   there are no resources to concatenate.  If it is set to false, the
+   destination file will be created regardless, which reinstates the
+   behavior of Ant 1.7.0.
+   Bugzilla Report 46010.
+
 Changes from Ant 1.7.0 TO Ant 1.7.1
 =
 

Modified: ant/core/trunk/contributors.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=705626r1=705625r2=705626view=diff
==
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Fri Oct 17 07:16:26 2008
@@ -704,7 +704,7 @@
   /name
   name
 firstMarcus/first
-lastBamp;ouml;rger/last
+lastBörger/last
   /name
   name
 firstMario/first
@@ -720,6 +720,10 @@
   /name
   name
 firstMark/first
+lastSalter/last
+  /name
+  name
+firstMark/first
 middleR./middle
 lastDiggory/last
   /name

Modified: ant/core/trunk/docs/manual/CoreTasks/concat.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/concat.html?rev=705626r1=705625r2=705626view=diff
==
--- ant/core/trunk/docs/manual/CoreTasks/concat.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/concat.html Fri Oct 17 07:16:26 2008
@@ -32,7 +32,8 @@
 Concatenates one or more 
 a href=../CoreTypes/resources.htmlresource/as
 to a single file or to the console. The destination
-file will be created if it does not exist.
+file will be created if it does not exist unless the resource
+list is empty and ignoreempty is true.
   /p
 
   pstrongSince Ant 1.7.1/strong, this task can be used as a
@@ -158,7 +159,17 @@
 set, and the task cannot used nested text.
 Also the attributes encoding, outputencoding, filelastline
 cannot be used.
-The default is false.
+The default is quot;falsequot;.
+  /td
+  td valign=top align=centerNo/td
+/tr
+tr
+  td valign=topignoreempty/td
+  td valign=top
+  emSince Ant 1.8.0/em
+Specifies whether or not the file specified by 'destfile'
+should be created if the source resource list is
+empty. Defaults to quot;truequot;.
   /td
   td valign=top align=centerNo/td
 /tr

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java?rev=705626r1=705625r2=705626view=diff
==
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java Fri Oct 
17 07:16:26 2008
@@ -479,6 +479,9 @@
 private String eolString;
 /** outputwriter */
 private Writer outputWriter = null;
+/** whether to not create destinationfile if no source files are
+ * available */
+private boolean ignoreEmpty = true;
 
 private ReaderFactory resourceReaderFactory  = new ReaderFactory() {
 public Reader getReader(Object o) throws IOException {
@@ -520,6 +523,7 @@
 textBuffer = null;
 eolString = StringUtils.LINE_SEP;
 rc = null;
+ignoreEmpty = true;
 }
 
 // Attribute setters.
@@ -574,6 +578,17 @@
 this.forceOverwrite = force;
 }
 
+/**
+ * Sets the behavior when no source resource files are available. If set to
+ * codefalse/code the destination file will always be created.
+ * 

DO NOT REPLY [Bug 46010] Concat no longer builds a target file if no source files are found.

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46010


Stefan Bodewig [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.8.0




--- Comment #11 from Stefan Bodewig [EMAIL PROTECTED]  2008-10-17 07:16:42 
PST ---
I've used ignoreEmpty with reversed meaning (and reversed default) and turned
the JUnit tests into AntUnit tests with svn revision 705626.

Thanks!


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


DO NOT REPLY [Bug 45499] DirectoryScanner infinitely recurses on symlinks to parent directories

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #15 from Stefan Bodewig [EMAIL PROTECTED]  2008-10-17 07:24:23 
PST ---
you see the different JDKs because one of your symlinks is pointing to a parent
directory of all your JDKs, namely the one that holds the Versions directory
which again makes Ant traverse into all your JDKs.

I guess it is not so much a problem of an infinite loop but more one of getting
a path that is incredibly big in the end and eating all your memory.

Could you perform a run with MAX_LEVELS set to 1 and run it with -debug so I
stand a chance of seeing which DirectoryScanner is going into that path and
why?

The defintion of the javac task of your buildfile would help as well.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


DO NOT REPLY [Bug 27419] [PATCH] Add support for rlog and tag ranges to CvsChangeLog

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=27419





--- Comment #8 from Stefan Bodewig [EMAIL PROTECTED]  2008-10-17 08:17:43 PST 
---
rlog went in with svn revision 705639, I'll look into tags later.

It is no surprise that I had to adjust a few things with a patch four and a
half years old.  Many thanks!


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


DO NOT REPLY [Bug 27419] [PATCH] Add support for rlog and tag ranges to CvsChangeLog

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=27419


Stefan Bodewig [EMAIL PROTECTED] changed:

   What|Removed |Added

   Target Milestone|--- |1.8.0




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


svn commit: r705639 - in /ant/core/trunk: ./ docs/manual/CoreTasks/ src/main/org/apache/tools/ant/taskdefs/cvslib/ src/main/org/apache/tools/ant/util/ src/tests/antunit/taskdefs/cvs/ src/tests/antunit

2008-10-17 Thread bodewig
Author: bodewig
Date: Fri Oct 17 08:16:28 2008
New Revision: 705639

URL: http://svn.apache.org/viewvc?rev=705639view=rev
Log:
add remote option to use rlog instead of log to cvschangelog.  Submitted by Rob 
van Oostrum.  PR 27419.

Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/docs/manual/CoreTasks/changelog.html

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
ant/core/trunk/src/main/org/apache/tools/ant/util/CollectionUtils.java
ant/core/trunk/src/tests/antunit/taskdefs/cvs/cvs.xml
ant/core/trunk/src/tests/antunit/taskdefs/cvs/repository/CVSROOT/history

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=705639r1=705638r2=705639view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Oct 17 08:16:28 2008
@@ -469,6 +469,10 @@
behavior of Ant 1.7.0.
Bugzilla Report 46010.
 
+ * If the new remote attribute is set to true, cvschangelog can now
+   work against a remote repository without any working copy.
+   Bugzilla Report 27419.
+
 Changes from Ant 1.7.0 TO Ant 1.7.1
 =
 

Modified: ant/core/trunk/docs/manual/CoreTasks/changelog.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/changelog.html?rev=705639r1=705638r2=705639view=diff
==
--- ant/core/trunk/docs/manual/CoreTasks/changelog.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/changelog.html Fri Oct 17 08:16:28 2008
@@ -125,6 +125,13 @@
  included in the report./td
 td align=center valign=topNo/td
   /tr
+  tr
+td valign=topremote/td
+td valign=topIf set to true, works against the repository
+  (using rlog) without a working copy.  Default is
+  false.  emSince Ant 1.8.0/em/td
+td align=center valign=topNo/td
+  /tr
 /table
 
 h3Parameters specified as nested elements/h3

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java?rev=705639r1=705638r2=705639view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
 Fri Oct 17 08:16:28 2008
@@ -22,8 +22,12 @@
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Locale;
 import java.util.TimeZone;
+import org.apache.tools.ant.taskdefs.AbstractCvsTask;
+import org.apache.tools.ant.util.CollectionUtils;
 
 /**
  * A class used to parse the output of the CVS log command.
@@ -67,6 +71,30 @@
 /** rcs entries */
 private final Hashtable entries = new Hashtable();
 
+private final boolean remote;
+private final String[] moduleNames;
+private final int[] moduleNameLengths;
+
+public ChangeLogParser() {
+this(false, , CollectionUtils.EMPTY_LIST);
+}
+
+public ChangeLogParser(boolean remote, String packageName, List modules) {
+this.remote = remote;
+moduleNames = new String[modules.size() + (packageName == null ? 0 : 
1)];
+moduleNameLengths = new int[moduleNames.length];
+int i = 0;
+if (packageName != null) {
+moduleNames[i] = packageName;
+moduleNameLengths[i++] = packageName.length();
+}
+for (Iterator iter = modules.iterator(); iter.hasNext(); i++) {
+AbstractCvsTask.Module m = (AbstractCvsTask.Module) iter.next();
+moduleNames[i] = m.getName();
+moduleNameLengths[i] = moduleNames[i].length();
+}
+}
+
 /**
  * Get a list of rcs entries as an array.
  *
@@ -148,11 +176,29 @@
  * @param line the line to process
  */
 private void processFile(final String line) {
-if (line.startsWith(Working file:)) {
+if (!remote  line.startsWith(Working file:)) {
 // CheckStyle:MagicNumber OFF
 file = line.substring(14, line.length());
 // CheckStyle:MagicNumber ON
 status = GET_REVISION;
+} else if (remote  line.startsWith(RCS file:)) {
+// exclude the part of the RCS filename up to and
+// including the module name (and the path separator)
+int startOfFileName = 0;
+for (int i = 0; i  moduleNames.length; i++) {
+int index = line.indexOf(moduleNames[i]);
+if (index = 0) {
+startOfFileName = index + moduleNameLengths[i] + 1;
+

svn commit: r705646 - in /ant/core/trunk: ./ docs/manual/CoreTasks/ src/main/org/apache/tools/ant/taskdefs/cvslib/ src/tests/antunit/taskdefs/cvs/ src/tests/antunit/taskdefs/cvs/repository/CVSROOT/ sr

2008-10-17 Thread bodewig
Author: bodewig
Date: Fri Oct 17 08:49:19 2008
New Revision: 705646

URL: http://svn.apache.org/viewvc?rev=705646view=rev
Log:
support for CVS tags as start/end in cvcchangelog.  Submitted by Rob van 
Oostrum.  PR 27419.

Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/docs/manual/CoreTasks/changelog.html

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
ant/core/trunk/src/tests/antunit/taskdefs/cvs/cvs.xml
ant/core/trunk/src/tests/antunit/taskdefs/cvs/repository/CVSROOT/history
ant/core/trunk/src/tests/antunit/taskdefs/cvs/repository/CVSROOT/val-tags
ant/core/trunk/src/tests/antunit/taskdefs/cvs/repository/antmodule3/yet 
another test.txt,v

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=705646r1=705645r2=705646view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Oct 17 08:49:19 2008
@@ -473,6 +473,10 @@
work against a remote repository without any working copy.
Bugzilla Report 27419.
 
+ * start and end tags can now be used instead of dates in
+   cvschangelog.
+   Bugzilla Report 27419.
+
 Changes from Ant 1.7.0 TO Ant 1.7.1
 =
 

Modified: ant/core/trunk/docs/manual/CoreTasks/changelog.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/changelog.html?rev=705646r1=705645r2=705646view=diff
==
--- ant/core/trunk/docs/manual/CoreTasks/changelog.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/changelog.html Fri Oct 17 08:49:19 2008
@@ -132,6 +132,23 @@
   false.  emSince Ant 1.8.0/em/td
 td align=center valign=topNo/td
   /tr
+  tr
+td valign=topstartTag/td
+td valign=topThe start of a tag range. If endTag is also
+  specified, they must both be on the same branch. If endTag is not
+  specified, the end of the range will be the latest on the same
+  branch on which startTag lives.  emSince Ant 1.8.0/em/td
+td align=center valign=topNo/td
+  /tr
+  tr
+td valign=topendTag/td
+td valign=topThe end of a tag range. If startTag is also
+ specified, they must both be on the same branch. If startTag is
+ not specified, the start of the range will be the top of the
+ branch on which endTag lives./td  included in the report.
+emSince Ant 1.8.0/em/td
+td align=center valign=topNo/td
+  /tr
 /table
 
 h3Parameters specified as nested elements/h3

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java?rev=705646r1=705645r2=705646view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java 
(original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java 
Fri Oct 17 08:49:19 2008
@@ -98,6 +98,11 @@
 /** Determines whether log (false) or rlog (true) is used */
 private boolean remote = false;
 
+/** Start tag when doing tag ranges. */
+private String startTag;
+
+/** End tag when doing tag ranges. */
+private String endTag;
 
 /**
  * Filesets containing list of files against which the cvs log will be
@@ -192,6 +197,25 @@
 }
 
 /**
+ * Set the tag at which the changelog should start.
+ *
+ * @param start The date at which the changelog should start.
+ */
+public void setStartTag(final String start) {
+this.startTag = start;
+}
+
+
+/**
+ * Set the tag at which the changelog should stop.
+ *
+ * @param end The date at which the changelog should stop.
+ */
+public void setEndTag(final String end) {
+this.endTag = end;
+}
+
+/**
  * Adds a set of files about which cvs logs will be generated.
  *
  * @param fileSet a set of files about which cvs logs will be generated.
@@ -250,7 +274,12 @@
 // parse.
 addCommandArgument(-N);
 }
-if (null != startDate) {
+if (null != startTag || null != endTag) {
+// man, do I get spoiled by C#'s ?? operator
+String startValue = startTag == null ?  : startTag;
+String endValue = endTag == null ?  : endTag;
+addCommandArgument(-r + startValue + :: + endValue);
+} else if (null != startDate) {
 final SimpleDateFormat outputDate =
 new SimpleDateFormat(-MM-dd);
 
@@ -336,6 +365,12 @@
 
 throw new BuildException(message);
 }
+if ((null != startTag || null != endTag)
+ (null != startDate || null != endDate)) {
+final 

DO NOT REPLY [Bug 27419] [PATCH] Add support for rlog and tag ranges to CvsChangeLog

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=27419


Stefan Bodewig [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #9 from Stefan Bodewig [EMAIL PROTECTED]  2008-10-17 08:50:16 PST 
---
tags are in with svn revision 705646.

The startTag tests fail for me, but I guess this is more a sign of my CVS
knowledge becoming more than rusty.

Thanks again.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


svn commit: r705649 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java

2008-10-17 Thread bodewig
Author: bodewig
Date: Fri Oct 17 08:53:11 2008
New Revision: 705649

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

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java?rev=705649r1=705648r2=705649view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java 
(original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java 
Fri Oct 17 08:53:11 2008
@@ -248,21 +248,21 @@
 }
 
 if (!remote) {
-setCommand(log);
+setCommand(log);
 
-if (getTag() != null) {
-CvsVersion myCvsVersion = new CvsVersion();
-myCvsVersion.setProject(getProject());
-myCvsVersion.setTaskName(cvsversion);
-myCvsVersion.setCvsRoot(getCvsRoot());
-myCvsVersion.setCvsRsh(getCvsRsh());
-myCvsVersion.setPassfile(getPassFile());
-myCvsVersion.setDest(inputDir);
-myCvsVersion.execute();
-if (myCvsVersion.supportsCvsLogWithSOption()) {
-addCommandArgument(-S);
+if (getTag() != null) {
+CvsVersion myCvsVersion = new CvsVersion();
+myCvsVersion.setProject(getProject());
+myCvsVersion.setTaskName(cvsversion);
+myCvsVersion.setCvsRoot(getCvsRoot());
+myCvsVersion.setCvsRsh(getCvsRsh());
+myCvsVersion.setPassfile(getPassFile());
+myCvsVersion.setDest(inputDir);
+myCvsVersion.execute();
+if (myCvsVersion.supportsCvsLogWithSOption()) {
+addCommandArgument(-S);
+}
 }
-}
 } else {
 // supply 'rlog' as argument instead of command
 setCommand();




DO NOT REPLY [Bug 46034] New: [Main] Add support for build.ant as default build file

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46034

   Summary: [Main] Add support for build.ant as default build file
   Product: Ant
   Version: 1.7.1
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


In addition to build.xml, build.ant should also be recognized as a default
input file for ant if the -f switch is not used.

I will create a path for this proposal in a short while, however input is
desired if this is a good suggestion yes or no.

Cheers,

Remie


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 46034] [Main] Add support for build.ant as default build file

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46034





--- Comment #1 from Remie Bolte [EMAIL PROTECTED]  2008-10-17 08:58:15 PST ---
I will create a path for this proposal... should have been I will create a
patch for this proposal...


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[jira] Created: (IVY-948) cachefileset produces an empty fileset when the cache refers to libs in directories that only have the root directory in common

2008-10-17 Thread Chris Wood (JIRA)
cachefileset produces an empty fileset when the cache refers to libs in 
directories that only have the root directory in common
---

 Key: IVY-948
 URL: https://issues.apache.org/jira/browse/IVY-948
 Project: Ivy
  Issue Type: Bug
  Components: Ant
Affects Versions: 2.0-RC1
 Environment: All environments
Reporter: Chris Wood
Priority: Blocker


If the cache is made up of libs from different directories such that they can 
only be references from the root directory, the fileset contains paths with the 
first character missing.

And here's a fix:
In class org.apache.ivy.ant.IvyCacheFileset.getPath(final File base, final File 
file):

private String getPath(final File base, final File file) {
if(base.getAbsolutePath().equals(/)) {
return 
file.getAbsolutePath().substring(base.getAbsolutePath().length());
}
return file.getAbsolutePath().substring(base.getAbsolutePath().length() 
+ 1);
}

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



svn commit: r705768 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/ant/IvyCacheFileset.java

2008-10-17 Thread maartenc
Author: maartenc
Date: Fri Oct 17 14:55:13 2008
New Revision: 705768

URL: http://svn.apache.org/viewvc?rev=705768view=rev
Log:
FIX: cachefileset produces an empty fileset when the cache refers to libs in 
directories that only have the root directory in common (IVY-948) (thanks to 
Chris Wood)

Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=705768r1=705767r2=705768view=diff
==
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Fri Oct 17 14:55:13 2008
@@ -75,6 +75,7 @@
James P. White
Tom Widmer
John Williams
+Chris Wood
Patrick Woodworth
Jaroslaw Wypychowski

@@ -104,6 +105,7 @@
 - FIX: Can't use latest.release for pom dependencies (IVY-936)
 - FIX: Unable to resolve snapshot versions depending on xml elements order 
(IVY-940)
 - FIX: pre-resolve-dependency event doesn't export branch information 
(IVY-941) (thanks to Jaroslaw Wypychowski)
+- FIX: cachefileset produces an empty fileset when the cache refers to libs in 
directories that only have the root directory in common (IVY-948) (thanks to 
Chris Wood)
 
2.0.0-rc1
 =

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java?rev=705768r1=705767r2=705768view=diff
==
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java Fri Oct 
17 14:55:13 2008
@@ -78,7 +78,7 @@
 for (Iterator iter = paths.iterator(); iter.hasNext();) {
 ArtifactDownloadReport a = (ArtifactDownloadReport) 
iter.next();
 if (a.getLocalFile() != null) {
-NameEntry ne = fileset.createInclude();
+NameEntry ne = fileset. createInclude();
 ne.setName(getPath(base, a.getLocalFile()));
 }
 }
@@ -93,10 +93,20 @@
  * 
  * @param base the parent directory to which the file must be evaluated.
  * @param file the file for which the path should be returned
- * @returnthe path of the file relative to the given base directory.
+ * @return the path of the file relative to the given base directory.
  */
 private String getPath(File base, File file) {
-return 
file.getAbsolutePath().substring(base.getAbsolutePath().length() + 1);
+String absoluteBasePath = base.getAbsolutePath();
+
+int beginIndex = absoluteBasePath.length();
+
+// checks if the basePath ends with the file separator (which can for 
instance
+// happen if the basePath is the root on unix)
+if (!absoluteBasePath.endsWith(File.separator)) {
+beginIndex++; // skip the seperator char as well
+}
+
+return file.getAbsolutePath().substring(beginIndex);
 }
 
 /**




[jira] Resolved: (IVY-948) cachefileset produces an empty fileset when the cache refers to libs in directories that only have the root directory in common

2008-10-17 Thread Maarten Coene (JIRA)

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

Maarten Coene resolved IVY-948.
---

   Resolution: Fixed
Fix Version/s: trunk
 Assignee: Maarten Coene

Thanks for your contribution.

I've applied a fix into SVN trunk.
Please verify if it's working for you.

 cachefileset produces an empty fileset when the cache refers to libs in 
 directories that only have the root directory in common
 ---

 Key: IVY-948
 URL: https://issues.apache.org/jira/browse/IVY-948
 Project: Ivy
  Issue Type: Bug
  Components: Ant
Affects Versions: 2.0-RC1
 Environment: All environments
Reporter: Chris Wood
Assignee: Maarten Coene
Priority: Blocker
 Fix For: trunk


 If the cache is made up of libs from different directories such that they can 
 only be references from the root directory, the fileset contains paths with 
 the first character missing.
 And here's a fix:
 In class org.apache.ivy.ant.IvyCacheFileset.getPath(final File base, final 
 File file):
 private String getPath(final File base, final File file) {
 if(base.getAbsolutePath().equals(/)) {
 return 
 file.getAbsolutePath().substring(base.getAbsolutePath().length());
 }
 return 
 file.getAbsolutePath().substring(base.getAbsolutePath().length() + 1);
 }

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



svn commit: r705769 - /ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java

2008-10-17 Thread maartenc
Author: maartenc
Date: Fri Oct 17 14:58:23 2008
New Revision: 705769

URL: http://svn.apache.org/viewvc?rev=705769view=rev
Log:
Formatting correction

Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java?rev=705769r1=705768r2=705769view=diff
==
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCacheFileset.java Fri Oct 
17 14:58:23 2008
@@ -78,7 +78,7 @@
 for (Iterator iter = paths.iterator(); iter.hasNext();) {
 ArtifactDownloadReport a = (ArtifactDownloadReport) 
iter.next();
 if (a.getLocalFile() != null) {
-NameEntry ne = fileset. createInclude();
+NameEntry ne = fileset.createInclude();
 ne.setName(getPath(base, a.getLocalFile()));
 }
 }




DO NOT REPLY [Bug 45499] DirectoryScanner infinitely recurses on symlinks to parent directories

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #16 from Alvaro [EMAIL PROTECTED]  2008-10-17 15:05:01 PST ---
Created an attachment (id=22751)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=22751)
DWR2 build logs

Here I attach the logs of the compile process using debug logs (-d) and
MAX_LEVELS=1.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


DO NOT REPLY [Bug 45499] DirectoryScanner infinitely recurses on symlinks to parent directories

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #17 from Alvaro [EMAIL PROTECTED]  2008-10-17 15:07:35 PST ---
Created an attachment (id=22752)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=22752)
build.properties and build.xml compressed

Here I attach the build.properties and build.xml compressed in a zip file.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.


DO NOT REPLY [Bug 45499] DirectoryScanner infinitely recurses on symlinks to parent directories

2008-10-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #18 from Alvaro [EMAIL PROTECTED]  2008-10-17 15:11:01 PST ---
Hi Stefan:
I have attached the project compile task log (DWR2 build logs) and the
build.properties and build.xml in a compressed zip file  (build.properties and
build.xml compressed).

I think that can be more productive (and easy) if you can download the DWR2
project and try yourself, (only a comment) ;) , help you is my pleasure.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.