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

Support unsigned Maven publication. Set groupId to org.opensearch.dataprepper #596

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

dlvenable
Copy link
Member

@dlvenable dlvenable commented Nov 15, 2021

Description

  • Support unsigned Maven publication
  • Configured the Maven POM to meet Sonatype requirements, based on OpenSearch values
  • Changed the group Id to org.opensearch.dataprepper.

Issues Resolved

Supports #421

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dlvenable dlvenable requested a review from a team as a code owner November 15, 2021 21:37
@dlvenable dlvenable requested a review from cmanning09 November 15, 2021 21:37
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2021

Codecov Report

Merging #596 (43eb108) into main (54f8ce7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #596   +/-   ##
=========================================
  Coverage     91.70%   91.70%           
  Complexity      571      571           
=========================================
  Files            72       72           
  Lines          1747     1747           
  Branches        145      145           
=========================================
  Hits           1602     1602           
  Misses          113      113           
  Partials         32       32           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54f8ce7...43eb108. Read the comment docs.

@@ -11,7 +12,7 @@ allprojects {
apply plugin: 'checkstyle'
apply plugin: 'com.diffplug.spotless'

group = 'com.amazon'
group = 'org.opensearch.dataprepper'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we need to update all sub-projects to use 'org.opensearch.dataprepper'?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure exactly what you mean.

By convention the Maven groupId is the beginning of Java package names. Data Prepper 2.0 is scheduled to update all Java package names to org.opensearch.dataprepper as part of #344.

Because this project has not yet been deployed, the Maven groupId is currently not used. So this is not a breaking change.

build.gradle Outdated
@@ -94,6 +96,43 @@ configure(subprojects.findAll {it.name != 'data-prepper-api'}) {
}
}

configure(mavenArtifactProjects) {
java {
// TODO: Add once Javadocs are working
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be updated now that the Javadocs are fixed in #597

ext.coreProjects = [project(':data-prepper-api'), project(':data-prepper-core'), project('data-prepper-plugins:common')]
ext.mavenArtifactProjects = [project(':data-prepper-api'), project('data-prepper-plugins:common')]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to publish the common plugins? How does this help plugin developers?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we don't need them, can we add the publishing instructions to the plugin build.gradle file instead?

Copy link
Member Author

@dlvenable dlvenable Nov 16, 2021

Choose a reason for hiding this comment

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

I took another look at common. I believe we can remove it from the publication.

If we don't need them, can we add the publishing instructions to the plugin build.gradle file instead?

Can you elaborate on this request?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I mixed plugins and api in my original ask. I was thinking we could have the publishing instructions closer to the package that we are publishing but this works as is.

maven(MavenPublication) {
from components.java
pom {
name = project.name
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the project name that gets published here? Are we publishing multiple projects here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the name of the current project. Thus, it will data-prepper-api and common. Though, per the discussion above, I will remove common.

@dlvenable dlvenable force-pushed the maven-publication-421 branch from 2ca0ace to 43eb108 Compare November 16, 2021 23:28
@dlvenable
Copy link
Member Author

I had to force push the second commit because I needed the Javadoc work from #597 .

@dlvenable dlvenable merged commit 169365c into opensearch-project:main Nov 17, 2021
dapowers87 pushed a commit to dapowers87/data-prepper that referenced this pull request Nov 18, 2021
…aprepper (opensearch-project#596)

Support unsigned Maven publication. Updated the project groupId to org.opensearch.dataprepper. Added some documentation for publishing Maven artifacts to the Plugin Development guide. Supports opensearch-project#421

Signed-off-by: David Venable <[email protected]>
@dlvenable dlvenable deleted the maven-publication-421 branch November 29, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants