[ 
https://issues.apache.org/jira/browse/MNG-6711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16887413#comment-16887413
 ] 

Michael Osipov commented on MNG-6711:
-------------------------------------

So, I've found the cause: it is just Google ignorance that there might be other 
OSes, but Windows, Linux and macOS. Dremio defines the artifact I'd of the 
protoc executable 
(https://github.com/dremio/dremio-oss/blob/master/pom.xml#L907) in Central with 
the help of the os-maven-plugin. Looking at the protobuf plugin source 
(https://github.com/xolstice/protobuf-maven-plugin/blob/master/src/main/java/org/xolstice/maven/plugin/protobuf/AbstractProtocMojo.java#L444-L465)
 it downloads the executable on the fly which does not exist for freebsd on 
Central. Therefore the error.

My recommendation for the ports tree is to depend on the protoc port and 
prepatch  the POM by swapping the protocArtifact with the protocExecutable with 
the path from LOCALBASE and you are done.

> Maven tries to download protobuf:protoc for BSD, while the binary is already 
> installed
> --------------------------------------------------------------------------------------
>
>                 Key: MNG-6711
>                 URL: https://issues.apache.org/jira/browse/MNG-6711
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Yuri
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: wontfix-candidate
>
>
> This maven-based project failed on FreeBSD 12: 
> https://github.com/dremio/dremio-oss
> {code:java}
> [ERROR] Failed to execute goal 
> org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile (default) on 
> project dremio-protocol: Missing:
> [ERROR] ----------
> [ERROR] 1) com.google.protobuf:protoc:exe:freebsd-x86_64:2.5.0
> [ERROR]
> [ERROR]   Try downloading the file manually from the project website.
> [ERROR]
> [ERROR]   Then, install it using the command:
> [ERROR]       mvn install:install-file -DgroupId=com.google.protobuf 
> -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=freebsd-x86_64 
> -Dpackaging=exe -Dfile=/path/to/file
> [ERROR]
> [ERROR]   Alternatively, if you host your own repository you can deploy the 
> file there:
> [ERROR]       mvn deploy:deploy-file -DgroupId=com.google.protobuf 
> -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=freebsd-x86_64 
> -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> [ERROR]
> [ERROR]   Path to dependency:
> [ERROR]       1) 
> com.dremio:dremio-protocol:jar:3.2.4-201906051751050278-1bcce62
> [ERROR]       2) com.google.protobuf:protoc:exe:freebsd-x86_64:2.5.0
> [ERROR]
> [ERROR] ----------
> [ERROR] 1 required artifact is missing.
> [ERROR]
> [ERROR] for artifact:
> [ERROR]   com.dremio:dremio-protocol:jar:3.2.4-201906051751050278-1bcce62
> [ERROR]
> [ERROR] from the specified remote repositories:
> [ERROR]   dremio-free (http://maven.dremio.com/free/, releases=true, 
> snapshots=true),
> [ERROR]   dremio-public (http://maven.dremio.com/public/, releases=true, 
> snapshots=true),
> [ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, 
> snapshots=false)
> [ERROR]
> [ERROR] -> [Help 1]
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default-jar) on project 
> dremio-slim-shade: You have to use a classifier to attach supplemental 
> artifacts to the project instead of replacing them. -> [Help 1]
> [ERROR]
> {code}
> It attempted to download the prebuilt executable which is already installed 
> in the system:
> {code:java}
> $ which protoc
> /usr/local/bin/protoc
> $ pkg which /usr/local/bin/protoc
> /usr/local/bin/protoc was installed by package protobuf-3.7.1,1
> {code}
> maven-3.6.1



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to