Skip to content

Commit

Permalink
Merge branch 'release/5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Apr 12, 2024
2 parents 4b4f747 + 861c5a3 commit ec79932
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ target/

issue47.txt
.okhttpcache/
/.java-version
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ This plugin was born as the 'alter ego' of maven apt plugin [apt-maven-plugin](h

## Releases

Date | Version | Info
--- | --- | ---
**Sep 21, 2023** | [Release 5.0](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0) | fix [#102](https://github.com/bsorrentino/maven-annotation-plugin/issues/102) - Plugin validation issues on Maven 3.9
**Jul 12, 2021** | [Release 5.0-rc3](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc3) | merge PR [#96](https://github.com/bsorrentino/maven-annotation-plugin/pull/96) - Thanks to [Ulysses Rangel RIbeiro](https://github.com/ulyssesrr)
Date | Version | Info
--- |-----------------------------------------------------------------------------------------------------------| ---
**Apr 12, 2024** | [Release 5.1](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.1) | merge PR [#104](https://github.com/bsorrentino/maven-annotation-plugin/pull/104) - Fixed unchanged sources check.Thanks to [AndreaBaroncelli](https://github.com/AndreaBaroncelli)
**Sep 21, 2023** | [Release 5.0](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0) | fix [#102](https://github.com/bsorrentino/maven-annotation-plugin/issues/102) - Plugin validation issues on Maven 3.9
**Jul 12, 2021** | [Release 5.0-rc3](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc3) | merge PR [#96](https://github.com/bsorrentino/maven-annotation-plugin/pull/96) - Thanks to [Ulysses Rangel RIbeiro](https://github.com/ulyssesrr)
**Jul 12, 2021** | [Release 5.0-jdk8-rc3](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-jdk8-rc3) | Maintenance release compatible with JDK8
**Jun 28, 2021** | [Release 5.0-rc2](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc2) | merge PR [#95](https://github.com/bsorrentino/maven-annotation-plugin/pull/95) - Thanks to [Ulysses Rangel RIbeiro](https://github.com/ulyssesrr)
**Jun 28, 2021** | [Release 5.0-rc2](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc2) | merge PR [#95](https://github.com/bsorrentino/maven-annotation-plugin/pull/95) - Thanks to [Ulysses Rangel RIbeiro](https://github.com/ulyssesrr)
**Jun 28, 2021** | [Release 5.0-jdk8-rc2](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-jdk8-rc2) | Maintenance release compatible with JDK8
**Feb 04, 2021** | [Release 5.0-rc1](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc1) | fix issue [#91](https://github.com/bsorrentino/maven-annotation-plugin/issues/91) [#92](https://github.com/bsorrentino/maven-annotation-plugin/issues/92) [#93](https://github.com/bsorrentino/maven-annotation-plugin/issues/93)
**Feb 04, 2021** | [Release 5.0-rc1](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-rc1) | fix issue [#91](https://github.com/bsorrentino/maven-annotation-plugin/issues/91) [#92](https://github.com/bsorrentino/maven-annotation-plugin/issues/92) [#93](https://github.com/bsorrentino/maven-annotation-plugin/issues/93)
**Feb 04, 2021** | [Release 5.0-jdk8-rc1](https://github.com/bsorrentino/maven-annotation-plugin/releases/tag/v5.0-jdk8-rc1) | Maintenance release compatible with JDK8

## import maven dependency ##
Expand Down
2 changes: 1 addition & 1 deletion compiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>maven-processor-plugin-parent</artifactId>
<groupId>org.bsc.maven</groupId>
<version>5.0</version>
<version>5.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

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>5.0</version>
<version>5.1</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>5.0</version>
<version>5.1</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,8 @@ private List<String> prepareOptions(JavaCompiler compiler) throws MojoExecutionE
}

private boolean isSourcesUnchanged(List<JavaFileObject> allSources) throws IOException {
if (!areSourceFilesSameAsPreviousRun(allSources))
Path sourceFileList = outputDirectory.toPath().resolve(".maven-processor-source-files.txt");
if (!areSourceFilesSameAsPreviousRun(allSources, sourceFileList))
return false;

long maxSourceDate = allSources.stream()
Expand All @@ -612,7 +613,7 @@ private boolean isSourcesUnchanged(List<JavaFileObject> allSources) throws IOExc
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
if (Files.isRegularFile(file)) {
if (Files.isRegularFile(file) && !file.equals(sourceFileList)) {
maxOutputDate.updateAndGet(t -> Math.max(t, file.toFile().lastModified()));
}
return FileVisitResult.CONTINUE;
Expand All @@ -631,11 +632,11 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
* Checks the list of {@code allSources} against the stored list of source files in a previous run.
*
* @param allSources
* @param sourceFileList
* @return {@code true} when the filenames of the previous run matches exactly with the current run.
* @throws IOException
*/
private boolean areSourceFilesSameAsPreviousRun(List<JavaFileObject> allSources) throws IOException {
Path sourceFileList = outputDirectory.toPath().resolve(".maven-processor-source-files.txt");
private boolean areSourceFilesSameAsPreviousRun(List<JavaFileObject> allSources, Path sourceFileList) throws IOException {
try {
if (!Files.exists(sourceFileList)) {
getLog().debug("File with previous sources " + sourceFileList + " not found, treating as first run");
Expand Down
4 changes: 2 additions & 2 deletions test/app/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>5.0</version>
<version>5.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -160,7 +160,7 @@ PROCESSOR PLUGIN
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
<version>1.10.0</version>
<classifier>sources</classifier>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion test/processors/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>5.0</version>
<version>5.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

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>5.0</version>
<version>5.1</version>
</parent>

<properties>
Expand Down

0 comments on commit ec79932

Please sign in to comment.