You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2012/12/19 00:39:26 UTC
svn commit: r1423717 - in /ant/ivy/core/branches/2.3.x: ./ CHANGES.txt
src/java/org/apache/ivy/plugins/lock/DeleteOnExitHook.java
src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
Author: hibou
Date: Tue Dec 18 23:39:25 2012
New Revision: 1423717
URL: http://svn.apache.org/viewvc?rev=1423717&view=rev
Log:
merge r1422714 and r1423716:
IVY-1388
- add a shutdownhook to delete any lock which might not have been released
Added:
ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/DeleteOnExitHook.java
- copied unchanged from r1422714, ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/lock/DeleteOnExitHook.java
Modified:
ant/ivy/core/branches/2.3.x/ (props changed)
ant/ivy/core/branches/2.3.x/CHANGES.txt
ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
Propchange: ant/ivy/core/branches/2.3.x/
------------------------------------------------------------------------------
Merged /ant/ivy/core/trunk:r1422714,1423716
Modified: ant/ivy/core/branches/2.3.x/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.3.x/CHANGES.txt?rev=1423717&r1=1423716&r2=1423717&view=diff
==============================================================================
--- ant/ivy/core/branches/2.3.x/CHANGES.txt (original)
+++ ant/ivy/core/branches/2.3.x/CHANGES.txt Tue Dec 18 23:39:25 2012
@@ -132,6 +132,7 @@ for detailed view of each issue, please
=====================================
- FIX: Maven2: resolve failure when parent has <dependencyManagement> with dependency in 'import' scope (IVY-1376)
- FIX: IvyPublish fails when using extend tags with no explicit location attribute (IVY-1391)
+- FIX: *.lck files created by "artifact-lock" lock strategy are not cleaned up if ivy quits abruptly (IVY-1388) (thanks to Wei Chen)
2.3.0-rc2
=====================================
Modified: ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java?rev=1423717&r1=1423716&r2=1423717&view=diff
==============================================================================
--- ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java (original)
+++ ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/plugins/lock/FileBasedLockStrategy.java Tue Dec 18 23:39:25 2012
@@ -150,6 +150,7 @@ public abstract class FileBasedLockStrat
try {
if (file.getParentFile().exists() || file.getParentFile().mkdirs()) {
if (file.createNewFile()) {
+ DeleteOnExitHook.add(file);
return true;
} else {
if (debugLocking) {
@@ -167,6 +168,7 @@ public abstract class FileBasedLockStrat
public void unlock(File file) {
file.delete();
+ DeleteOnExitHook.remove(file);
}
}
/**