Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-9292

Provide an ability to specify additional maven repositories for published POMs

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.20.0
    • build-system, io-java-kafka
    • None

    Description

      To support Confluent Schema Registry, KafkaIO has a dependency on io.confluent:kafka-avro-serializer from https://packages.confluent.io/maven/ repository. In this case, it should add this repository into published KafkaIO POM file. Otherwise, it will fail with the following error during building a user pipeline:

      [ERROR] Failed to execute goal on project kafka-io: Could not resolve dependencies for project org.apache.beam.issues:kafka-io:jar:1.0.0-SNAPSHOT: Could not find artifact io.confluent:kafka-avro-serializer:jar:5.3.2 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
      

      The repositories for publishing can be added by mavenRepositories argument in build script for Java configuration.

      For example (KafkaIO:

      $ cat sdks/java/io/kafka/build.gradle 
      
      ...
      applyJavaNature(
        ...
        mavenRepositories: [
          [id: 'io.confluent', url: 'https://packages.confluent.io/maven/']
        ]
      )
      ...
      

      It will generate the following xml code snippet in pom file of beam-sdks-java-io-kafka artifact after publishing:

        <repositories>
          <repository>
            <id>io.confluent</id>
            <url>https://packages.confluent.io/maven/</url>
          </repository>
        </repositories>
      

      Attachments

        Issue Links

          Activity

            People

              aromanenko Alexey Romanenko
              aromanenko Alexey Romanenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m