Problem I am solving: I need a Maven plugin for Protobuf and from my google searches, I have concluded that the maven-protoc-plugin has the most mindshare at the moment. The most recent activity on this plugin was in March 2013 which is also very encouraging (Link: https://code.google.com/p/protobuf/issues/detail?id=476)
My roadblocks: I am unable to get the plugin to work. Specifically, I am unable to get the plugin to download. I use Maven with Eclipse [Eclipse Java EE IDE for Web Developers, Version: Juno Service Release 1 Build id: 20120920-0800] I have put the relevant snippets of the configuration I have added to my pom.xml below. There were multiple references that led me to this configuration but I am not being allowed to post them here. I have tried to reference them in some way (for complete information) and have noted issues with each of them:
Ref 1: On github (github.com), there is a location
sergei-ivanovSLASHmaven-protoc-plugin - This has the configuration
for the plugin repository but the URL mentioned in this resource is a
404 resource
Ref 2: The github HTTP location (sergei-ivanov.github.io) has an HTML
file at maven-protoc-pluginSLASHproject-summary.html which has a
Download URL that is not working either
Ref 3: The github location (sergei-ivanov.github.io) has another HTML
file at /maven-protoc-pluginSLASHusage.html - This URL has a snippet
that shows the configuration for: maven-protoc-plugin,
maven-compiler-plugin and the protobuf-java dependency. It does NOT
have a plugin repository configuration.
My XML is on pastebin at http://pastebin.com/VPyH3CPr
I am trying to run a goal in the plugin with the following commands through Eclipse Run Configuration: Goals: maven-protoc-plugin:protobufcompile Profiles: dev
I get the following messages: [INFO] Scanning for projects... [WARNING] The POM for com.google.protobuf.tools:maven-protoc-plugin:jar:0.3.1 is missing, no dependency information available [WARNING] Failed to retrieve plugin descriptor for com.google.protobuf.tools:maven-protoc-plugin:0.3.1: Plugin com.google.protobuf.tools:maven-protoc-plugin:0.3.1 or one of its dependencies could not be resolved: [ERROR] No plugin found for prefix 'maven-protoc-plugin' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\.m2\repository), all-repos (/artifactory/all-repos)] -> [Help 1] Some other errors here. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] URL for confluence/display/MAVEN/NoPluginFoundForPrefixException
Questions:
If you want Sergei Ivanov fork of maven-protoc-plugin originally maintained by David Trott, just download one of Ivanov's relases such as 0.3.1 and install it manually.
cd maven-protoc-plugin-maven-protoc-plugin-0.3.1
mvn clean install
Then just follow the site usage guide to set up your project.
While I do recommend you to stick with Ivanov's fork; if you don't need the toolchain support or other contributed features, Trott's repo is still up and running.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With