The contents of src/main/assembly need to be copied to
target/assembly, overwriting any conflicting file from Karaf.
integration/distribution needs this to be able to add custom scripts
and replace configuration files.
(Arguably this should be part of integration/distribution, but it
can’t be — at least not in a maintainable fashion.)
Change-Id: Ifcce82862d350b87853727e2c77140adee164886
Signed-off-by: Stephen Kitt <skitt@redhat.com>
<build>
<plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>process-resources</id>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<configuration>
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/assembly</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/assembly</directory>
+ </resource>
+ </resources>
+ <overwrite>true</overwrite>
+ </configuration>
+ </execution>
+ <execution>
+ <id>process-resources</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>