Fix clean up of build file sdctool.tar 82/124682/2
authorandre.schmid <andre.schmid@est.tech>
Tue, 28 Sep 2021 10:24:44 +0000 (11:24 +0100)
committerMichael Morris <michael.morris@est.tech>
Wed, 6 Oct 2021 08:39:18 +0000 (08:39 +0000)
Fixes clean up/generation of cassandra-init build file sdctool.tar.
It was not being deleted during the clean, also not being overwritten
during the build. This could cause the file to not be updated during
the build process, in case of changes in the content that composes it.

Change-Id: I82ba2cfaa0f7d823fcf5cfff27292483a7ff9ea2
Issue-ID: SDC-3741
Signed-off-by: andre.schmid <andre.schmid@est.tech>
asdctool/pom.xml

index 5c01259..0d4f12d 100644 (file)
       </activation>
       <build>
         <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>clean.sdctool.tar</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>clean</goal>
+                </goals>
+                <configuration>
+                  <filesets>
+                    <fileset>
+                      <directory>${basedir}/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/files/default</directory>
+                      <includes>
+                        <include>sdctool.tar</include>
+                      </includes>
+                    </fileset>
+                  </filesets>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-resources-plugin</artifactId>
                   <outputDirectory>
                     ${basedir}/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/files/default
                   </outputDirectory>
+                  <overwrite>true</overwrite>
                   <resources>
                     <resource>
                       <directory>${project.parent.basedir}/asdctool/target</directory>