-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-3812] [BUILD] Adapt maven build to publish effective pom. #2673
Changes from all commits
553d96b
28f891e
0300dac
aa7b91d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,7 +248,17 @@ | |
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<!-- | ||
This is a dummy dependency that is used along with the shading plug-in | ||
to create effective poms on publishing (see SPARK-3812). | ||
--> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.spark-project.spark</groupId> | ||
<artifactId>unused</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
</dependencies> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
|
@@ -992,6 +1002,27 @@ | |
</pluginManagement> | ||
|
||
<plugins> | ||
<!-- The shade plug-in is used here to create effective pom's (see SPARK-3812). --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<shadedArtifactAttached>false</shadedArtifactAttached> | ||
<artifactSet> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to include only the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then the unwanted content of the jar will be put inside all of our spark jars. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if you remove the filters? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: you could publish an empty jar in whatever repo hosts the "org.spark-project" dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @vanzin - does this jar need to exist at all? We never actually list it as a dependency in any sub project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If maven-shade-plugin does not think it "shaded" anything, it won't touch the pom and will leave the original one to be published. So you do need to provide an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Also note that Prashant added the dependency to all modules by declaring it in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see - so I should just publish an empty un-used dependency right? A bit clunky but a once time cost. |
||
<includes> | ||
<include>org.spark-project.spark:unused</include> | ||
</includes> | ||
</artifactSet> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would add a comment that says: