Skip to content

Instantly share code, notes, and snippets.

@gunnarmorling

gunnarmorling/deps.java

Last active Aug 29, 2015
Embed
What would you like to do?
File[] files = Maven.resolver()
.resolve( "org.apache.avro:avro:jar:1.7.6" )
.withTransitivity()
.asFile();
System.out.println( Arrays.toString( files ) );
[
/path/to/.m2/repository/org/apache/avro/avro/1.7.6/avro-1.7.6.jar,
/path/to/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar,
/path/to/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar,
/path/to/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar,
/path/to/.m2/repository/org/xerial/snappy/snappy-java/1.0.5/snappy-java-1.0.5.jar,
/path/to/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar,
/path/to/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar,
/path/to/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment