bazeltools / bazel-deps

Generate bazel dependencies for maven artifacts
MIT License
250 stars 121 forks source link

maven package tokens not substituted #224

Closed milesmatthias closed 5 years ago

milesmatthias commented 5 years ago

Through going through #223, see notes, one of my packages depends on netty-tcnative, but running the parser doesn't resolve a token, and I've tried adding the value for the substitution and added an os classifier in dependencies.yaml, but all are getting this error:

INFO: Running command line: bazel-bin/src/scala/com/github/johnynek/bazel_deps/parseproject generate -r /java-server/ -s 3rdpartyINFO: Build completed successfully, 1 total action
[main] ERROR MakeDeps - resolution and sha collection failed
org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.14.Final, io.pivotal.gemfire:geode-common:jar:9.5.2, io.pivotal.gemfire:geode-core:jar:9.5.2, io.pivotal.gemfire:geode-cq:jar:9.5.2, io.pivotal.gemfire:geode-json:jar:9.5.2, io.pivotal.gemfire:geode-lucene:jar:9.5.2, io.pivotal.gemfire:geode-wan:jar:9.5.2, org.restlet.jee:org.restlet:jar:2.3.0, org.restlet.jee:org.restlet.ext.servlet:jar:2.3.0: Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.14.Final in central (http://central.maven.org/maven2/)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifacts(DefaultRepositorySystem.java:302)
    at com.github.johnynek.bazel_deps.AetherResolver$$anonfun$getExt$1$1.apply(AetherResolver.scala:129)
    at com.github.johnynek.bazel_deps.AetherResolver$$anonfun$getExt$1$1.apply(AetherResolver.scala:127)
    at scala.util.Try$.apply(Try.scala:192)

Notice ${os.detected.classifier} is not resolving to my os type. I can see the jar I need and what the os type classifier value should be here: http://central.maven.org/maven2/io/netty/netty-tcnative/2.0.14.Final/.

johnynek commented 5 years ago

@milesmatthias did you try with the coursier resolver?

milesmatthias commented 5 years ago

@johnynek nope, I didn't. Will try that now.

milesmatthias commented 5 years ago

@johnynek that did it. Will update my notes.