https://github.com/marcelmay/wire-maven-plugin
A Maven plugin providing Wire ProtoBuf Compiler support. A (resurrected) fork of the original plugin.
https://github.com/marcelmay/wire-maven-plugin
java protobuf-compiler wire
Last synced: 9 months ago
JSON representation
A Maven plugin providing Wire ProtoBuf Compiler support. A (resurrected) fork of the original plugin.
- Host: GitHub
- URL: https://github.com/marcelmay/wire-maven-plugin
- Owner: marcelmay
- License: apache-2.0
- Created: 2020-06-05T09:58:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T13:54:08.000Z (over 2 years ago)
- Last Synced: 2025-07-27T22:46:26.122Z (11 months ago)
- Topics: java, protobuf-compiler, wire
- Language: Java
- Homepage:
- Size: 717 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Wire Maven Plugin
==================================
The *wire-maven-plugin* wraps the [Wire](https://square.github.io/wire/) protobuf compiler.
[](LICENSE)
[](http://search.maven.org/#search%7Cga%7C1%7Cde.m3y.maven.wire-maven-plugin)
This is a (resurrected) [fork](https://github.com/square/wire/tree/3.0.2/wire-maven-plugin) of the original plugin by the Wire project,
which [dropped](https://github.com/square/wire/pull/1326) this plugin.
What is it good for?
--------------------
* Integrates the [Wire](https://square.github.io/wire/) Protobuf compiler in your Maven project
* Supports Java code generator
* Kotlin code generator is on the TODO list
Check out the [plugin website][site] including [usage][site_usage] for details for Maven goal [generate-sources](https://marcelmay.github.io/wire-maven-plugin/generate-sources-mojo.html).
[site]: http://marcelmay.github.io/wire-maven-plugin/
[site_usage]: https://marcelmay.github.io/wire-maven-plugin/usage.html
[repo-snapshot]: https://oss.sonatype.org/content/repositories/snapshots/de/m3y/maven/wire-maven-plugin/
Quickstart
----------
1. Put your ProtoBuf definition in ```src/main/proto```
2. Configure plugin in pom.xml
```xml
...
de.m3y.maven
wire-maven-plugin
1.3
generate-sources
generate-sources
```
3. Add Wire runtime dependency in pom.xml (required by Wire compiler generated sources)
```xml
com.squareup.wire
wire-runtime
4.9.3
```
See the [integration test](src/it/generate-java) if you look for a working example,
check out the [generate-sources goal documentation](https://marcelmay.github.io/wire-maven-plugin/generate-sources-mojo.html)
and have a look at the [Wire project docs](https://square.github.io/wire/).
Development
-----------
* Build the plugin
```mvn clean install```
Make sure you got [Maven 3.9+][maven_download] or higher.
* Build the site
```mvn site -Psite```
or
```mvn site-deploy -Psite```
* Release
```
mvn release:prepare
mvn release:perform
```
* Deploy snapshot
```mvn clean deploy -Prelease```
Note: The release profile contains the snapshot repository for distribution management
[maven_download]: http://maven.apache.org