Development happens mostly in Eclipse, and until a couple of months ago with m2eclipse. With the release of m2e (m2eclipse successor), our builds don’t work as is in Eclipse.
The reason is that we run the maven-protoc-plugin (the David Trott fork which is more or less now the only one available still seeing development). This maven plugins allows the
protoc Protocol Buffers compiler to be run at the
generate-sources phase of the Maven Lifecycle. Under m2eclipse, this phase was happening outside Eclipse and the builds was running fine.
Unfortunately m2e is not able to solve this correctly. It requires using a connector. Those connectors are Eclipse plugins that ties a maven plugin to a m2e build lifecycle phase. This way when m2e needs to execute this phase of the build, it can do so with the connector.
Until now, there wasn’t any lifecycle connector for the maven-protoc-plugin. This wasn’t possible to continue without this in the long term for our development team, so I took a stab to build it.
In fact it was way simpler than what I first thought. I used the m2e Extension Development Guide as a bootstrap (and especially the EGit extension).
The result of this few hours of development is now open-source and available in the m2e-protoc-connector Github repository.
I didn’t release an Eclipse p2 update repository (mainly because I don’t really know how to do that), so you’ll have to build the project by yourself (but it’s easy).
- Clone the repository
- Build with maven 3
Once built, you’ll find the feature packaged in
To install in Eclipse Indigo:
- open the
Install New Softwarewindow from the
- Then click on the
- select the
Archivebutton and point it to the:
- Accept the license terms and restart eclipse.
To use it there is no specific need, as long as your
pom.xml conforms roughly to what we use:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
If you find any problem, do not hesitate to open an issue on the github repository.