Skip to content
Commits on Source (6)
......@@ -15,12 +15,19 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
* [Version 2 (old)](http://bsorrentino.github.io/maven-annotation-plugin/site2/index.html)
## Related plugin ##
## Related plugin
[m2e-apt](https://github.com/jbosstools/m2e-apt) | eclipse plugin from Jboss
----|----
[m2e-annotations](https://github.com/ilx/m2e-annotations) | eclipse plugin
## Releases ##
## Develop an annotation processor
* [ANNOTATION PROCESSING 101](http://hannesdorfmann.com/annotation-processing/annotationprocessing101)
## Releases
currently | **Release 3.3.3-SNAPSHOT** | available from **[MAVEN CENTRAL REPO](https://oss.sonatype.org/content/repositories/snapshots/org/bsc/maven/maven-processor-plugin/3.3.3-SNAPSHOT/)** |
---- | ---- | ----
Sep 7,2017 | **Release 3.3.2**. | Available on **[MAVEN CENTRAL REPO](http://search.maven.org/#artifactdetails%7Corg.bsc.maven%7Cmaven-processor-plugin%7C3.3.2%7Cmaven-plugin)** |
----|----|----
......@@ -30,6 +37,12 @@ Sep 7,2017 | **Release 3.3.2**. | Available on **[MAVEN CENTRAL REPO](http://sea
> Thanks to [beikov](https://github.com/beikov) for contribution
Apr 11,2017 | **Release 3.3.1**. | Available on **[MAVEN CENTRAL REPO](http://search.maven.org/#artifactdetails%7Corg.bsc.maven%7Cmaven-processor-plugin%7C3.3.1%7Cmaven-plugin)** |
----|----|----
* [Issue 66](https://github.com/bsorrentino/maven-annotation-plugin/issues/66) - source 1.8 ignored
* [Issue 67](https://github.com/bsorrentino/maven-annotation-plugin/issues/67) - options are not taking in consideration
Apr 10,2017 | **Release 3.3**. | Available on **[MAVEN CENTRAL REPO](http://search.maven.org/#artifactdetails%7Corg.bsc.maven%7Cmaven-processor-plugin%7C3.3%7Cmaven-plugin)** |
----|----|----
......
maven-processor-plugin (3.3.3-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patch
* Standards-Version updated to 4.3.0
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Sat, 19 Jan 2019 23:22:56 +0100
maven-processor-plugin (3.3.2-2) unstable; urgency=medium
* Team upload.
......
......@@ -11,9 +11,9 @@ Build-Depends:
libmaven3-core-java,
libplexus-compiler-java,
maven-debian-helper (>= 1.5)
Standards-Version: 4.1.4
Vcs-Git: https://anonscm.debian.org/git/pkg-java/maven-processor-plugin.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/maven-processor-plugin.git
Standards-Version: 4.3.0
Vcs-Git: https://salsa.debian.org/java-team/maven-processor-plugin.git
Vcs-Browser: https://salsa.debian.org/java-team/maven-processor-plugin
Homepage: http://bsorrentino.github.io/maven-annotation-plugin/
Package: libmaven-processor-plugin-java
......
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java
+++ b/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java
@@ -399,6 +399,8 @@
@@ -402,6 +402,8 @@
{
return new CompilationTask() {
......
......@@ -3,7 +3,7 @@
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>3.3.2</version>
<version>3.3.3</version>
<name>MAVEN PROCESSOR PLUGIN - ${project.version}</name>
<description>A maven plugin to process annotation for jdk6 at compile time
......@@ -33,6 +33,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.release>3.1.0</maven.release>
<!-- SONATYPE REPO -->
<snapshot.repo.id>sonatype-repo</snapshot.repo.id>
......@@ -85,17 +86,17 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
<version>2.8.1</version>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-manager</artifactId>
<version>2.8.1</version>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>2.8.1</version>
<version>2.8.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
......@@ -146,7 +147,6 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
</dependencies>
<build>
<plugins>
......@@ -203,6 +203,19 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
<version>3.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-exec</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<configuration>
<reportPlugins>
......@@ -210,13 +223,18 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.1</version>
<version>3.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- @see https://www.mkyong.com/maven/maven-site-build-is-very-slow-dependency-report/ -->
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
</reportPlugins>
</configuration>
......@@ -234,6 +252,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
</extensions>
-->
</build>
<profiles>
......
......@@ -90,6 +90,14 @@ public abstract class AbstractAnnotationProcessorMojo extends AbstractMojo
private static final String SOURCE_CLASSIFIER = "sources";
/**
* value of -release parameter in java 9+
*
* @since 3.3.3
*/
@Parameter
private String releaseVersion;
/**
*
*/
......@@ -483,7 +491,6 @@ public abstract class AbstractAnnotationProcessorMojo extends AbstractMojo
}
@SuppressWarnings("unchecked")
private void executeWithExceptionsHandled() throws Exception
{
if (outputDirectory == null)
......@@ -583,6 +590,11 @@ public abstract class AbstractAnnotationProcessorMojo extends AbstractMojo
options.add("-s");
options.add(outputDirectory.getPath());
if( releaseVersion!=null ) {
options.add("--release");
options.add( releaseVersion );
}
if( getLog().isDebugEnabled() ) {
for (String option : options) {
......
......@@ -339,6 +339,9 @@ public class AnnotationProcessorCompiler implements JavaCompiler {
else if( "-s".equals(option) ) {
javacConf.setGeneratedSourcesDirectory( new java.io.File(ii.next()));
}
else if( "--release".equals(option) ) {
javacConf.setReleaseVersion(ii.next());
}
else /*if( option.startsWith("-A") ) */ { // view pull #70
// Just pass through any other arguments
javacConf.addCompilerCustomArgument(option, "");
......
## Questions & Answers
### Multiple executions of plugin
Referring to issue [72](https://github.com/bsorrentino/maven-annotation-plugin/issues/72), apparently the default configuration of the sources plugin doesn't play nice with plugins bound to the `generate-sources` phase.
In the case you having this issue please refer to: [How to prevent generate-sources phase executing twice](http://blog.peterlynch.ca/2010/05/maven-how-to-prevent-generate-sources.html)
......@@ -20,6 +20,7 @@
<item name="Summary" href="project-summary.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="Q&amp;A" href="qa.html"/>
</menu>
......