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

Include sources and javadoc artifacts while publishing to a Maven repository #1049

Merged
merged 2 commits into from
Aug 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Include sources and javadoc artifacts while publishing to a Maven rep…
…ository.

This change fixes the issue where running publish commands the sources and javadoc artifacts were not built and included with each publication.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
  • Loading branch information
adnapibar committed Aug 4, 2021
commit 7c756ad9babade120a0008b905fea7829defaa1f
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ public String call() throws Exception {
// have to defer this until archivesBaseName is set
project.afterEvaluate(p -> publication.setArtifactId(getArchivesBaseName(project)));

if (project.getPlugins().hasPlugin("opensearch.java")) {
publication.artifact(project.getTasks().getByName("sourcesJar"));
publication.artifact(project.getTasks().getByName("javadocJar"));
}
tlfeng marked this conversation as resolved.
Show resolved Hide resolved

generatePomTask.configure(
t -> t.dependsOn(String.format("generatePomFileFor%sPublication", Util.capitalize(publication.getName())))
);
Expand Down