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

Support building from sub directory #4070

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

res-life
Copy link
Collaborator

@res-life res-life commented Nov 10, 2021

Use directory-maven-plugin to get spark-rapids root path instead of user.dir which is a relative path.
Fixes #3461

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

@@ -214,7 +214,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Root pom is 3.0.0, but here it's 1.8, so delete this line.

@res-life res-life added the build Related to CI / CD or cleanly building label Nov 10, 2021
@res-life
Copy link
Collaborator Author

res-life commented Nov 10, 2021

Use directory-maven-plugin to get spark-rapids root path instead of user.dir which is a relative path.
"user.dir" is mvn execution path, when excute mvn command under sub project "user.dir" refers to wrong path.
The expected path is: spark-rapids-root-code-path/build/build-info
directory-maven-plugin can find the root source path for all the sub projects and root project.

Copy link
Contributor

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

I tried this out locally and the build-info was generated to the correct location. This change is more deterministic than using user.dir so this looks good to me. I'm not an expert on the build system so would be good to get another review.

Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

I agree this looks good to me, but I really would like to hear from @gerashegalov about this because he has been doing most of the work on the maven build system lately.

Copy link
Collaborator

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -48,7 +48,7 @@
<target>
<mkdir dir="${project.build.directory}/extra-resources"/>
<exec executable="bash" failonerror="true" output="${project.build.directory}/extra-resources/spark-${spark301.version}-info.properties">
Copy link
Collaborator

Choose a reason for hiding this comment

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

In a follow-on we need to generalize this invocation to use spark.version and move to the shim/pom.xml and delete from child shims.

@res-life res-life merged commit 10e5a52 into NVIDIA:branch-21.12 Nov 11, 2021
@res-life res-life deleted the build-from-sub-directory branch April 16, 2022 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to CI / CD or cleanly building
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cannot build project from a sub-directory
4 participants