You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/08/30 11:49:01 UTC

[sling-slingstart-maven-plugin] branch master updated: SLING-8666 - slingstart-maven-plugin 1.8.4 or newer fail with "Failed to delete: .../target/features/processed: File does not exist: .../target/features/processed

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new f1ed3af  SLING-8666 - slingstart-maven-plugin 1.8.4 or newer fail with "Failed to delete: .../target/features/processed: File does not exist: .../target/features/processed
f1ed3af is described below

commit f1ed3af6b85ae9c994f907d3aa1524a9deaf8880
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 30 13:48:18 2019 +0200

    SLING-8666 - slingstart-maven-plugin 1.8.4 or newer fail with "Failed to delete: .../target/features/processed: File does not exist: .../target/features/processed
    
    Check that the processed directory actually exists.
---
 .../apache/sling/maven/slingstart/DependencyLifecycleParticipant.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
index 70a690a..ce09cca 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/DependencyLifecycleParticipant.java
@@ -95,7 +95,9 @@ public class DependencyLifecycleParticipant extends AbstractMavenLifecyclePartic
                     env.modelProjects.put(project.getGroupId() + ":" + project.getArtifactId(), info);
                     File processed = new File(project.getBuild().getDirectory(), "features/processed");
                     try {
-                        FileUtils.forceDelete(processed);
+                        if ( processed.exists() ) {
+                            FileUtils.forceDelete(processed);
+                        }
                     } catch (IOException e) {
                         throw new MavenExecutionException("Failed to delete: " + processed.getPath(), e);
                     }