Skip to content

Commit

Permalink
Install reduced pom for dist module (NVIDIA#6434)
Browse files Browse the repository at this point in the history
Fixes NVIDIA#6433

This PR
- disables default install in favor of install-file similar
how rapids-4-spark is deploy-file'd to Maven central

- disables default deploy in favor of deploy-file similar
how rapids-4-spark is deploy-file'd to Maven central in deploy.sh

After this, the dependency reduced pom is correctly placed after `mvn deploy -pl dist -PnoSnapshots -Ddist.jar.compress=false`

-  ~/.m2/repository/com/nvidia/rapids-4-spark_2.12/22.10.0-SNAPSHOT/rapids-4-spark_2.12-22.10.0-SNAPSHOT.pom
- /tmp/m2-repo/com/nvidia/rapids-4-spark_2.12/22.10.0-SNAPSHOT/rapids-4-spark_2.12-22.10.0*pom 
 
Other fixes:
- dist.jar.compress is ignored when updating the dist jar

Signed-off-by: Gera Shegalov <[email protected]>
  • Loading branch information
gerashegalov authored Aug 31, 2022
1 parent ecca003 commit 14d2d10
Showing 1 changed file with 62 additions and 1 deletion.
63 changes: 62 additions & 1 deletion dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
312db,
321db
</databricks.buildvers>
<dist.jar.name>${project.build.directory}/${project.build.finalName}-${cuda.version}.jar</dist.jar.name>
</properties>
<profiles>
<profile>
Expand Down Expand Up @@ -331,7 +332,8 @@
<configuration>
<target>
<zip update="true" basedir="${project.build.directory}/extra-resources"
destfile="${project.build.directory}/${project.build.finalName}-${cuda.version}.jar"/>
compress="${dist.jar.compress}"
destfile="${dist.jar.name}"/>
</target>
</configuration>
</execution>
Expand Down Expand Up @@ -450,6 +452,65 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
<execution>
<id>install-parallel-worlds-jar</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${dist.jar.name}</file>
<artifactId>${project.artifactId}</artifactId>
<classifier>${cuda.version}</classifier>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<packaging>jar</packaging>
<!-- pomFile will be taken from META-INF in jar
https://github.com/apache/maven-install-plugin/blob/9f77fb95ab2a95b1d8d0c34c39c6f088f9f690ab/src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java#L309
-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>none</phase>
</execution>
<execution>
<id>deploy-parallel-worlds-jar</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<file>${dist.jar.name}</file>
<url>file://${java.io.tmpdir}/m2-repo</url>
<artifactId>${project.artifactId}</artifactId>
<classifier>${cuda.version}</classifier>
<groupId>${project.groupId}</groupId>
<packaging>jar</packaging>
<!-- pomFile will be taken from META-INF in jar
https://github.com/apache/maven-deploy-plugin/blob/4a72d8e9778c1878058435bdb919d40d65c879dd/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java#L186
-->
<version>${project.version}</version>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 14d2d10

Please sign in to comment.