Search code examples
mavenclojureprotocol-buffersleiningen

lein: Cannot find protoc jar on maven even though I find all the other protobuffer jars on there?


Currently having some output from a build as follows:

Retrieving com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar from central
Retrieving com/google/protobuf/protobuf-java-util/3.3.0/protobuf-java-util-3.3.0.jar from central
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in central (https://repo1.maven.org/maven2/)
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in clojars (https://clojars.org/repo/)
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in sonatype snapshots (https://oss.sonatype.org/content/repositories/snapshots)
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in sonatype releases (https://oss.sonatype.org/content/repositories/releases)
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in SonatypeSnapshots (https://oss.sonatype.org/content/repositories/snapshots/)
Could not find artifact com.google.protobuf:protoc:jar:3.3.0 in SonatypeReleases (https://oss.sonatype.org/content/repositories/releases/)

So it finds protobuf-java and protobuf-java-util fine, but can't find protoc??

I checked, and it claims it is there: https://mvnrepository.com/artifact/com.google.protobuf/protoc

I have these lines in my project.clj:

[com.google.protobuf/protobuf-java "3.3.0"]
[com.google.protobuf/protobuf-java-util "3.3.0"]
[com.google.protobuf/protoc "3.3.0"]

It finds the first two fine, then fails on the last!

I can't for the life of me figure out what is going on here. Any clues?? I have resolved many dumb dependency issues before, but this one makes no sense.

Thanks!


Solution

  • This particular artefact requires you to specify a classifier that describes the runtime platform:

    [com.google.protobuf/protoc "3.3.0" :classifier "linux-x86"]
    

    If you use the The Central Repository Search Engine and search for "protoc" you will see it on the first line with all the different classifiers listed in the Download column.