-
Notifications
You must be signed in to change notification settings - Fork 991
[Build] Support publishing maven artifacts directly to maven central #2397
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
Conversation
project.tasks.withType(GenerateMavenPom).all { GenerateMavenPom pom -> | ||
if (pom.name == "generatePomFileFor${publication.name.capitalize()}Publication") { | ||
BasePluginExtension baseExtension = project.getExtensions().getByType(BasePluginExtension.class); | ||
pom.destination = project.provider({"${project.buildDir}/distributions/${baseExtension.archivesName.get()}-${project.getVersion()}.pom"}) |
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.
this results in a deprecation warning and we would not want to rely on that workaround anymore.
|
||
defaultTasks 'build' | ||
|
||
dependencies { |
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.
we explicitly list the artifacts we want to publish here to avoid any accidental publication
@@ -197,3 +198,15 @@ task generateDependenciesReport(type: ConcatFilesTask) { concatDepsTask -> | |||
project.tasks.named('dependencyLicenses', DependencyLicensesTask) { | |||
it.dependencies = project.configurations.licenseChecks | |||
} | |||
|
|||
|
|||
tasks.register('copyPoms', Copy) { |
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.
temporally we want to keep the build compatible with the existing DRA build. We can remove this workaround once we rely our releases on the new mechanism
…lastic#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lastic#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lastic#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lastic#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…ntral (#2397) (#2400) * [Build] Support publishing maven artifacts directly to maven central (#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) * Fix copyPoms default are different on non main branches it seems
…entral (#2397) (#2402) * [Build] Support publishing maven artifacts directly to maven central (#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh * Update spark artifacts for aggregation zip * Fix imports
…entral (#2397) (#2401) * [Build] Support publishing maven artifacts directly to maven central (#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh * Update spark artifacts for aggregation zip * Fix imports
…entral (#2397) (#2403) * [Build] Support publishing maven artifacts directly to maven central (#2397) * Adjusted nmcp compatibility with scala variants * Fixed dist maven publishing * Fix pom generation to ignore embedded dependencies * Minor cleanup * Build maven aggregation zip as part of dra build (cherry picked from commit 9d2dac9) # Conflicts: # .buildkite/dra.sh * Update spark artifacts for aggregation zip * Fix imports
Ensure we create an maven central publishing compliant aggregation zip for all elasticsearch hadoop files we want to publish