From 3b37d42f57c755fcd4abed0dd7a7edac966db981 Mon Sep 17 00:00:00 2001
From: Thomas Mortagne <thomas.mortagne@gmail.com>
Date: Fri, 24 Jan 2020 17:42:25 +0100
Subject: [PATCH] XWIKI-17003: Getting "ResourceNotFoundException: Unable to
 find resource '/templates/macros.vm'" when building
 xwiki-platform-distribution-flavor-data-hsqldb

---
 .../xwiki-platform-tool-packager-plugin/pom.xml    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml b/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
index 35b0d7db4ca..7ff004ad060 100644
--- a/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
+++ b/xwiki-platform-tools/xwiki-platform-tool-packager-plugin/pom.xml
@@ -79,11 +79,6 @@
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.xwiki.platform</groupId>
-      <artifactId>xwiki-platform-velocity-webapp</artifactId>
-      <version>${project.version}</version>
-    </dependency>
     <dependency>
       <groupId>org.xwiki.commons</groupId>
       <artifactId>xwiki-commons-environment-standard</artifactId>
@@ -342,6 +337,15 @@
       <version>${project.version}</version>
       <scope>runtime</scope>
     </dependency>
+
+    <!-- Dependencies not needed by the plugin itself but included in the WAR it generates,
+         listed to be sure it's built before the plugin -->
+    <dependency>
+      <groupId>org.xwiki.platform</groupId>
+      <artifactId>xwiki-platform-velocity-webapp</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
-- 
GitLab