bazel-contrib / rules_jvm_external

Bazel rules to resolve, fetch and export Maven artifacts
Apache License 2.0
337 stars 256 forks source link

Add support for publishing maven-metadata.xml #1260

Open fzakaria opened 1 month ago

fzakaria commented 1 month ago

Maven repositories normally have a maven-metadata.xml file that indicate to the Maven system what versions are available and which is to be considered the latest version.

<metadata modelVersion="1.1.0">
    <groupId>com.mycompany.app</groupId>
    <artifactId>my-app</artifactId>
    <versioning>
        <latest>1.0</latest>
        <release>1.0</release>
        <versions>
            <version>1.0</version>
        </versions>
        <lastUpdated>20200731090423</lastUpdated>
    </versioning>
</metadata>

At Confluent, we use AWS Code Artifactory which does not mark a Maven package as "published" unless a new maven-metadata.xml is uploaded indicating so.

Co-authored-by: Vince Rose vrose@confluent.io Co-authored-by: Na Lou nlou@confluent.io

fzakaria commented 1 month ago

@shs96c we added a flag to keep it backwards compatible, but we are of the opinion the default should be true. Let us know what you think.