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

Gradle: create maven artifacts #7007

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Gradle: create maven artifacts #7007

merged 3 commits into from
Oct 19, 2022

Conversation

planetf1
Copy link
Member

@planetf1 planetf1 commented Oct 18, 2022

Description

  • Adds publishing of all maven artifacts . For example, for a local ~/.m2 publish use:
./gradlew build publishToMavenLocal

Publishing to official repos is coded, but not yet tested as it can only run in the CI/CD process.

The relevant Java 'jar', as well as javadoc & sources (required for maven central) are included.

  • Refactors gradle file for legibility

Related Issue(s)

See #3370

Testing

For this first stage, I've only verified artifacts are created. Their names default to the directory name - this needs checking against maven, as do their contents

ie After a local publish, output can be found in ~/.m2/repository/org/odpi/egeria

➜  v4 git:(gradle40) ls -latr ~/.m2/repository/org/odpi/egeria/graph-repository-connector
total 8
drwxr-xr-x  424 jonesn  staff  13568 18 Oct 17:25 ..
drwxr-xr-x    8 jonesn  staff    256 18 Oct 17:25 3.13-SNAPSHOT
drwxr-xr-x    4 jonesn  staff    128 18 Oct 17:25 .
-rw-r--r--    1 jonesn  staff    335 18 Oct 18:38 maven-metadata-local.xml
➜  v4 git:(gradle40) ls -latr ~/.m2/repository/org/odpi/egeria/graph-repository-connector/3.13-SNAPSHOT
total 1144
drwxr-xr-x  8 jonesn  staff     256 18 Oct 17:25 .
drwxr-xr-x  4 jonesn  staff     128 18 Oct 17:25 ..
-rw-r--r--  1 jonesn  staff    1298 18 Oct 18:38 maven-metadata-local.xml
-rw-r--r--  1 jonesn  staff  140058 18 Oct 18:38 graph-repository-connector-3.13-SNAPSHOT.jar
-rw-r--r--  1 jonesn  staff   26070 18 Oct 18:38 graph-repository-connector-3.13-SNAPSHOT.pom
-rw-r--r--  1 jonesn  staff   28005 18 Oct 18:38 graph-repository-connector-3.13-SNAPSHOT.module
-rw-r--r--  1 jonesn  staff  105601 18 Oct 18:38 graph-repository-connector-3.13-SNAPSHOT-sources.jar
-rw-r--r--  1 jonesn  staff  189786 18 Oct 18:38 graph-repository-connector-3.13-SNAPSHOT-javadoc.jar
  • Still need to verify javadoc build ok
    a) aggregate - this is published, and is a subset of our javadoc but in a single report. Patterns are specified in the build.gradle to fine tune the contents.
    b) module - this is uploaded to maven central, and is mandatory for every module, and should have content.

Release Notes & Documentation

Additional notes

  • Maven artifacts still need checking. This is prep work for v4 and not used for any release activity yet
  • Most of our 'packaging' poms are not created. They have no build.gradle (intentionally) - this needs review.

@planetf1 planetf1 changed the title Gradle updates Gradle: create maven artifacts Oct 18, 2022
@planetf1 planetf1 mentioned this pull request Oct 18, 2022
25 tasks
@planetf1
Copy link
Member Author

planetf1 commented Oct 19, 2022

Testing notes:

The only warning produced is:

Multiple publications with coordinates 'org.odpi.egeria:glossary-author-fvt:3.13-SNAPSHOT' 
are published to repository 'mavenLocal'. The publications 'connector' in project 
':open-metadata-test:open-metadata-fvt:access-services-fvt:glossary-author-fvt' and 
'connector' in project 
':open-metadata-test:open-metadata-fvt:view-services-fvt:glossary-author-fvt' 
will overwrite each other!

@planetf1 planetf1 marked this pull request as ready for review October 19, 2022 16:14
@planetf1
Copy link
Member Author

This initial update to create maven artifacts will be merged - issue #3370 has more notes on some of the next steps
on maven artifacts to bring the build closer to maven parity

@planetf1 planetf1 merged commit aa44bd7 into odpi:master Oct 19, 2022
@planetf1 planetf1 mentioned this pull request Nov 2, 2022
31 tasks
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.

1 participant