diff --git a/README.md b/README.md index 0154cce..b72b556 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ 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 @@ -24,7 +24,10 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. * [ANNOTATION PROCESSING 101](http://hannesdorfmann.com/annotation-processing/annotationprocessing101) -## Releases ## +## 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)** | ----|----|---- diff --git a/pom.xml b/pom.xml index 72984bf..d32e037 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.bsc.maven maven-processor-plugin maven-plugin - 3.3.2 + 3.3.3 MAVEN PROCESSOR PLUGIN - ${project.version} 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. + UTF-8 3.1.0 sonatype-repo @@ -82,24 +83,24 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. - + org.codehaus.plexus plexus-compiler-api - 2.8.1 + 2.8.2 org.codehaus.plexus plexus-compiler-manager - 2.8.1 + 2.8.2 org.codehaus.plexus plexus-compiler-javac - 2.8.1 + 2.8.2 compile - + org.apache.maven @@ -124,7 +125,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. plexus-utils 3.0.15 - + org.codehaus.plexus plexus-compiler-api @@ -146,7 +147,6 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. - @@ -203,6 +203,19 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. 3.4 runtime + + + org.apache.maven.reporting + maven-reporting-exec + 1.2 + + + + org.apache.maven.doxia + doxia-module-markdown + 1.6 + + @@ -210,13 +223,18 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. org.apache.maven.plugins maven-plugin-plugin - 3.1 + 3.4 org.apache.maven.plugins maven-project-info-reports-plugin 2.4 + + + + false + @@ -234,6 +252,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. --> + diff --git a/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java b/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java index 19cc34c..69901a6 100644 --- a/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java +++ b/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java @@ -90,6 +90,14 @@ interface ArtifactClosure { 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 @@ private Toolchain getToolchain(final Map jdkToolchain) } - @SuppressWarnings("unchecked") private void executeWithExceptionsHandled() throws Exception { if (outputDirectory == null) @@ -583,6 +590,11 @@ public void accept(String sourcepath) { options.add("-s"); options.add(outputDirectory.getPath()); + if( releaseVersion!=null ) { + options.add("--release"); + options.add( releaseVersion ); + } + if( getLog().isDebugEnabled() ) { for (String option : options) { diff --git a/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java b/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java index 38ebd0c..dba6841 100644 --- a/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java +++ b/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java @@ -339,6 +339,9 @@ else if( "-d".equals(option) ) { 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, ""); diff --git a/src/site/markdown/qa.md b/src/site/markdown/qa.md new file mode 100644 index 0000000..75bb4ee --- /dev/null +++ b/src/site/markdown/qa.md @@ -0,0 +1,8 @@ +## 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) diff --git a/src/site/site.xml b/src/site/site.xml index 67da1e4..ad3f04a 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -20,6 +20,7 @@ +