Skip to content

Commit

Permalink
BFD-3111: Deletes assembly files prior to build.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianburton committed Dec 9, 2023
1 parent abe26d1 commit c8aae64
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
33 changes: 32 additions & 1 deletion apps/bfd-server/bfd-server-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- Name of the image generated by jib plugin. -->
<image-name>bfd-server</image-name>
</properties>

<dependencies>
<dependency>
<!-- BFD WAR file is required to build the image. -->
Expand Down Expand Up @@ -57,6 +57,37 @@
</plugins>
</pluginManagement>
<plugins>
<!--
File permissions on some of the files in the bfd-server-launcher zip file cause builds to
fail with a permission violation when unpacking the file while the files already exist.
This maven-clean-plugin execution solves that problem by automatically deleting the unpacked
files before the dependency plugin unpacks them again.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<configuration>
<filesets>
<fileset>
<directory>${project.build.directory}/server-launcher</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
</configuration>
<id>delete-launcher-artifacts</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down
31 changes: 31 additions & 0 deletions apps/bfd-server/bfd-server-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,37 @@
</execution>
</executions>
</plugin>
<!--
File permissions on some of the files in the bfd-server-launcher zip file cause builds to
fail with a permission violation when unpacking the file while the files already exist.
This maven-clean-plugin execution solves that problem by automatically deleting the unpacked
files before the dependency plugin unpacks them again.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<configuration>
<filesets>
<fileset>
<directory>${project.build.directory}/server-work</directory>
<includes>
<include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
</configuration>
<id>delete-launcher-artifacts</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down

0 comments on commit c8aae64

Please sign in to comment.