GithubHelp home page GithubHelp logo

jz-maven-plugin's Introduction

How to write a maven plugin

About

Maven plugin workshop at Javazone 2014.

Clone this repo: git clone https://github.com/kantega/jz-maven-plugin.git

Requirements

  • Git 1.7.10+
  • Apache Maven 3.x
  • JVM 7.x
  • A decent IDE, like IDEA, Eclipse

The role of plugins in Maven

Everything that is done during the Maven-build is done in plugins. Processing of resources are done with Maven Resources Plugin, Compiling of sources are done with Maven Compiler Plugin, Assembly of jar and war files are done with Maven JAR Plugin and Maven WAR Pluginโ€ฆ

Through Maven's plugin api we can hook into any phase of the build in order to do our own tasks.

Where can I find documentation?

You can try looking around, starting with Plugin Developers Centre. But unless you are trying to do something that is really trivial you will probably not find what you need.

The plugin api is poorly documented, so you may need to find some other plugin that does something similar and see how it accomplishes its task, then use that as inspiration. Or you may have to find a part of the api that sounds like it does something you want, and experiment with it.

The plugin api has changed a lot between Maven 2 and Maven 3, so other plugins you find may be using a old version of the plugin api. These plugins will run fine, but when looking at the code you will se that many api classes used are marked as deprecated. The problem with this is that there is usually no description of why a particular class or method is deprecated, or what replaces it.

Enough ranting, lets start hacking!

This workshop is based on one branch per step. To get started with step one execute git checkout step-1 -f

jz-maven-plugin's People

Contributors

computerlove avatar

Watchers

 avatar  avatar  avatar

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.