Skip to content

Commit

Permalink
OZ-429: Fine tune the Superset configs packaging (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuisson authored Jun 21, 2024
1 parent 541c6e5 commit cf5a21a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
Empty file.
1 change: 1 addition & 0 deletions base/configs/superset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<name>Ozone Cambodia Superset configs</name>
<description>Superset configurations specific to Ozone Cambodia, to be used in Ozone Analytics</description>
<packaging>pom</packaging>
<version>1.7.0-SNAPSHOT</version>

<organization>
<name>Ozone HIS</name>
Expand Down
58 changes: 57 additions & 1 deletion base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>

<supersetConfigsArtifactId>ozone-cambodia-superset-configs</supersetConfigsArtifactId>

<!-- Classifier for the dependency report artifact -->
<dependencyReportClassifier>dependencies</dependencyReportClassifier>
</properties>
Expand All @@ -30,11 +32,40 @@
</modules>

<dependencies>
<!-- TODO: Add any implementation-specific dependencies -->

<!-- Ozone Cambodia Superset configs sub-module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${supersetConfigsArtifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>Unpack Cambodia Superset configs sub-module</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>
${project.build.directory}/${project.artifactId}-${project.version}/configs/superset</outputDirectory>
<includeArtifactIds>${supersetConfigsArtifactId}</includeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -72,6 +103,31 @@
</resources>
</configuration>
</execution>

<execution>
<!-- Override the inherited Maven Parent plugin execution to exclude Superset configs -->
<!-- Override with local config files -->
<id>Copy local resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/${project.artifactId}-${project.version}/distro/configs</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/configs</directory>
<excludes>
<exclude>.gitkeep</exclude>
<exclude>superset/</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>

</executions>
</plugin>

Expand Down

0 comments on commit cf5a21a

Please sign in to comment.