Skip to content

Commit

Permalink
Merge branch 'release/3.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Aug 12, 2018
2 parents f8364a3 + babeeb6 commit 49ab60f
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 12 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)** |
----|----|----
Expand Down
37 changes: 28 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -82,24 +83,24 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.

<dependencyManagement>
<dependencies>
<dependency>
<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>
</dependencyManagement>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -124,7 +125,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
<artifactId>plexus-utils</artifactId>
<version>3.0.15</version>
</dependency>
<dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
</dependency>
Expand All @@ -146,7 +147,6 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.

</dependencies>


<build>

<plugins>
Expand Down Expand Up @@ -203,20 +203,38 @@ 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>

<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>
Expand All @@ -234,6 +252,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
</extensions>
-->


</build>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
*
*/
Expand Down Expand Up @@ -483,7 +491,6 @@ private Toolchain getToolchain(final Map<String, String> jdkToolchain)
}


@SuppressWarnings("unchecked")
private void executeWithExceptionsHandled() throws Exception
{
if (outputDirectory == null)
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down
8 changes: 8 additions & 0 deletions src/site/markdown/qa.md
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 49ab60f

Please sign in to comment.