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

Local maven publish #521

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

AndreKurait
Copy link
Member

@AndreKurait AndreKurait commented Feb 23, 2024

Description

Adds support for local maven repo publish

  • Category: New Feature
  • Why these changes are required? Current projects wishing to import code from this project need a way to develop locally and import jars from local builds.
  • What is the old behavior before changes and new behavior after changes? Did not support publishing, now support publishing.

Issues Resolved

MIGRATIONS-1508

Is this a backport? If so, please add backport PR # and/or commits #
No

Testing

Created a sample external gradle project and imported all projects and attempted to build with some class imports.

Extract from test project build.gradle:

repositories {
    mavenCentral()
    mavenLocal()
}

dependencies {
    // This dependency is used by the application.
    implementation libs.guava

    String trafficCaptureGroup = 'org.opensearch.migrations.trafficcapture'
    String trafficCaptureVersion = '0.1.0-SNAPSHOT'

    // Define a list of projects
    def projects = [
            'captureKafkaOffloader',
            'captureOffloader',
            'captureProtobufs',
            'coreUtilities',
            'jsonJMESPathMessageTransformer',
            'jsonJMESPathMessageTransformerProvider',
            'jsonJoltMessageTransformer',
            'jsonJoltMessageTransformerProvider',
            'jsonMessageTransformerInterface',
            'jsonMessageTransformers',
            'nettyWireLogging',
            'openSearch23PlusTargetTransformerProvider',
            'replayerPlugins',
            'trafficCaptureProxyServer',
            'trafficCaptureProxyServerTest',
            'trafficReplayer',
    ]

    projects.each { projectName ->
        implementation group: "$trafficCaptureGroup", name: "$projectName", version: "$trafficCaptureVersion"
    }
}

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • 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.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.87%. Comparing base (c253aa8) to head (d99fc03).
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #521      +/-   ##
============================================
+ Coverage     76.71%   76.87%   +0.15%     
- Complexity     1385     1389       +4     
============================================
  Files           158      158              
  Lines          6086     6105      +19     
  Branches        532      532              
============================================
+ Hits           4669     4693      +24     
- Misses         1059     1061       +2     
+ Partials        358      351       -7     
Flag Coverage Δ
unittests 76.87% <ø> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +15 to +17
api group: 'io.netty', name: 'netty-buffer', version: '4.1.100.Final'
api group: 'io.netty', name: 'netty-codec-http', version: '4.1.100.Final'
api group: 'io.netty', name: 'netty-handler', version: '4.1.100.Final'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this used to be picked up via a BOM. Do you know why you had to specify the version 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.

This was needed otherwise the external gradle project has to define the version to use.

If this was picked up via a BOM, then I think it was sparsely used throughout the project as explicitly specifying the netty version seemed more common

@AndreKurait AndreKurait merged commit 1bac3f8 into opensearch-project:main Feb 23, 2024
6 of 7 checks passed
@AndreKurait AndreKurait deleted the LocalMavenPublish branch February 23, 2024 23: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.

2 participants