From 3f9daf1d2b39f2a628970a5cb2b1cffc01fa4a21 Mon Sep 17 00:00:00 2001 From: caalador Date: Fri, 13 May 2022 16:26:25 +0300 Subject: [PATCH] fix: Move the clean-frontend phase to be before clean (#13763) Move clean-frontend to pre-clean as if mvn clean is executed before clean-frontend clean will remove the target folder making removal of node_modules fail on windows if there is a symlink to target/flow-frontend touches #13760 --- .../java/com/vaadin/flow/plugin/maven/CleanFrontendMojo.java | 2 +- .../java/com/vaadin/flow/plugin/maven/FrontendDanceMojo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CleanFrontendMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CleanFrontendMojo.java index 02ba9393b71..44755dc08cc 100644 --- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CleanFrontendMojo.java +++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/CleanFrontendMojo.java @@ -45,7 +45,7 @@ * * @since 9.0 */ -@Mojo(name = "clean-frontend", defaultPhase = LifecyclePhase.CLEAN) +@Mojo(name = "clean-frontend", defaultPhase = LifecyclePhase.PRE_CLEAN) public class CleanFrontendMojo extends FlowModeAbstractMojo { public static final String VAADIN = "vaadin"; diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FrontendDanceMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FrontendDanceMojo.java index 24b621542bf..0b9a6fc0f7a 100644 --- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FrontendDanceMojo.java +++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FrontendDanceMojo.java @@ -23,6 +23,6 @@ * * @since */ -@Mojo(name = "dance", defaultPhase = LifecyclePhase.CLEAN) +@Mojo(name = "dance", defaultPhase = LifecyclePhase.PRE_CLEAN) public class FrontendDanceMojo extends CleanFrontendMojo { }