-
Notifications
You must be signed in to change notification settings - Fork 990
[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
base: main
Are you sure you want to change the base?
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
Ensure we create an maven central publishing compliant aggregation zip for all elasticsearch hadoop files we want to publish