GithubHelp home page GithubHelp logo

isabella232 / m2e-apt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbosstools/m2e-apt

0.0 0.0 0.0 791 KB

Maven integration with Eclipse JDT Annotation Processor Toolkit

Java 94.05% CSS 0.33% XSLT 3.33% HTML 2.28%

m2e-apt's Introduction

Maven integration with Eclipse JDT Annotation Processor Toolkit.

โš ๏ธ The m2e-apt code has been moved to the Eclipse m2e project. It'll be part of m2e 2.x releases. As a consequence, this repository is now archived.

Build Status

m2e-apt aims at providing automatic Annotation Processing configuration in Eclipse based on your project's pom.xml and its classpath dependencies. m2e-apt requires Java >= 1.8 to run, but will work on Java 6 projects.

Due to some rogue annotation processors at large, we decided to disable automatic annotation processing by default. By default, your manual settings for Eclipse JDT APT apply.

Go to Window > Preferences > Maven > Annotation Processing or right-click on your project Properties > Maven > Annotation Processing to select the Annotation Processing strategy of your choice.

m2e-apt supports both Annotation Processing set on the maven-compiler-plugin or the maven-processor-plugin (the latter takes precedence over the former).

When Annotation Processing is managed by Eclipse JDT APT, any change in your source classes triggers incremental processing automatically, however subtle differences in Annotation classpath might lead to unexpected results. Moreover, main and test sources separation only works in Eclipse Photon or more recent versions. You can change the workspace or project preferences to delegate annotation processing to maven, instead of JDT APT. This will result in slower incremental builds (all classes will be processed) but will provide identical results to maven command line builds. Note this only works when using maven-processor-plugin. When annotation processing is driven by maven-compiler-plugin, JDT APT is always used in eclipse.

See this blog post for more informations.

Default m2e-apt activation mode (from workspace preferences) can be overridden by an <m2e.apt.activation> Maven property in a project's pom.xml settings section. Valid values are :

  • disabled : m2e-apt activation is disabled for this project
  • jdt_apt : enable m2e-apt on this project and delegate Annotation Processing to JDT APT
  • maven_plugin : enable m2e-apt on this project and delegate Annotation Processing to the proper maven plugin execution Project preferences supercede existing pom properties.

The toolkit uses Eclipse JDK, that's why additional configuration may needed to be done for legacy projects which depend on outdated JDK. For example in Eclipse 2020-09 (which runs on JDK11+ only), in case a project needing m2e-apt is using JDK8, additional annotation processing paths must be added to the project's pom.xml for successful compilation (to the plugin's annotationProcessorPaths section):

<path>
	<groupId>jakarta.xml.bind</groupId>
	<artifactId>jakarta.xml.bind-api</artifactId>
	<version>2.3.3</version>
</path>
<path>
	<groupId>javax.annotation</groupId>
	<artifactId>jsr250-api</artifactId>
	<version>1.0</version>
</path>

m2e-apt can be installed from :

m2e-apt requires m2e 1.5+

m2e-apt's People

Contributors

brychcy avatar caiwei-ebay avatar dependabot[bot] avatar facboy avatar fbricon avatar karlmdavis avatar lorenzhawkes avatar lrozenblyum avatar mmalina avatar nickboldt avatar pkelchner avatar wondercsabo 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.