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

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





--- Comment #5 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 00:50:38 PST 
---
Matt: yes, I think it is doable, even without too many or too big changes, but
we need to think through some scenarios first to decide what to do.  I'll take
that to the dev list later (after coding up some AntUnit tests as use cases).

Tim: hasBeenScanned only receives the relative path which will be different
each time the directory is encountered again.

I was thinking about a case where we have a structure like this

A/
|---> B/
  |-> C.txt
  D/
  |-> E (symlink pointing to A)

Let's say we set basedir to D and scan with an include pattern of E/B/C.txt -
should it match the file or should we skip going upwards (we wouldn't rescan D
since it isn't matched by an include pattern)?  I haven't checked, but we may
even get the file in fast mode and an infinite loop in slow mode (when the
client asks for the not-included files/dirs).

The good thing is that we don't need to think about backwards compatibility for
the cases where Ant could run into an infinite loop 8-)

Like I said, I'll move the discussion over to the dev list.


-- 
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: r691949 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 02:26:19 2008
New Revision: 691949

URL: http://svn.apache.org/viewvc?rev=691949&view=rev
Log:
initial tests for dirscanner behavior and symlinks

Added:
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml   (with 
props)

Added: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691949&view=auto
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 02:26:19 2008
@@ -0,0 +1,55 @@
+
+
+
+
+  
+
+  
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
+  
+
+
+
+  
+
+

Propchange: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
--
svn:eol-style = native




[jira] Resolved: (IVY-835) ant task downloads wrong jars from maven repositories

2008-09-04 Thread Erik-Berndt Scheper (JIRA)

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

Erik-Berndt Scheper resolved IVY-835.
-

Resolution: Cannot Reproduce

I have tried to reproduce this with the latest build from trunk, but can no 
longer reproduce this exact behaviour. I seem to remember the problem  was 
related to the artifact pattern, where I had forgotten to add a (-classifier). 

>  ant task downloads wrong jars from maven repositories
> ---
>
> Key: IVY-835
> URL: https://issues.apache.org/jira/browse/IVY-835
> Project: Ivy
>  Issue Type: Bug
>Affects Versions: 2.0-RC1
>Reporter: Erik-Berndt Scheper
>Priority: Critical
> Fix For: 2.0-RC1
>
>
> Using the latest build from trunk, which supports sources, javadoc and 
> distribution artifacts, wrong jars are downloaded from repo1.maven.org. 
> In the case below only spring-oxm-tiger-1.5.2-sources.jar is downloaded, 
> which is published as spring-oxm-1.5.2.jar (which should have been the 
> 'standard' jar containing classfiles.
> Sample output:
> {noformat}
> [ivy:install] :: downloading artifacts to cache ::
> [ivy:install] tried 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
>  ...
> [ivy:install] repo1.maven.org: downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] .. (8kB)
> [ivy:install] repo1.maven.org: downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar.sha1
> [ivy:install] .. (0kB)
> [ivy:install] sha1 OK for 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] [SUCCESSFUL ] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar(source) 
> (109ms)
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar(javadoc)
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-xml;1.5.2!spring-xml.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm;1.5.2!spring-oxm.jar
> [ivy:install] [NOT REQUIRED] 
> apache#commons-logging;1.1.1!commons-logging.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-core;2.5.4!spring-core.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-beans;2.5.4!spring-beans.jar
> [ivy:install] [NOT REQUIRED] 
> org.apache.ws.commons.schema#XmlSchema;1.3.2!XmlSchema.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-context;2.5.4!spring-context.jar
> [ivy:install] [NOT REQUIRED] 
> aopalliance#aopalliance;1.0!aopalliance.jar
> [ivy:install] [NOT REQUIRED] 
> com.thoughtworks.xstream#xstream;1.2.2!xstream.jar
> [ivy:install] [NOT REQUIRED] xpp3#xpp3_min;1.1.3.4.O!xpp3_min.jar
> {noformat}

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



[jira] Commented: (IVY-835) ant task downloads wrong jars from maven repositories

2008-09-04 Thread Erik-Berndt Scheper (JIRA)

[ 
https://issues.apache.org/jira/browse/IVY-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628287#action_12628287
 ] 

Erik-Berndt Scheper commented on IVY-835:
-

Possibly related issues that have recently been fixed:
* IVY-887 HelloWorld chainedresolvers tutorial broken on trunk
* IVY-325 declare source and javadoc artifacts in maven2 modules (SVN Rev  
689804, IbiblioResolver)


>  ant task downloads wrong jars from maven repositories
> ---
>
> Key: IVY-835
> URL: https://issues.apache.org/jira/browse/IVY-835
> Project: Ivy
>  Issue Type: Bug
>Affects Versions: 2.0-RC1
>Reporter: Erik-Berndt Scheper
>Priority: Critical
> Fix For: 2.0-RC1
>
>
> Using the latest build from trunk, which supports sources, javadoc and 
> distribution artifacts, wrong jars are downloaded from repo1.maven.org. 
> In the case below only spring-oxm-tiger-1.5.2-sources.jar is downloaded, 
> which is published as spring-oxm-1.5.2.jar (which should have been the 
> 'standard' jar containing classfiles.
> Sample output:
> {noformat}
> [ivy:install] :: downloading artifacts to cache ::
> [ivy:install] tried 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
>  ...
> [ivy:install] repo1.maven.org: downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] .. (8kB)
> [ivy:install] repo1.maven.org: downloading 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar.sha1
> [ivy:install] .. (0kB)
> [ivy:install] sha1 OK for 
> http://repo1.maven.org/maven2/org/springframework/ws/spring-oxm-tiger/1.5.2/spring-oxm-tiger-1.5.2-sources.jar
> [ivy:install] [SUCCESSFUL ] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar(source) 
> (109ms)
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm-tiger;1.5.2!spring-oxm-tiger.jar(javadoc)
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-xml;1.5.2!spring-xml.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework.ws#spring-oxm;1.5.2!spring-oxm.jar
> [ivy:install] [NOT REQUIRED] 
> apache#commons-logging;1.1.1!commons-logging.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-core;2.5.4!spring-core.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-beans;2.5.4!spring-beans.jar
> [ivy:install] [NOT REQUIRED] 
> org.apache.ws.commons.schema#XmlSchema;1.3.2!XmlSchema.jar
> [ivy:install] [NOT REQUIRED] 
> org.springframework#spring-context;2.5.4!spring-context.jar
> [ivy:install] [NOT REQUIRED] 
> aopalliance#aopalliance;1.0!aopalliance.jar
> [ivy:install] [NOT REQUIRED] 
> com.thoughtworks.xstream#xstream;1.2.2!xstream.jar
> [ivy:install] [NOT REQUIRED] xpp3#xpp3_min;1.1.3.4.O!xpp3_min.jar
> {noformat}

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



svn commit: r691954 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 02:55:46 2008
New Revision: 691954

URL: http://svn.apache.org/viewvc?rev=691954&view=rev
Log:
fix syntax

Modified:
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691954&r1=691953&r2=691954&view=diff
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 02:55:46 2008
@@ -28,20 +28,20 @@
 
   
 
-  
-
-  
+
+  
 
 
   
 
-  
-
-  
+
+  
 
 
   




svn commit: r691955 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 03:02:00 2008
New Revision: 691955

URL: http://svn.apache.org/viewvc?rev=691955&view=rev
Log:
tests for a basedir that is a symlink itself

Modified:
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691955&r1=691954&r2=691955&view=diff
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 03:02:00 2008
@@ -46,10 +46,34 @@
 
   
 
+  
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
   
 
 
 
   
-
+
+  
+
+
+
+
+  
 




svn commit: r691988 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 05:08:20 2008
New Revision: 691988

URL: http://svn.apache.org/viewvc?rev=691988&view=rev
Log:
Test for symlink loops

Modified:
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691988&r1=691987&r2=691988&view=diff
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 05:08:20 2008
@@ -28,6 +28,17 @@
 
   
 
+  
+
+
+  
+  
+
+  
+  
+
+  
+
   
@@ -64,6 +75,82 @@
 
   
 
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+  
+
+
+  
+
+
+  
+
   
 
 
@@ -76,4 +163,15 @@
 
 
   
+
+  
+
+
+
+  
+
+  
+
+
+  
 




svn commit: r691991 - /ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 05:15:55 2008
New Revision: 691991

URL: http://svn.apache.org/viewvc?rev=691991&view=rev
Log:
fix include pattern to show the behavior

Modified:
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=691991&r1=691990&r2=691991&view=diff
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 05:15:55 2008
@@ -101,18 +101,19 @@
 
   
 
-  
+  
 
   
-
+
   
 
 
   
 
-
+
   
 
   

DO NOT REPLY [Bug 45739] New: Problems with BaseDir when the ant is started as Java library from Java Application

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45739

   Summary: Problems with BaseDir when the ant is started as Java
library from Java Application
   Product: Ant
   Version: 1.7.1
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: blocker
  Priority: P2
 Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


I try to start ant script using ant as java library from Java application. The
start is realized as follow:
File buildXmlFile = new File("C:\a\b\z.xml");
List command = new ArrayList();
...
command.add(...);
...
command.add("-buildfile");
command.add(buildXmlFile.getAbsolutePath());
Main ant = new Main();
ant.startAnt(command.toArray(new String[command.size()]), null, null);

The content of build xml file is:


Build file for SSH Ant Script tests.



The xml build file location is different from the execution directory.
When that execution is initiated from the command prompt like that everything
is OK:
c:\somedir>ant -buildfile c:\anotherdir>buildfile.xml

When I try to start the same with the same parameters as java library the
text.txt file can not be founded. Ant looks for the file in execution directory
"c:\somedir\test.txt" instead in buildfile directory "c:\anotherdir\test.txt".

To fix this at the moment the following changes are made:
1. The user.dir is changed:
   File dir = buildXmlFile.getParentFile();
   System.getProperties().put("user.dir", dir.getAbsolutePath());
2. The method runBuild from the Main class is fixed as follow:
   private void runBuild(ClassLoader coreLoader) throws BuildException {
  ...
  project.init();

  // 2008-Sep-04: Bug Fix from Miro.
  project.getBaseDir();

I try to put that fix before project.init() without result.

If you need I can send you one small project as test case.

The big problem is that I do some changes in System Properties and that the
application is multi-thread and multi-tasking and because System Properties are
global (static) for all instances in the current JVM.


-- 
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 45740] New: SSHBase to be able to use external Session instead everytime to create new one

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45740

   Summary: SSHBase to be able to use external Session instead
everytime to create new one
   Product: Ant
   Version: 1.7.1
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


I notice that SSHBase which is base class for ssh copy, execute, sft, etc.
creates Session everytime instead to use some existing ssh session. This can be
corrected very easy with adding 2nd constructor with one Session parameter and
get/set session like that:

   public SSHBase(Session session)
   {
  this.session = session;
   }

   public Session getSession()
   {
  if(session == null || !session.isConnected())
  {
 session = openSession();
  }

  return session;
   }

   public void setSession(Session session)
   {
  this.session = session;
   }


-- 
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 45739] Problems with BaseDir when the ant is started as Java library from Java Application

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45739


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

   Severity|blocker |normal




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 05:48:56 PST 
---
blocker might a bit high as a priority since it isn't really blocking any usage
Ant has been designed for 8-)


-- 
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 45740] SSHBase to be able to use external Session instead everytime to create new one

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45740


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

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




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 05:50:16 PST 
---


*** This bug has been marked as a duplicate of bug 43083 ***


-- 
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 43083] [SUBMIT] sshsession task

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43083


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #9 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 05:50:16 PST 
---
*** Bug 45740 has been marked as a duplicate of this bug. ***


-- 
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 45741] New: fileset follows symlink if basedir is link and followsymlink is false

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45741

   Summary: fileset follows symlink if basedir is link and
followsymlink is false
   Product: Ant
   Version: 1.8Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: notifications@ant.apache.org


see testBasedirIsSymlinkNoFollow in
http://svn.apache.org/repos/asf/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml


-- 
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 45742] New: fails if directory contains symlinks pointing back

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45742

   Summary:  fails if directory contains symlinks pointing
back
   Product: Ant
   Version: 1.8Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


run the target "-link-to-parent" in
http://svn.apache.org/repos/asf/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml



fails after that.


-- 
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 45743] New: symlink action="delete" fails for links pointing to parents

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45743

   Summary: symlink action="delete" fails for links pointing to
parents
   Product: Ant
   Version: 1.8Alpha (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


after running -link-to-parent in
http://svn.apache.org/repos/asf/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
symlink fails to delete the link ${base}/A.

The reason is that symlink first renames the directory linked to and then tries
to remove the link - but that way the link's name has changed and the File
object points to a no longer existant file.


-- 
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 36658] Delete task follows symlinks - bad behavior

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36658


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||notifications@ant.apache.org
 AssignedTo|notifications@ant.apache.org|[EMAIL PROTECTED]




-- 
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.
You are the assignee for the bug.


DO NOT REPLY [Bug 41285] delete and symlink tasks do not delete a symlink if its target does not exist

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41285


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||notifications@ant.apache.org
 AssignedTo|notifications@ant.apache.org|[EMAIL PROTECTED]
 Status|ASSIGNED|NEW




--- Comment #9 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:06:35 PST 
---
at least in part related to bug 45743


-- 
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.
You are the assignee for the bug.


DO NOT REPLY [Bug 45743] symlink action="delete" fails for links pointing to parents

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45743


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||notifications@ant.apache.org
 AssignedTo|notifications@ant.apache.org|[EMAIL PROTECTED]




-- 
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.
You are the assignee for the bug.


svn commit: r692000 - in /ant/core/trunk: CONTRIBUTORS contributors.xml xdocs/faq.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 06:12:47 2008
New Revision: 692000

URL: http://svn.apache.org/viewvc?rev=692000&view=rev
Log:
add FAQ about deleting a directory only if it is empty.  PR 44013.  submitted 
by Vincent Legoll

Modified:
ant/core/trunk/CONTRIBUTORS
ant/core/trunk/contributors.xml
ant/core/trunk/xdocs/faq.xml

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

Modified: ant/core/trunk/contributors.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=692000&r1=691999&r2=692000&view=diff
==
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Thu Sep  4 06:12:47 2008
@@ -1172,6 +1172,10 @@
 Toni
   
   
+Vincent
+Legoll
+  
+  
 Will
 Wang
   

Modified: ant/core/trunk/xdocs/faq.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/xdocs/faq.xml?rev=692000&r1=691999&r2=692000&view=diff
==
--- ant/core/trunk/xdocs/faq.xml (original)
+++ ant/core/trunk/xdocs/faq.xml Thu Sep  4 06:12:47 2008
@@ -720,6 +720,25 @@
 ]]>
   
 
+
+
+  How can I delete a particular directory,
+if and only if it is empty?
+  
+Most users who go down this path have no problem figuring
+  out that
+   will
+  help them.  The seemingly tricky part is preserving the
+  non-empty directories, which Ant includes in the directory
+  scan. Fortunately the answer is simple:
+
+
+  
+
   
 
   




DO NOT REPLY [Bug 44013] Add delete-dir-only-if-empty FAQ entry

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44013


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:13:10 PST 
---
svn revision 692000, thanks!


-- 
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 44655] symlink delete fails

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44655


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:14:43 PST 
---


*** This bug has been marked as a duplicate of bug 41525 ***


-- 
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 41525] Unable to delete symlink when permissions incorrect on target

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41525


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:14:43 PST 
---
*** Bug 44655 has been marked as a duplicate of this bug. ***


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


svn commit: r692003 - /ant/core/trunk/docs/faq.html

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 06:20:19 2008
New Revision: 692003

URL: http://svn.apache.org/viewvc?rev=692003&view=rev
Log:
re-generate site

Modified:
ant/core/trunk/docs/faq.html

Modified: ant/core/trunk/docs/faq.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/faq.html?rev=692003&r1=692002&r2=692003&view=diff
==
--- ant/core/trunk/docs/faq.html (original)
+++ ant/core/trunk/docs/faq.html Thu Sep  4 06:20:19 2008
@@ -291,6 +291,10 @@
   How can I delete everything beneath a particular directory,
 preserving the directory itself?
   
+
+  How can I delete a particular directory,
+if and only if it is empty?
+  
 
 It doesn't work (as expected)
 
@@ -1167,6 +1171,22 @@
   
 
 
+
+  
+  How can I delete a particular directory,
+if and only if it is empty?
+
+  Most users who go down this path have no problem figuring
+  out that
+   will
+  help them.  The seemingly tricky part is preserving the
+  non-empty directories, which Ant includes in the directory
+  scan. Fortunately the answer is simple:
+
+
+  
+
+
 
   
   General Advice




DO NOT REPLY [Bug 19252] does not untar symbolic links properly

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=19252


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #3 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:26:26 PST 
---
*** Bug 43187 has been marked as a duplicate of this bug. ***


-- 
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 43187] untar does not create symlinks

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43187


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:26:26 PST 
---


*** This bug has been marked as a duplicate of bug 19252 ***


-- 
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 36658] Delete task follows symlinks - bad behavior

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36658


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #2 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:31:57 PST 
---
*** Bug 22632 has been marked as a duplicate of this bug. ***


-- 
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 36658] Delete task follows symlinks - bad behavior

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=36658


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

   Keywords||PatchAvailable




-- 
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 22632] Delete follows symbolic links to directories

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=22632


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||DUPLICATE




--- Comment #9 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:31:57 PST 
---
even though bug 36658 I mark them this way around since the later contains a
(not yet evaluated) patch.

*** This bug has been marked as a duplicate of bug 36658 ***


-- 
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 43689] Need a way to add symlinks to a tar

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43689


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #5 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:32:59 PST 
---


*** This bug has been marked as a duplicate of bug 40059 ***


-- 
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 40059] Add method to explicitly define symlinks in task

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=40059


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 06:32:59 PST 
---
*** Bug 43689 has been marked as a duplicate of this bug. ***


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


svn commit: r692047 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java src/tests/antunit/taskdefs/optional/unix/symlink-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 07:28:04 2008
New Revision: 692047

URL: http://svn.apache.org/viewvc?rev=692047&view=rev
Log:
allow symlink to delete broken links.  Part of PR 41285.

Modified:
ant/core/trunk/WHATSNEW

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=692047&r1=692046&r2=692047&view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Sep  4 07:28:04 2008
@@ -91,6 +91,11 @@
locale.
Bugzilla Report 44659.
 
+ *  used to fail if the link was broken (i.e.
+   pointing to a file or directory that no longer existed).  It will now
+   silently try to remove the link.
+   Bugzilla Report 41285.
+
 Fixed bugs:
 ---
 

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692047&r1=692046&r2=692047&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 07:28:04 2008
@@ -391,7 +391,11 @@
  * rename the resource (breaking the link) and then deleting the link.
  * The resource is then returned to its original name inside a finally
  * block to ensure that the resource is unharmed even in the event of
- * an exception.
+ * an exception.
+ *
+ * Since Ant 1.8.0 this method will try to delete the File object if
+ * it reports it wouldn't exist (as symlinks pointing nowhere usually do). 
+ * Prior version would throw a FileNotFoundException in that case.
  *
  * @param linkfilA File object of the symlink to delete.
  *
@@ -403,7 +407,8 @@
 public static void deleteSymlink(File linkfil)
 throws IOException {
 if (!linkfil.exists()) {
-throw new FileNotFoundException("No such symlink: " + linkfil);
+linkfil.delete();
+return;
 }
 // find the resource of the existing link:
 File canfil = linkfil.getCanonicalFile();

Modified: 
ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml?rev=692047&r1=692046&r2=692047&view=diff
==
--- ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml 
Thu Sep  4 07:28:04 2008
@@ -62,4 +62,11 @@
 resource="${file_ref}"/>
   
 
+  
+
+
+
+
+  
+
 




DO NOT REPLY [Bug 41285] delete and symlink tasks do not delete a symlink if its target does not exist

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41285





--- Comment #10 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 07:28:25 
PST ---
 should work with svn revision 692047


-- 
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-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #6 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 07:30:05 PST 
---
dev thread started http://marc.info/?l=ant-dev&m=122053158307830&w=2


-- 
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 45743] symlink action="delete" fails for links pointing to parents

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45743


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.8.0
Version|1.8Alpha (nightly)  |1.7.1




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 07:57:19 PST 
---
fixed with svn revision 692081


-- 
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: r692081 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java src/tests/antunit/core/dirscanner-symlinks-test.xml src/tests/antunit/taskdefs/opti

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 07:57:04 2008
New Revision: 692081

URL: http://svn.apache.org/viewvc?rev=692081&view=rev
Log:
symlink delete now works if the link points to a parent directory as well.  PR 
45743.

Modified:
ant/core/trunk/WHATSNEW

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=692081&r1=692080&r2=692081&view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Sep  4 07:57:04 2008
@@ -196,6 +196,10 @@
contained line feeds some excess output ended up in Ant's log.
Bugzilla Report 45411.
 
+ *  failed to delete a link that pointed to
+   a parent directory.
+   Bugzilla Report 45743.
+
 Other changes:
 --
 

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692081&r1=692080&r2=692081&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 07:57:04 2008
@@ -386,13 +386,19 @@
  * This is a utility method that removes a unix symlink without removing
  * the resource that the symlink points to. If it is accidentally invoked
  * on a real file, the real file will not be harmed, but an exception
- * will be thrown when the deletion is attempted. This method works by
+ * will be thrown when the deletion is attempted.
+ *
+ * Normaly this method works by
  * getting the canonical path of the link, using the canonical path to
  * rename the resource (breaking the link) and then deleting the link.
  * The resource is then returned to its original name inside a finally
  * block to ensure that the resource is unharmed even in the event of
  * an exception.
  *
+ * There may be cases where the algorithm described above doesn't work,
+ * in that case the method tries to use the native "rm" command on
+ * the symlink instead.
+ *
  * Since Ant 1.8.0 this method will try to delete the File object if
  * it reports it wouldn't exist (as symlinks pointing nowhere usually do). 
  * Prior version would throw a FileNotFoundException in that case.
@@ -410,12 +416,22 @@
 linkfil.delete();
 return;
 }
+
 // find the resource of the existing link:
 File canfil = linkfil.getCanonicalFile();
 
 // rename the resource, thus breaking the link:
 File temp = FILE_UTILS.createTempFile("symlink", ".tmp",
-  canfil.getParentFile(), false, 
false);
+  canfil.getParentFile(), false,
+  false);
+
+if (FILE_UTILS.isLeadingPath(canfil, linkfil)) {
+// link points to a parent directory, renaming the parent
+// will rename the file
+linkfil = new File(temp,
+   FILE_UTILS.removeLeadingPath(canfil, linkfil));
+}
+
 try {
 try {
 FILE_UTILS.rename(canfil, temp);

Modified: ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml?rev=692081&r1=692080&r2=692081&view=diff
==
--- ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml 
(original)
+++ ant/core/trunk/src/tests/antunit/core/dirscanner-symlinks-test.xml Thu Sep  
4 07:57:04 2008
@@ -81,9 +81,7 @@
 
   
 
-
-  
-
+
 
   
 
@@ -95,9 +93,7 @@
 
   
 
-
-  
-
+
 
   
 
@@ -110,9 +106,7 @@
 
   
 
-
-  
-
+
 
   
 
@@ -122,9 +116,7 @@
 
   
 
-
-  
-
+
 
   
 
@@ -134,9 +126,7 @@
 
   
 
-
-  
-
+
 
   
 
@@ -146,9 +136,7 @@
 
   
 
-
-  
-
+
 
   
 

Modified: 
ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml?rev=692081&r1=692080&r2=692081&view=diff
==
--- ant/core/trunk/src/tests/antunit/taskdefs/optional/uni

DO NOT REPLY [Bug 41525] Unable to delete symlink when permissions incorrect on target

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41525


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||notifications@ant.apache.org
 AssignedTo|notifications@ant.apache.org|[EMAIL PROTECTED]




-- 
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.
You are the assignee for the bug.


svn commit: r692082 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 08:01:17 2008
New Revision: 692082

URL: http://svn.apache.org/viewvc?rev=692082&view=rev
Log:
don't try to re-rename a target that failed to be renamed in the first place.  
Related to PR 41525.

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692082&r1=692081&r2=692082&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 08:01:17 2008
@@ -432,9 +432,11 @@
FILE_UTILS.removeLeadingPath(canfil, linkfil));
 }
 
+boolean renamedTarget = false;
 try {
 try {
 FILE_UTILS.rename(canfil, temp);
+renamedTarget = true;
 } catch (IOException e) {
 throw new IOException(
 "Couldn't rename resource when attempting to delete "
@@ -446,6 +448,7 @@
 + " (was it a real file? is this not a UNIX system?)");
 }
 } finally {
+if (renamedTarget) {
 // return the resource to its original name:
 try {
 FILE_UTILS.rename(temp, canfil);
@@ -455,6 +458,7 @@
 + "\n THE RESOURCE'S NAME ON DISK HAS "
 + "BEEN CHANGED BY THIS ERROR!\n");
 }
+}
 }
 }
 




svn commit: r692083 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 08:02:27 2008
New Revision: 692083

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

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692083&r1=692082&r2=692083&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 08:02:27 2008
@@ -449,15 +449,16 @@
 }
 } finally {
 if (renamedTarget) {
-// return the resource to its original name:
-try {
-FILE_UTILS.rename(temp, canfil);
-} catch (IOException e) {
-throw new IOException("Couldn't return resource " + temp
-+ " to its original name: " + canfil.getAbsolutePath()
-+ "\n THE RESOURCE'S NAME ON DISK HAS "
-+ "BEEN CHANGED BY THIS ERROR!\n");
-}
+// return the resource to its original name:
+try {
+FILE_UTILS.rename(temp, canfil);
+} catch (IOException e) {
+throw new IOException("Couldn't return resource " + temp
+  + " to its original name: "
+  + canfil.getAbsolutePath()
+  + "\n THE RESOURCE'S NAME ON DISK 
HAS "
+  + "BEEN CHANGED BY THIS ERROR!\n");
+}
 }
 }
 }




[jira] Created: (IVY-895) Transactional Publishing to the FileSytemResolver doesn't work as expected.

2008-09-04 Thread Steve Brown (JIRA)
Transactional Publishing to the FileSytemResolver doesn't work as expected.
---

 Key: IVY-895
 URL: https://issues.apache.org/jira/browse/IVY-895
 Project: Ivy
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0.0-beta-2
 Environment: Windows XP Professional SP2, Sun JDK 1.5.17, 3Gb Ram, 8 
Core Xeon processor.
Reporter: Steve Brown


After publishing with transactional="auto", the revisions directory in the jars 
directory has a name like "1.0.part". The corresponding directory in the ivys 
directory has a correct name like "1.0"

The Ivy settings file is:




http://lonespappd0a.uk.db.com:8770/repo"; override="false"/>






























The Ivy file is:


http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd";>














The Ant target is like this:















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



DO NOT REPLY [Bug 41525] Unable to delete symlink when permissions incorrect on target

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41525


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

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




--- Comment #2 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 08:44:48 PST 
---
fixed with svn revisions 692082 and 692115


-- 
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: r692115 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java src/tests/antunit/taskdefs/optional/unix/symlink-test.xml

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 08:44:24 2008
New Revision: 692115

URL: http://svn.apache.org/viewvc?rev=692115&view=rev
Log:
fall back to "rm" if target cannot be renamed when deleting a symlink

Modified:
ant/core/trunk/WHATSNEW

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
ant/core/trunk/src/tests/antunit/taskdefs/optional/unix/symlink-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=692115&r1=692114&r2=692115&view=diff
==
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Sep  4 08:44:24 2008
@@ -200,6 +200,10 @@
a parent directory.
Bugzilla Report 45743.
 
+ *  failed if ant lacked permission to rename
+   the link's target.
+   Bugzilla Report 41525.
+
 Other changes:
 --
 

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692115&r1=692114&r2=692115&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 08:44:24 2008
@@ -47,6 +47,7 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Task;
 import org.apache.tools.ant.dispatch.DispatchTask;
 import org.apache.tools.ant.dispatch.DispatchUtils;
 import org.apache.tools.ant.taskdefs.Execute;
@@ -181,7 +182,7 @@
 return;
 }
 log("Removing symlink: " + link);
-deleteSymlink(link);
+deleteSymlink(link, this);
 } catch (FileNotFoundException fnfe) {
 handleError(fnfe.toString());
 } catch (IOException ioe) {
@@ -215,7 +216,7 @@
 doLink(res, lnk);
 } else if (!test.getCanonicalPath().equals(
 new File(res).getCanonicalPath())) {
-deleteSymlink(lnk);
+deleteSymlink(lnk, this);
 doLink(res, lnk);
 } // else lnk exists, do nothing
 } catch (IOException ioe) {
@@ -383,22 +384,36 @@
 /**
  * Delete a symlink (without deleting the associated resource).
  *
+ * This is a convenience method that simply invokes
+ * deleteSymlink(java.io.File).
+ *
+ * @param pathA string containing the path of the symlink to delete.
+ *
+ * @throws FileNotFoundException   When the path results in a
+ *   File that doesn't exist.
+ * @throws IOException If calls to File.rename
+ *   or File.delete fail.
+ */
+public static void deleteSymlink(String path, Task t)
+throws IOException, FileNotFoundException {
+deleteSymlink(new File(path), t);
+}
+
+/**
+ * Delete a symlink (without deleting the associated resource).
+ *
  * This is a utility method that removes a unix symlink without removing
  * the resource that the symlink points to. If it is accidentally invoked
  * on a real file, the real file will not be harmed, but an exception
  * will be thrown when the deletion is attempted.
  *
- * Normaly this method works by
+ * This method works by
  * getting the canonical path of the link, using the canonical path to
  * rename the resource (breaking the link) and then deleting the link.
  * The resource is then returned to its original name inside a finally
  * block to ensure that the resource is unharmed even in the event of
  * an exception.
  *
- * There may be cases where the algorithm described above doesn't work,
- * in that case the method tries to use the native "rm" command on
- * the symlink instead.
- *
  * Since Ant 1.8.0 this method will try to delete the File object if
  * it reports it wouldn't exist (as symlinks pointing nowhere usually do). 
  * Prior version would throw a FileNotFoundException in that case.
@@ -409,9 +424,43 @@
  *   File.delete or
  *   File.getCanonicalPath
  *   fail.
+ * @deprecated use the two-arg version which also works if the link's
+ * target can not be renamed.
  */
 public static void deleteSymlink(File linkfil)
 throws IOException {
+deleteSymlink(linkfil, null);
+}
+
+/**
+ * Delete a symlink (without deleting the associated resource).
+ *
+ * This is

svn commit: r692117 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

2008-09-04 Thread bodewig
Author: bodewig
Date: Thu Sep  4 08:48:01 2008
New Revision: 692117

URL: http://svn.apache.org/viewvc?rev=692117&view=rev
Log:
whitespace and javadocs

Modified:

ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java?rev=692117&r1=692116&r2=692117&view=diff
==
--- 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
 Thu Sep  4 08:48:01 2008
@@ -375,6 +375,8 @@
  *   File that doesn't exist.
  * @throws IOException If calls to File.rename
  *   or File.delete fail.
+ * @deprecated use the two-arg version which also works if the link's
+ * target can not be renamed.
  */
 public static void deleteSymlink(String path)
 throws IOException, FileNotFoundException {
@@ -388,11 +390,13 @@
  * deleteSymlink(java.io.File).
  *
  * @param pathA string containing the path of the symlink to delete.
+ * @param task   An Ant Task required if "rm" needs to be invoked.
  *
  * @throws FileNotFoundException   When the path results in a
  *   File that doesn't exist.
  * @throws IOException If calls to File.rename
  *   or File.delete fail.
+ * @since Ant 1.8.0
  */
 public static void deleteSymlink(String path, Task t)
 throws IOException, FileNotFoundException {
@@ -458,6 +462,7 @@
  *   File.delete or
  *   File.getCanonicalPath
  *   fail.
+ * @since Ant 1.8.0
  */
 public static void deleteSymlink(File linkfil, Task task)
 throws IOException {
@@ -475,47 +480,51 @@
 
 if (task == null || canfil.getParentFile().canWrite()) {
 
-// rename the resource, thus breaking the link:
-File temp = FILE_UTILS.createTempFile("symlink", ".tmp",
-  canfil.getParentFile(), false,
-  false);
-
-if (FILE_UTILS.isLeadingPath(canfil, linkfil)) {
-// link points to a parent directory, renaming the parent
-// will rename the file
-linkfil = new File(temp,
-   FILE_UTILS.removeLeadingPath(canfil, linkfil));
-}
+// rename the resource, thus breaking the link:
+File temp = FILE_UTILS.createTempFile("symlink", ".tmp",
+  canfil.getParentFile(), 
false,
+  false);
+
+if (FILE_UTILS.isLeadingPath(canfil, linkfil)) {
+// link points to a parent directory, renaming the parent
+// will rename the file
+linkfil = new File(temp,
+   FILE_UTILS.removeLeadingPath(canfil,
+linkfil));
+}
 
-boolean renamedTarget = false;
-try {
+boolean renamedTarget = false;
 try {
-FILE_UTILS.rename(canfil, temp);
-renamedTarget = true;
-} catch (IOException e) {
-throw new IOException(
-"Couldn't rename resource when attempting to delete "
-+ linkfil);
-}
-// delete the (now) broken link:
-if (!linkfil.delete()) {
-throw new IOException("Couldn't delete symlink: " + linkfil
-+ " (was it a real file? is this not a UNIX system?)");
-}
-} finally {
-if (renamedTarget) {
-// return the resource to its original name:
 try {
-FILE_UTILS.rename(temp, canfil);
+FILE_UTILS.rename(canfil, temp);
+renamedTarget = true;
 } catch (IOException e) {
-throw new IOException("Couldn't return resource " + temp
-  + " to its original name: "
-  + canfil.getAbsolutePath()
-  + "\n THE RESOURCE'S NAME ON DISK 
HAS "
-  + "BEEN CHANGED BY THIS ERROR!\n");
+throw new IOException("Couldn't rename resource when "
+  + "atte

DO NOT REPLY [Bug 45746] New: task sql with child fileset that has child include with if attribute could not work properly

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45746

   Summary: task sql with child fileset that has child include with
if attribute could not work properly
   Product: Ant
   Version: 1.7.1
  Platform: PC
OS/Version: Windows Vista
Status: NEW
  Severity: critical
  Priority: P2
 Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: [EMAIL PROTECTED]


my build.xml can not work properly, all attaches as below.

if I remove attribute "if" , it works OK. and the output as below :
---
  [sql] connecting to jdbc:oracle:thin:@192.168.1.22:1521:ORCL
  [sql] Loading oracle.jdbc.driver.OracleDriver using AntClassLoader with
classpath 
---

if I remain attribute "if", but add code at position (1) in build.xml, the ant
not work, the output show same error.
---inserted code 







then I trace into ant's code, the last method code is below, and behavior ==
ADD, so if condition is false and fileset object ignored:
void store(Object parent, Object child)
throws InvocationTargetException, IllegalAccessException,
InstantiationException {
if (behavior == ADD_CONFIGURED) { // real value of behavior is 1,
jumped
istore(parent, child);
}
}

call stack is:
=>IntrospectionHelper$AddNestedCreator.store#1293
=>IntrospectionHelper$Creator.store#1201
=>UnknownElement.java#570

==disk file tree (vista tree output)
D:\work\platform\frrp
│  .project
│  .tomcatplugin
│  build-win.properties
│  build.properties
│  build.xml
│  hbm.properties
│  
├─design
│  db-frrp-oracle.sql
│  init-frrp.sql
│  
└─work
tldCache.ser



=== my build.xml =





























use hibernate class:
 
db.hibernate.schemaexporttask=${db.hibernate.tool.package}.SchemaExportTask
  db.hibernate.dialect=${db.hibernate.dialect}






































<_set_db_properties prefix="${db.server.type}" />

use db configuration values:
  db.server.address=${db.server.address}
  db.server.port=${db.server.port}
  db.name=${db.name}
  db.user=${db.user}
  db.pass=${db.pass}
  db.driver=${db.driver}
  db.connection.url=${db.connection.url}


output with -v =
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: d:\work\platform\frrp\build.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_05\jre
Detected OS: Windows Vista
parsing buildfile d:\work\platform\frrp\build.xml with URI =
file:/d:/work/platform/frrp/build.xml
Project base dir set to: d:\work\platform\frrp
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
 [property] Loading Environment env.
Property "env.windir" has not been set
[available] Unable to find dir ${env.windir} to set property os
Property "env.SHELL" has not been set
[available] Unable to find file ${env.SHELL} to set property os
 [property] Loading d:\work\platform\frrp\build-win.properties
 [property] Loading d:\work\platform\build-win.properties
Override ignored for property "SEAL_LIBRARY"
Override ignored for property "TOMCAT_HOME"
Override ignored for property "ANTLIB"
Override ignored for property "MAVEN_ANT_TASK_JAR"
Override ignored for property "COMMON_LIBRARY"
Override ignored for property "VSS_REPOSITORY_DIR"
Override ignored for property "DTD_DIR"
Override ignored for property "VSS_DIR"
Override ignored for property "PLATFORM_LIBRARY"
 [property] Loading d:\work\platform\frrp\build.properties
Override ignored for p

[jira] Commented: (IVY-885) Invalid URL when using dynamic ranges

2008-09-04 Thread Jim Bonanno (JIRA)

[ 
https://issues.apache.org/jira/browse/IVY-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628404#action_12628404
 ] 

Jim Bonanno commented on IVY-885:
-

I backported your changes to the version of ivy we are using and the patch 
works great.

Thanks for fixing this issue so quickly.

> Invalid URL when using dynamic ranges
> -
>
> Key: IVY-885
> URL: https://issues.apache.org/jira/browse/IVY-885
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.0.0-beta-1
>Reporter: Jim Bonanno
>Assignee: Maarten Coene
> Fix For: 2.0-RC1
>
>
> Sorry to have two url issues in one day. 
> We are using ivy's ranges to resolve our modules. Ivy first tries to see if 
> the specified version exists before listing the repository. The issue that we 
> hit was when using the range [1,2[. The first request is 
> http://myhost/my-repo/org/module/ivys/ivy-[1,2[.xml.
> This URL is not properly escaped, but apache apparently is very forgiving. 
> When we hosted the ivy repository with another web server that validated the 
> urls the returned status code was not a 404.
> We are working around the problem by again using URI to build the URL so it 
> gets properly escaped. There seems to be some tricks to using the URI class. 
> For example, the constructor that takes a string requires the string is 
> already rfc 2396 compliant. The other constructors will actually escape the 
> URL.
> Here is the modifications we made to the BasicURLHandler.
> if ( url.getProtocol().equals("http") || 
> url.getProtocol().equals("https"))  {
> try {
> URI uri = new URI(url.getProtocol(), null, url.getHost(), 
> url.getPort(), url.getPath(), null, null);
> url = uri.toURL();
> }
> catch ( URISyntaxException e ) {
> IOException ioe = new IOException("Couldn't open connection 
> to '" + url.toString() + "'");
> ioe.initCause(e);
> throw ioe;
> }
> }
> con = url.openConnection();
> which results in a request 
> http://myhost/my-repo/org/module/ivys/ivy-%5B1,2%5B.xml.

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



DO NOT REPLY [Bug 45739] Problems with BaseDir when the ant is started as Java library from Java Application

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45739





--- Comment #2 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 23:25:03 PST 
---
There are two different places where basedirs might get resolved.  One is in
Project#setBaseDir which may be invoked with "." if Project#getBasedir is
called
before the Project instance knows its basename.  This would resolve relative
to the current working directory and not the location of the build file.

The other place is ProjectHelper2#onStartElement which is invoked while the
build
file gets parsed, this will resolve relative to the location of the build file.

My guess is that something in your code invokes project.getBasedir() before the
project's build file has been parsed.  The most common reason for this is a
BuildListener invoking getBaseDir in the buildStarted event which is fired
before the build file gets parsed.


-- 
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 45746] task sql with child fileset that has child include with if attribute could not work properly

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45746


Stefan Bodewig <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #1 from Stefan Bodewig <[EMAIL PROTECTED]>  2008-09-04 23:37:56 PST 
---
the if attribute expects the name of the property to be tested, not its value.

Use if="local.dbinit.exist1" instead of if="${local.dbinit.exist1}".


-- 
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 45739] Problems with BaseDir when the ant is started as Java library from Java Application

2008-09-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45739





--- Comment #3 from Miroslav Nachev <[EMAIL PROTECTED]>  2008-09-04 23:39:33 
PST ---
(In reply to comment #2)
> My guess is that something in your code invokes project.getBasedir() before 
> the
> project's build file has been parsed.  The most common reason for this is a
> BuildListener invoking getBaseDir in the buildStarted event which is fired
> before the build file gets parsed.
> 

If you see my code where I am resolving the problem you will see that I call
project.getBaseDir(). In principle this is not good kind of programming but I
haven't time to re-write the whole Apache ant code.

Unfortunately the second problem with System Properties is still existing. This
can be solved very easy with one helper class SystemUtil which to be instanced
for each ant instance. All calls to/from the System Properties in the existing
ant code to be replaced with that class like systemUtil.getUserDir():
   public class SystemUtil
   {
  private String userDir;

  public String getUserDir()
  {
 if(userDir == null)
 {
userDir = System.getProperty("user.dir");
 }

 return userDir;
  }

  public void setUserDir(String userDir)
  {
 this.userDir = userDir;
  }
   }
With that code the problem with multi-tasking and multi-threads will be solved.


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


Ruby on Rails Developer - contract opportunity with TOP CLIENT in Bay Area, CA (San Jose, CA)

2008-09-04 Thread Arvi
 

Need someone urgent for this requirement

 

Title: Ruby on Rails Developer (2 positions)

Location: San Jose, CA. (If consultant not local, then please make
arrangement for F2F interview)

Duration: 6+ months contract

 

Must Have:

 

Ruby On Rails  (RoR)

J2EE, Oracle(Basic SQL Skills)

XML

XSLT

Linux OS

CSS

AJAX

JSON

 

Nice to Have:

PHP

Python

Perl

ATOM

RSS

Apache

 

 

Thanks & regards,

Arvi Singh

 

cid:image001.png@01C8E5A7.09BF4BD0

Phone: (703) 880-3299 x202 |Cell: (703) 338-4175 |Fax: 1 (888) 268-7270 |

Email:   [EMAIL PROTECTED]|www. purviewit.com
|YIM: arvipurview

Note :: If I am not reachable through Voice, please use YIM  for quick
response.

Note: Before sending me REMOVE ME FROM LIST Email, Please make sure you are
not receiving email from GOOGLE GROUP.  If you wish not receive email and
you are member of Google Group then please unsubscribe yourself from GOOGLE
GROUPS.

 

P Please do not print unless it is absolutely necessary. Spread
environmental awareness.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"datawarehousejobs" group.
To post to this group, send email to datawarehousejobs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datawarehousejobs?hl=en
-~--~~~~--~~--~--~---

<>