Skip to content

Commit

Permalink
Merge branch 'release/4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Aug 3, 2020
2 parents bca8780 + e0e7553 commit 10f5517
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 25 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@
**update readme**


[86b4a9ba0a77deb](https://github.com/bsorrentino/maven-annotation-plugin/commit/86b4a9ba0a77deb) bsorrentino *2020-08-03 14:18:00*

**move to next release version**


[450b98cc62f42d9](https://github.com/bsorrentino/maven-annotation-plugin/commit/450b98cc62f42d9) bsorrentino *2020-08-03 14:13:45*

**clean code**


[ac57d4884350a9c](https://github.com/bsorrentino/maven-annotation-plugin/commit/ac57d4884350a9c) bsorrentino *2020-07-31 09:35:06*

**move to next developer version**


[08235617ae9b1d2](https://github.com/bsorrentino/maven-annotation-plugin/commit/08235617ae9b1d2) bsorrentino *2020-07-31 08:28:15*

**update readme**


[13aa52ade58dcae](https://github.com/bsorrentino/maven-annotation-plugin/commit/13aa52ade58dcae) bsorrentino *2020-07-31 08:00:05*


### [#83](https://github.com/bsorrentino/maven-annotation-plugin/issues/83) 'process-test' does not add TestCompileSourceRoots to javac '-sourcepath' *bug* *wait for feedback* *work in progress*

**fix: process-test should add CompileSourceRoots and TestCompileSourceRoots to javac '-sourcepath' option. fixes #83**


[2f1380abc231c26](https://github.com/bsorrentino/maven-annotation-plugin/commit/2f1380abc231c26) Markus *2020-07-30 15:59:55*


## v4.1
### Generic changes

**move to next release version**


[7939e7348408ffb](https://github.com/bsorrentino/maven-annotation-plugin/commit/7939e7348408ffb) bsorrentino *2020-07-31 07:40:09*

**update readme**


[18df0d926c9a3f1](https://github.com/bsorrentino/maven-annotation-plugin/commit/18df0d926c9a3f1) bartolomeo sorrentino *2020-07-23 08:21:15*

**update for JAVA9 compliance**
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This plugin helps to use from maven the new annotation processing integrated in java compiler provided from JDK8

This plugin was born as the 'alter ego' of maven apt plugin http://mojo.codehaus.org/apt-maven-plugin/
This plugin was born as the 'alter ego' of maven apt plugin [apt-maven-plugin](https://search.maven.org/artifact/org.codehaus.mojo/apt-maven-plugin/1.0-alpha-5/maven-plugin)

## Documentation

Expand All @@ -30,6 +30,8 @@ This plugin was born as the 'alter ego' of maven apt plugin http://mojo.codehaus

Date | Version | Info
--- | --- | ---
**Aug 03, 2020** | [Release 4.2](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v4.2) | merge PR #84. Thanks to [DemonicTutor](https://github.com/DemonicTutor)
**Aug 03, 2020** | [Release 4.2-jdk8](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v4.2-jdk8) | merge PR #84. Thanks to [DemonicTutor](https://github.com/DemonicTutor)
**Jul 30, 2020** | [Release 4.1](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v4.1) | Release based on JDK9 and above
**Jul 30, 2020** | [Release 4.1-jdk8](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v4.1-jdk8) | Maintenance release compatible with JDK8
**Jul 21, 2020** | [Release 4.0-jdk8](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v4.0-jdk8) | Maintenance release compatible with JDK8
Expand Down
2 changes: 1 addition & 1 deletion 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-parent</artifactId>
<packaging>pom</packaging>
<version>4.1</version>
<version>4.2</version>
<name>MAVEN PROCESSOR PLUGIN PARENT</name>
<description>A maven plugin to process annotation for jdk6 at compile time

Expand Down
2 changes: 1 addition & 1 deletion processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.
<parent>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin-parent</artifactId>
<version>4.1</version>
<version>4.2</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,31 +104,27 @@ public abstract class AbstractAnnotationProcessorMojo extends AbstractMojo
/**
*
*/
//@MojoParameter(expression="${plugin.artifacts}", readonly = true )
@Parameter(property="plugin.artifacts", readonly=true)
private java.util.List<Artifact> pluginArtifacts;

/**
* Specify the directory where to place generated source files (same behaviour of -s option)
*
*/
//@MojoParameter(required = false, description = "Specify the directory where to place generated source files (same behaviour of -s option)")
@Parameter
private File outputDirectory;

/**
* Annotation Processor FQN (Full Qualified Name) - when processors are not specified, the default discovery mechanism will be used
*
*/
//@MojoParameter(required = false, description = "Annotation Processor FQN (Full Qualified Name) - when processors are not specified, the default discovery mechanism will be used")
@Parameter
private String[] processors;

/**
* Additional compiler arguments
*
*/
//@MojoParameter(required = false, description = "Additional compiler arguments")
@Parameter
private String compilerArguments;

Expand All @@ -142,44 +138,38 @@ public abstract class AbstractAnnotationProcessorMojo extends AbstractMojo
/**
* Controls whether or not the output directory is added to compilation
*/
//@MojoParameter(required = false, description = "Controls whether or not the output directory is added to compilation")
@Parameter
private Boolean addOutputDirectoryToCompilationSources;

/**
* Indicates whether the build will continue even if there are compilation errors; defaults to true.
*/
//@MojoParameter(required = true, defaultValue = "true", expression = "${annotation.failOnError}", description = "Indicates whether the build will continue even if there are compilation errors; defaults to true.")
@Parameter( defaultValue="true", required=true, property="annotation.failOnError" )
private Boolean failOnError = true;

/**
* Indicates whether the compiler output should be visible, defaults to true.
*
*/
//@MojoParameter(required = true, defaultValue = "true", expression = "${annotation.outputDiagnostics}", description = "Indicates whether the compiler output should be visible, defaults to true.")
@Parameter( defaultValue="true", required=true, property="annotation.outputDiagnostics" )
private boolean outputDiagnostics = true;

/**
* System properties set before processor invocation.
*
*/
//@MojoParameter(required = false, description = "System properties set before processor invocation.")
@Parameter
private java.util.Map<String,String> systemProperties;

/**
* includes pattern
*/
//@MojoParameter( description="includes pattern")
@Parameter
private String[] includes;

/**
* excludes pattern
*/
//@MojoParameter( description="excludes pattern")
@Parameter
private String[] excludes;

Expand Down Expand Up @@ -359,10 +349,12 @@ private String buildProcessor()

protected abstract java.util.Set<String> getClasspathElements( java.util.Set<String> result );

protected abstract java.util.List<String> getAllCompileSourceRoots();

private String buildCompileSourcepath( Consumer<String> onSuccess) {

final java.util.List<String> roots = project.getCompileSourceRoots();
final java.util.List<String> roots = getAllCompileSourceRoots();

if( roots == null || roots.isEmpty() ) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,27 @@ public class MainAnnotationProcessorMojo extends AbstractAnnotationProcessorMojo
* project classpath
*
*/
//@MojoParameter(expression = "${project.compileClasspathElements}", required = true, readonly = true)
@Parameter( defaultValue="${project.compileClasspathElements}", required=true, readonly=true)
private List<String> classpathElements;

/**
* project sourceDirectory
*
*/
//@MojoParameter(expression = "${project.build.sourceDirectory}", required = true)
@Parameter( defaultValue="${project.build.sourceDirectory}", required = true)
private File sourceDirectory;

/**
* default output directory
*
*/
//@MojoParameter(expression = "${project.build.directory}/generated-sources/apt", required = true)
@Parameter( defaultValue="${project.build.directory}/generated-sources/apt", required = true)
private File defaultOutputDirectory;

/**
* Set the destination directory for class files (same behaviour of -d option)
*
*/
//@MojoParameter(required = false, expression="${project.build.outputDirectory}", description = "Set the destination directory for class files (same behaviour of -d option)")
@Parameter( defaultValue="${project.build.outputDirectory}")
private File outputClassDirectory;

Expand All @@ -81,6 +77,11 @@ protected void addCompileSourceRoot(MavenProject project, String dir) {
project.addCompileSourceRoot(dir);
}

@Override
protected List<String> getAllCompileSourceRoots() {
return project.getCompileSourceRoots();
}

@Override
public File getDefaultOutputDirectory() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.bsc.maven.plugin.processor;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

Expand All @@ -41,30 +42,26 @@ public class TestAnnotationProcessorMojo extends AbstractAnnotationProcessorMojo
* project classpath
*
*/
//@MojoParameter(expression = "${project.testClasspathElements}", required = true, readonly = true)
@Parameter( defaultValue="${project.testClasspathElements}", required=true, readonly=true)
private List<String> classpathElements;


/**
*
*/
//@MojoParameter(expression = "${project.build.testSourceDirectory}", required = true)
@Parameter( defaultValue="${project.build.testSourceDirectory}", required = true)
private File sourceDirectory;

/**
*
*/
//@MojoParameter(expression = "${project.build.directory}/generated-sources/apt-test", required = true)
@Parameter( defaultValue="${project.build.directory}/generated-sources/apt-test", required = true)
private File defaultOutputDirectory;

/**
* Set the destination directory for class files (same behaviour of -d option)
*
*/
//@MojoParameter(required = false, expression="${project.build.testOutputDirectory}", description = "Set the destination directory for class files (same behaviour of -d option)")
@Parameter( defaultValue="${project.build.testOutputDirectory}")
private File outputClassDirectory;

Expand All @@ -73,6 +70,14 @@ protected void addCompileSourceRoot(MavenProject project, String dir) {
project.addTestCompileSourceRoot(dir);
}

@Override
protected List<String> getAllCompileSourceRoots() {
final List<String> all = new ArrayList<>();
all.addAll(project.getCompileSourceRoots());
all.addAll(project.getTestCompileSourceRoots());
return all;
}

@Override
public File getDefaultOutputDirectory() {
return defaultOutputDirectory;
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin-parent</artifactId>
<version>4.1</version>
<version>4.2</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin-parent</artifactId>
<version>4.1</version>
<version>4.2</version>
</parent>

<properties>
Expand Down

0 comments on commit 10f5517

Please sign in to comment.