Skip to content

A Maven plugin providing Wire ProtoBuf Compiler suppoort. A (resurrected) fork of the original plugin.

License

Notifications You must be signed in to change notification settings

marcelmay/wire-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wire Maven Plugin

The wire-maven-plugin wraps the Wire protobuf compiler.

Apache License, Version 2.0, January 2004 Maven Central

This is a (resurrected) fork of the original plugin by the Wire project, which dropped this plugin.

What is it good for?

  • Integrates the Wire Protobuf compiler in your Maven project
  • Supports Java code generator
  • Kotlin code generator is on the TODO list

Check out the plugin website including usage for details for Maven goal generate-sources.

Quickstart

  1. Put your ProtoBuf definition in src/main/proto

  2. Configure plugin in pom.xml

    <build>
      ...
      <plugins>
    
        <plugin>
          <groupId>de.m3y.maven</groupId>
          <artifactId>wire-maven-plugin</artifactId>
          <version>1.3</version> <!-- Check for latest version! -->
          <executions>
            <execution>
                <phase>generate-sources</phase>
                <goals>
                    <goal>generate-sources</goal>
                </goals>
            </execution>
          </executions>
        </plugin>
    
      </plugins>
    </build>
  3. Add Wire runtime dependency in pom.xml (required by Wire compiler generated sources)

    <dependency>
       <groupId>com.squareup.wire</groupId>                                                                                             
       <artifactId>wire-runtime</artifactId>                                                                                            
       <version>4.9.3</version> <!-- Check for latest version -->
    </dependency>

See the integration test if you look for a working example, check out the generate-sources goal documentation and have a look at the Wire project docs.

Development

  • Build the plugin

    mvn clean install

    Make sure you got Maven 3.9+ 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

About

A Maven plugin providing Wire ProtoBuf Compiler suppoort. A (resurrected) fork of the original plugin.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages