Code Monkey home page Code Monkey logo

wire-maven-plugin's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.