Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-723

Allow copying dependencies via CLI coordinates instead of pom file

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • copy-dependencies
    • None

    Description

      It would be nice to get transitive deps into a libs dir without having to define a pom.xml first. Here's what I'm doing now.

      # Dist includes large dependencies needed by streams and connect: retain only broker and ZK.
      # We can do this because broker is independent from both kafka-streams and connect modules.
      # See https://issues.apache.org/jira/browse/KAFKA-10380
      cat > pom.xml <<-EOF
      <project>
        <modelVersion>4.0.0</modelVersion>
      
        <groupId>io.zipkin.kafka</groupId>
        <artifactId>get-kafka</artifactId>
        <version>0.1.0-SNAPSHOT</version>
        <packaging>pom</packaging>
      
        <dependencies>
          <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_${SCALA_VERSION}</artifactId>
            <version>${KAFKA_VERSION}</version>
          </dependency>
          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.30</version>
          </dependency>
        </dependencies>
      </project>
      EOF
      mvn -q --batch-mode dependency:copy-dependencies -DoutputDirectory=libs && rm pom.xml
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            adriancole Adrian Cole
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: