Fixed issue FELIX-2403: the dependencymanager annotation scanner is not working under windows

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@954300 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/mvn/AnnotationMojo.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/mvn/AnnotationMojo.java
index 81ba6f4..126bcc2 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/mvn/AnnotationMojo.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/mvn/AnnotationMojo.java
@@ -178,6 +178,10 @@
             jar.write(tmp);
             jar.close();
             
+            if (target.exists() && ! target.delete())
+            {
+                throw new MojoExecutionException("Could not remove " + target);
+            }
             if (!tmp.renameTo(target))
             {
                 throw new MojoExecutionException("Could not rename " + tmp + " to " + target);