Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tools depending on the common jar #5235

Closed
wants to merge 1 commit into from

Conversation

res-life
Copy link
Collaborator

Fixes #5233

Tools jar is a standalone jar, should not depend on common jar

Signed-off-by: Chong Gao res_life@163.com

Signed-off-by: Chong Gao <res_life@163.com>
@res-life
Copy link
Collaborator Author

build

@res-life
Copy link
Collaborator Author

Copied ThreadFactoryBuilder from the common module to the tools module.

@NvTimLiu
Copy link
Collaborator

NvTimLiu commented Apr 13, 2022

verified it works, +1

@@ -0,0 +1,52 @@
/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can change to use add-source to avoid copy it?

diff --git a/tools/pom.xml b/tools/pom.xml
index 1fb24656b..e5331324b 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -132,6 +132,24 @@
                 <groupId>net.alchim31.maven</groupId>
                 <artifactId>scala-maven-plugin</artifactId>
             </plugin>
+           <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                   <source>${project.basedir}/../common/src/main/scala/com/nvidia/spark/rapids/</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>


// This is similar to Guava ThreadFactoryBuilder
// Avoid to use Guava as it is a messy dependency in practice.
// This is copied from the common module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already using the shade plugin to include the common module. So I see this more as a problem of not using a dependency-reduced pom rather than the need to copy code. For example, the pom probably also says it needs the scallop jar as a dependency despite the fact that we are using the shade plugin to include it. This PR removed the need for the common module but the config for the shade plugin still requests its inclusion.

Personally I'd rather see us fix the pom, using a dependency-reduced pom to publish rather than shade and still list shaded dependencies as it is doing today.

@tgravescs
Copy link
Collaborator

tgravescs commented Apr 13, 2022

put up replacement PR #5239 to get this in quickly

@tgravescs
Copy link
Collaborator

also filed followup to change to use reduced pom: #5238

Copy link
Collaborator

@pxLi pxLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block this PR for now. As #5239 comes up for a quick fix w/ shade removal

@tgravescs
Copy link
Collaborator

closing since other pr merged

@tgravescs tgravescs closed this Apr 13, 2022
@res-life res-life deleted the fix-tools-dependency branch April 16, 2022 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants