1
votes

WORKSPACE file

maven_jar(
name = "jdoc",
artifact = "javadoc:javadoc:1.3",
)


Error message after Bazel build

 no such package '@jdoc//jar': Failed to fetch Maven dependency: Could not find artifact javadoc/javadoc:javadoc:jar:1.3 in jdoc (https://repo1.maven.org/maven2/)


Question:

Why the artifact become javadoc/javadoc:javadoc:jar:1.3? javadoc/javadoc:javadoc:1.3 is expected.


The javadoc:javadoc:1.3 repo does exit at https://repo1.maven.org/maven2/.

enter image description here

2
@starcorn Thanks for your attention. I use bazel as building tool instead maven. Relevant code is in the WORKSPACE file.Lanting Guo
Based on the docs it looks Ok..bit it might be helpful to post the full error output and may be the full build file...khmarbaise
Ah..the problem is that this artifact is only a pom file and not a jar. You are trying to pull a jar file which does not exist. It's only a pom file nothing more...khmarbaise

2 Answers

3
votes

I wrote the maven_jar rule. Unfortunately, "Could not find artifact javadoc/javadoc:javadoc:jar:1.3 in jdoc" is the error message Bazel gets from the Maven API (see the code). I've filed a bug to see if we can make this any clearer, particularly in this case.

0
votes

The javadoc:javadoc:1.3 does not exist at maven repository. enter image description here

After clicking Download(JAR), A 404 page appears.

I am confused by the error message returned by bazel.