Skip to content

Linkage Monitor to run check with BOMs update not individual libraries #853

Closed

Description

@suztomo

As of now Linkage Monitor run linkage check with individual libraries with "-SNAPSHOT" suffix. This causes problem in google-cloud-java update to use newer version of gax. googleapis/google-cloud-java#6133

https://source.cloud.google.com/results/invocations/fae7cf9e-75bb-4094-98ae-854fbe6cfe01

#852

Because gax is not part of google-cloud-java, Linkage Monitor does not pick up newer gax.

google-cloud-bom is in google-cloud-java repository. https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-bom.

[INFO] --- maven-install-plugin:2.4:install (default-install) @ google-cloud-bom ---
[INFO] Installing /tmpfs/src/github/google-cloud-java/google-cloud-bom/pom.xml to /root/.m2/repository/com/google/cloud/google-cloud-bom/0.106.1-alpha-SNAPSHOT/google-cloud-bom-0.106.1-alpha-SNAPSHOT.pom

Google-cloud-bom is imported from https://github.com/GoogleCloudPlatform/cloud-opensource-java/blob/master/boms/cloud-oss-bom/pom.xml .

Solution

Linkage Monitor should update BOM entries rather than individual libraries.

Challenge

We want the variable interpolated but dependency management section import intact when replacing elements of a BOM.

https://stackoverflow.com/questions/4838591/is-there-a-library-for-reading-maven2-3-pom-xml-files

Maven Model Builder https://maven.apache.org/maven-model-builder/ provides 2 phases. Split model building into 2 phases and replace elements of BOM between the 2 phases.

Activity

  1. suztomo commented on Aug 28, 2019

    @suztomo
    ContributorAuthor

    2-phase model building looks promising.

    image

    Now Linkage Monitor complains it cannot find locally-installed com.google.cloud:google-cloud-contrib:jar:0.106.1-alpha-SNAPSHOT.

    Could not find artifact com.google.cloud:google-cloud-contrib:jar:0.106.1-alpha-SNAPSHOT
    

    The file repository (~/.m2/repository) holds some files but with "-tests" suffix. Is this suffix the reason?

    image

    google-cloud-contrib is type:pom at 0.106.0-alpha as well as 0.91.0-alpha.

    google-cloud-bom:0.91.0-alpha contains google-cloud-contrib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions