NETVIRT-1126: avoid shipping the MySQL connector 03/69003/2
authorStephen Kitt <skitt@redhat.com>
Fri, 2 Mar 2018 14:32:37 +0000 (15:32 +0100)
committerSam Hague <shague@redhat.com>
Fri, 2 Mar 2018 15:52:33 +0000 (15:52 +0000)
This strips the MySQL connector from the Karaf distribution we build,
to avoid shipping a GPL component in the distribution.

Change-Id: I71e18fe79d3503e79b5bc8b722abe264657a61a6
Signed-off-by: Stephen Kitt <skitt@redhat.com>
karaf/pom.xml

index 9cab7ca79df9e615bbd1126cb5157d7b0be860b0..00d1b203ef61c486d685fb65a53c8cb2936a69ee 100644 (file)
@@ -126,6 +126,26 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
                     <skip>false</skip>
                 </configuration>
             </plugin>
+            <!-- NETVIRT-1126: Heavy-handed workaround to remove mysql dependencies from system -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <delete includeemptydirs="true">
+                                    <fileset dir="${project.build.directory}/assembly/system/mysql"/>
+                                </delete>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>