Skip to content

Always use archive base name as the pom artifact id #56447

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

Merged
merged 2 commits into from
May 8, 2020

Conversation

mark-vieira
Copy link
Contributor

We override the archivesBaseName for several projects. When these are published, we also interpret the GAV coordinates to use the update archive name as well. However, Gradle publishing plugins use the project name by default. We override this manually in several places but it's easy to miss some, like shadow jar projects. This PR moves this logic into our BuildPlugin so it's done in a central location and there no risk of forgetting to add the override.

Relates to #56415

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label May 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label May 8, 2020
@mark-vieira mark-vieira requested a review from rjernst May 8, 2020 17:48
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM


// have to defer this until archivesBaseName is set
project.afterEvaluate {
publication.artifactId = project.convention.getPlugin(BasePluginConvention).archivesBaseName
Copy link
Member

Choose a reason for hiding this comment

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

it's unfortunate MavenPublication doesn't use Providers :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thoughts exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants