From c335f4e848174200e517a4a929d29aeeec9721ee Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Tue, 8 Mar 2022 11:04:02 +1000
Subject: [PATCH 01/64] [maven-release-plugin] prepare for next development
iteration
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index c8872e2c..9b44a583 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
maven-compiler-plugin
- 3.10.1
+ 3.10.2-SNAPSHOTmaven-pluginApache Maven Compiler Plugin
@@ -45,7 +45,7 @@ under the License.
scm:git:https://github.com/apache/maven-compiler-plugin.gitscm:git:https://github.com/apache/maven-compiler-plugin.githttps://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}
- maven-compiler-plugin-3.10.1
+ maven-compiler-plugin-3.10.0JIRA
@@ -78,7 +78,7 @@ under the License.
false2.22.23.6.2
- 2022-03-08T01:03:47Z
+ 2022-03-08T01:04:02Z
From be9b5ed8db81745c0aedbf718b72e37be52d1a9e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 11 Mar 2022 11:55:27 +1000
Subject: [PATCH 02/64] Bump mockito-core from 4.3.1 to 4.4.0 (#100)
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.3.1...v4.4.0)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9b44a583..e093008b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,7 +216,7 @@ under the License.
org.mockitomockito-core
- 4.3.1
+ 4.4.0test
From cfea6eb6509ab3fc56a3b3b3321da11b5ea06052 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?=
<11896137+pzygielo@users.noreply.github.com>
Date: Sun, 13 Mar 2022 00:29:07 +0100
Subject: [PATCH 03/64] [MCOMPILER-347] Set Xcludes in config passed to actual
compiler (#101)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Piotrek Żygieło
---
.../maven/plugin/compiler/AbstractCompilerMojo.java | 8 ++++++++
.../apache/maven/plugin/compiler/CompilerMojo.java | 12 ++++++++++++
.../maven/plugin/compiler/TestCompilerMojo.java | 12 ++++++++++++
3 files changed, 32 insertions(+)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index e0ec1dbe..2f083965 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -953,6 +953,10 @@ else if ( CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy().eq
compilerConfiguration.setModulepathEntries( getModulepathElements() );
+ compilerConfiguration.setIncludes( getIncludes() );
+
+ compilerConfiguration.setExcludes( getExcludes() );
+
Map effectiveCompilerArguments = getCompilerArguments();
String effectiveCompilerArgument = getCompilerArgument();
@@ -1482,6 +1486,10 @@ private Set getCompileSources( Compiler compiler, CompilerConfiguration co
return compileSources;
}
+ protected abstract Set getIncludes();
+
+ protected abstract Set getExcludes();
+
/**
* @param compilerConfiguration
* @param compiler
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index 8c5eee2f..ea41300a 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@@ -203,6 +203,18 @@ public void execute()
}
}
+ @Override
+ protected Set getIncludes()
+ {
+ return includes;
+ }
+
+ @Override
+ protected Set getExcludes()
+ {
+ return excludes;
+ }
+
@Override
protected void preparePaths( Set sourceFiles )
{
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index c352cf90..9d9469f6 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -497,4 +497,16 @@ protected boolean isTestCompile()
return true;
}
+ @Override
+ protected Set getIncludes()
+ {
+ return testIncludes;
+ }
+
+ @Override
+ protected Set getExcludes()
+ {
+ return testExcludes;
+ }
+
}
From 785089d48541899b5c0a4677942b0f66c2f71d39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?=
<11896137+pzygielo@users.noreply.github.com>
Date: Fri, 18 Mar 2022 07:45:38 +0100
Subject: [PATCH 04/64] [MCOMPILER-488] dedicated option for `implicit` javac
flag (#102)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Use (local) plexus snapshot
* [MCOMPILER-488] dedicated option for `implicit` javac flag
Co-authored-by: Piotrek Żygieło
---
pom.xml | 2 +-
.../plugin/compiler/AbstractCompilerMojo.java | 15 ++++++++
.../plugin/compiler/CompilerMojoTestCase.java | 16 ++++++++
.../plugin-config-none.xml | 38 +++++++++++++++++++
.../plugin-config-not-set.xml | 37 ++++++++++++++++++
5 files changed, 107 insertions(+), 1 deletion(-)
create mode 100644 src/test/resources/unit/compiler-implicit-test/plugin-config-none.xml
create mode 100644 src/test/resources/unit/compiler-implicit-test/plugin-config-not-set.xml
diff --git a/pom.xml b/pom.xml
index e093008b..54ea6817 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
3.5
- 2.11.1
+ 2.11.2-SNAPSHOT2.4.213.7.0
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 2f083965..a97b36d2 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -402,6 +402,14 @@ public abstract class AbstractCompilerMojo
@Parameter( property = "maven.compiler.debuglevel" )
private String debuglevel;
+ /**
+ * Keyword to be appended to the -implicit: command-line switch.
+ *
+ * @since 3.10.2
+ */
+ @Parameter( property = "maven.compiler.implicit" )
+ private String implicit;
+
/**
*
*/
@@ -686,6 +694,8 @@ public void execute()
compilerConfiguration.setDebugFileName( getDebugFileName() );
+ compilerConfiguration.setImplicitOption( implicit );
+
if ( debug && StringUtils.isNotEmpty( debuglevel ) )
{
String[] split = StringUtils.split( debuglevel, "," );
@@ -1910,4 +1920,9 @@ public void setRelease( String release )
this.release = release;
targetOrReleaseSet = true;
}
+
+ final String getImplicit()
+ {
+ return implicit;
+ }
}
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index 79d87113..bc78398a 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -267,6 +267,22 @@ public void testCompilerArgs()
assertEquals( Arrays.asList( "key1=value1","-Xlint","-my&special:param-with+chars/not>allowed_in_XML_element_names" ), compileMojo.compilerArgs );
}
+ public void testImplicitFlagNone()
+ throws Exception
+ {
+ CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-implicit-test/plugin-config-none.xml" );
+
+ assertEquals( "none", compileMojo.getImplicit() );
+ }
+
+ public void testImplicitFlagNotSet()
+ throws Exception
+ {
+ CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-implicit-test/plugin-config-not-set.xml" );
+
+ assertNull( compileMojo.getImplicit() );
+ }
+
public void testOneOutputFileForAllInput2()
throws Exception
{
diff --git a/src/test/resources/unit/compiler-implicit-test/plugin-config-none.xml b/src/test/resources/unit/compiler-implicit-test/plugin-config-none.xml
new file mode 100644
index 00000000..faf33341
--- /dev/null
+++ b/src/test/resources/unit/compiler-implicit-test/plugin-config-none.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ maven-compiler-plugin
+
+
+ ${basedir}/target/test-classes/unit/compiler-implicit-test/src/main/java
+
+ javac
+ true
+ ${basedir}/target/test/unit/compiler-implicit-test/target/classes
+ ${basedir}/target/test/unit/compiler-implicit-test/target
+ none
+
+
+
+
+
diff --git a/src/test/resources/unit/compiler-implicit-test/plugin-config-not-set.xml b/src/test/resources/unit/compiler-implicit-test/plugin-config-not-set.xml
new file mode 100644
index 00000000..1ad147b6
--- /dev/null
+++ b/src/test/resources/unit/compiler-implicit-test/plugin-config-not-set.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ maven-compiler-plugin
+
+
+ ${basedir}/target/test-classes/unit/compiler-implicit-test/src/main/java
+
+ javac
+ true
+ ${basedir}/target/test/unit/compiler-implicit-test/target/classes
+ ${basedir}/target/test/unit/compiler-implicit-test/target
+
+
+
+
+
From 1d912302d1f4a315b1db18fcc3197cae7796cc4f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 14:46:50 +0000
Subject: [PATCH 05/64] Bump mockito-core from 4.4.0 to 4.5.1
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.4.0 to 4.5.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.4.0...v4.5.1)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 54ea6817..bb081b41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,7 +216,7 @@ under the License.
org.mockitomockito-core
- 4.4.0
+ 4.5.1test
From eda754e8da69b8b4a3f248d73747299736493299 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 May 2022 21:32:25 +1000
Subject: [PATCH 06/64] Bump maven-javadoc-plugin from 3.3.2 to 3.4.0 (#118)
Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.3.2...maven-javadoc-plugin-3.4.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bb081b41..d4dcd9fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -272,7 +272,7 @@ under the License.
org.apache.maven.pluginsmaven-javadoc-plugin
- 3.3.2
+ 3.4.0
From 3d71421559db46422fb1744413a3446630c8fb15 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 May 2022 21:32:48 +1000
Subject: [PATCH 07/64] Bump commons-io in
/src/it/MCOMPILER-203-processorpath/annotation-user (#117)
Bumps commons-io from 2.4 to 2.7.
---
updated-dependencies:
- dependency-name: commons-io:commons-io
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
index 47d81386..9755c54f 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
@@ -35,7 +35,7 @@ under the License.
commons-iocommons-io
- 2.4
+ 2.7junit
From ebf97bbc659dcd94506d9a578b8d45545544403d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:59 +0000
Subject: [PATCH 08/64] Bump junit in
/src/it/multirelease-patterns/singleproject-toolchains
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/multirelease-patterns/singleproject-toolchains/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/pom.xml b/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
index efcadb42..154f8ae6 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
+++ b/src/it/multirelease-patterns/singleproject-toolchains/pom.xml
@@ -136,7 +136,7 @@
junitjunit
- 4.12
+ 4.13.1test
From d51d189539290a3ceb66e9148fd41502413740cf Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 09/64] Bump junit
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
.../multirelease-patterns/multimodule/multirelease-nine/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-nine/pom.xml b/src/it/multirelease-patterns/multimodule/multirelease-nine/pom.xml
index 32041775..4d0b7ddc 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-nine/pom.xml
+++ b/src/it/multirelease-patterns/multimodule/multirelease-nine/pom.xml
@@ -46,7 +46,7 @@
junitjunit
- 4.12
+ 4.13.1test
From 7c50bdf9f0234534e3878f51d962933ddcfa063a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 10/64] Bump junit
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
.../multiproject/multirelease-base/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-base/pom.xml b/src/it/multirelease-patterns/multiproject/multirelease-base/pom.xml
index a730aef5..fbf2bcb0 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-base/pom.xml
+++ b/src/it/multirelease-patterns/multiproject/multirelease-base/pom.xml
@@ -61,7 +61,7 @@
junitjunit
- 4.12
+ 4.13.1test
From 289eed3acc15c3640c523417459794c92efa0050 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 11/64] Bump junit from 4.10 to 4.13.1 in
/src/it/MCOMPILER-157/annotation-user
Bumps [junit](https://github.com/junit-team/junit4) from 4.10 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.10.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.10...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/MCOMPILER-157/annotation-user/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-157/annotation-user/pom.xml b/src/it/MCOMPILER-157/annotation-user/pom.xml
index 3935615c..69066f74 100644
--- a/src/it/MCOMPILER-157/annotation-user/pom.xml
+++ b/src/it/MCOMPILER-157/annotation-user/pom.xml
@@ -42,7 +42,7 @@ under the License.
junitjunit
- 4.10
+ 4.13.1test
From 7277e1f092da131e8fe41f7e9ea2234d1add9d22 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 12/64] Bump junit
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
.../multirelease-patterns/multimodule/multirelease-base/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-base/pom.xml b/src/it/multirelease-patterns/multimodule/multirelease-base/pom.xml
index ad270bd0..a4ea1e32 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-base/pom.xml
+++ b/src/it/multirelease-patterns/multimodule/multirelease-base/pom.xml
@@ -40,7 +40,7 @@
junitjunit
- 4.12
+ 4.13.1test
From 488f560b47ea3c12cfb08bfd05debac33feb0e4c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 13/64] Bump junit
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
.../multiproject/multirelease-nine/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-nine/pom.xml b/src/it/multirelease-patterns/multiproject/multirelease-nine/pom.xml
index a4f5965d..1114095b 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-nine/pom.xml
+++ b/src/it/multirelease-patterns/multiproject/multirelease-nine/pom.xml
@@ -51,7 +51,7 @@
junitjunit
- 4.12
+ 4.13.1test
From a74d1cae2e5e91d49f63009d8851dbabdbc60c73 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 22 Apr 2022 16:04:58 +0000
Subject: [PATCH 14/64] Bump junit in
/src/it/multirelease-patterns/singleproject-runtime
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/multirelease-patterns/singleproject-runtime/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/singleproject-runtime/pom.xml b/src/it/multirelease-patterns/singleproject-runtime/pom.xml
index 668f124c..a5be9ce8 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/pom.xml
+++ b/src/it/multirelease-patterns/singleproject-runtime/pom.xml
@@ -76,7 +76,7 @@
junitjunit
- 4.12
+ 4.13.1test
From 51fa1baca6776e5f59c9c2a80874eb27f15f4b4b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 May 2022 14:50:35 +0000
Subject: [PATCH 15/64] Bump plexusCompilerVersion from 2.11.2-SNAPSHOT to
2.12.0
Bumps `plexusCompilerVersion` from 2.11.2-SNAPSHOT to 2.12.0.
Updates `plexus-compiler-api` from 2.11.2-SNAPSHOT to 2.12.0
- [Release notes](https://github.com/codehaus-plexus/plexus-compiler/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-compiler/commits/plexus-compiler-2.12.0)
Updates `plexus-compiler-manager` from 2.11.2-SNAPSHOT to 2.12.0
- [Release notes](https://github.com/codehaus-plexus/plexus-compiler/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-compiler/commits/plexus-compiler-2.12.0)
Updates `plexus-compiler-javac` from 2.11.2-SNAPSHOT to 2.12.0
---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-compiler-api
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.codehaus.plexus:plexus-compiler-manager
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.codehaus.plexus:plexus-compiler-javac
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d4dcd9fa..f7564371 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
3.5
- 2.11.2-SNAPSHOT
+ 2.12.02.4.213.7.0
From 2ee984b6c119f91023f9983e75bdaed383f83be5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 May 2022 11:33:38 +0000
Subject: [PATCH 16/64] Bump junit from 4.12 to 4.13.1 in /src/it/MCOMPILER-298
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/MCOMPILER-298/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-298/pom.xml b/src/it/MCOMPILER-298/pom.xml
index 0505e5f0..2e5a0d54 100644
--- a/src/it/MCOMPILER-298/pom.xml
+++ b/src/it/MCOMPILER-298/pom.xml
@@ -37,7 +37,7 @@
junitjunit
- 4.12
+ 4.13.1test
From 54d0927c2e28293860819478eef2295ed286bb43 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 May 2022 11:33:16 +0000
Subject: [PATCH 17/64] Bump junit in
/src/it/groovy-project-with-new-plexus-compiler
Bumps [junit](https://github.com/junit-team/junit4) from 4.8.2 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.8.2...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/groovy-project-with-new-plexus-compiler/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100755 => 100644 src/it/groovy-project-with-new-plexus-compiler/pom.xml
diff --git a/src/it/groovy-project-with-new-plexus-compiler/pom.xml b/src/it/groovy-project-with-new-plexus-compiler/pom.xml
old mode 100755
new mode 100644
index 7cb1825d..18dd4b60
--- a/src/it/groovy-project-with-new-plexus-compiler/pom.xml
+++ b/src/it/groovy-project-with-new-plexus-compiler/pom.xml
@@ -81,7 +81,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
junitjunit
- 4.8.2
+ 4.13.1test
From c40f5fd9f1bc8a574fcd1e689278f8cec419c121 Mon Sep 17 00:00:00 2001
From: Jeff Maxwell
Date: Mon, 30 May 2022 05:17:04 -0500
Subject: [PATCH 18/64] MCOMPILER-495 create missing dirs in
createMissingPackageInfoClasses (#121)
---
src/it/MCOMPILER-495/invoker.properties | 19 ++++++++
src/it/MCOMPILER-495/pom.xml | 44 +++++++++++++++++++
.../src/main/java/dummy/package-info.java | 23 ++++++++++
src/it/MCOMPILER-495/verify.groovy | 24 ++++++++++
.../plugin/compiler/AbstractCompilerMojo.java | 7 +++
5 files changed, 117 insertions(+)
create mode 100644 src/it/MCOMPILER-495/invoker.properties
create mode 100644 src/it/MCOMPILER-495/pom.xml
create mode 100644 src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
create mode 100644 src/it/MCOMPILER-495/verify.groovy
diff --git a/src/it/MCOMPILER-495/invoker.properties b/src/it/MCOMPILER-495/invoker.properties
new file mode 100644
index 00000000..8595721d
--- /dev/null
+++ b/src/it/MCOMPILER-495/invoker.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = clean compile
+invoker.buildResult = success
diff --git a/src/it/MCOMPILER-495/pom.xml b/src/it/MCOMPILER-495/pom.xml
new file mode 100644
index 00000000..bc6f4f24
--- /dev/null
+++ b/src/it/MCOMPILER-495/pom.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ 4.0.0
+
+ blah
+ blah
+ 1.0
+ jar
+
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @pom.version@
+
+
+
+
diff --git a/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
new file mode 100644
index 00000000..ed72542b
--- /dev/null
+++ b/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * This is the package javadoc
+ */
+package dummy;
\ No newline at end of file
diff --git a/src/it/MCOMPILER-495/verify.groovy b/src/it/MCOMPILER-495/verify.groovy
new file mode 100644
index 00000000..2384fecd
--- /dev/null
+++ b/src/it/MCOMPILER-495/verify.groovy
@@ -0,0 +1,24 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+def packageInfoClassFile = new File( basedir, 'target/classes/dummy/package-info.class' )
+def packageInfoBytes = packageInfoClassFile.bytes
+def packageInfoHex = packageInfoBytes.encodeHex().toString()
+// "dummy/package-info" hex encoded
+assert packageInfoHex.contains( '64756d6d792f7061636b6167652d696e666f' )
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index a97b36d2..cf6b86ce 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1374,6 +1374,13 @@ private void createMissingPackageInfoClasses( CompilerConfiguration compilerConf
{
if ( !file.exists() )
{
+ File parentFile = file.getParentFile();
+
+ if ( !parentFile.exists() )
+ {
+ Files.createDirectories( parentFile.toPath() );
+ }
+
byte[] bytes = generatePackage( compilerConfiguration, rel );
Files.write( file.toPath(), bytes );
}
From 5a652326a558d8e6a977915736ef083accb2f355 Mon Sep 17 00:00:00 2001
From: Slawomir Jaranowski
Date: Mon, 30 May 2022 19:47:57 +0200
Subject: [PATCH 19/64] ignore Maven Core updates by dependabot
---
.github/dependabot.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 778ea2af..ccf1b48c 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -21,6 +21,9 @@ updates:
directory: "/"
schedule:
interval: "daily"
+ ignore:
+ # ignore Maven Core updates
+ - dependency-name: "org.apache.maven:*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
From 6657ecf318bd33364551cecd984de4c8641d7a66 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 May 2022 23:51:33 +0000
Subject: [PATCH 20/64] Bump maven-invoker-plugin from 3.2.2 to 3.3.0
Bumps [maven-invoker-plugin](https://github.com/apache/maven-invoker-plugin) from 3.2.2 to 3.3.0.
- [Release notes](https://github.com/apache/maven-invoker-plugin/releases)
- [Commits](https://github.com/apache/maven-invoker-plugin/compare/maven-invoker-plugin-3.2.2...maven-invoker-plugin-3.3.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-invoker-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f7564371..cc78d9dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -262,7 +262,7 @@ under the License.
org.apache.maven.pluginsmaven-invoker-plugin
- 3.2.2
+ 3.3.0org.apache.maven.plugins
From 3539d4c0b8cea3043a23f6b976b03693a928f14e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 May 2022 14:12:07 +0000
Subject: [PATCH 21/64] Bump mockito-core from 4.5.1 to 4.6.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.5.1 to 4.6.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.5.1...v4.6.0)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cc78d9dc..cc36068d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,7 +216,7 @@ under the License.
org.mockitomockito-core
- 4.5.1
+ 4.6.0test
From 7d5d9d933357883a4aa3f3b743a4ab7183b4f316 Mon Sep 17 00:00:00 2001
From: Slawomir Jaranowski
Date: Sun, 3 Jul 2022 13:49:01 +0200
Subject: [PATCH 22/64] Fix Jenkins url
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cc36068d..ce783fa5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@ under the License.
Jenkins
- https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/
+ https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/
From c7a47c1d58344426105216c119544af8933087ff Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 8 Jun 2022 14:11:09 +0000
Subject: [PATCH 23/64] Bump maven-release-plugin from 3.0.0-M5 to 3.0.0-M6
Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M5 to 3.0.0-M6.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](https://github.com/apache/maven-release/compare/maven-release-3.0.0-M5...maven-release-3.0.0-M6)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ce783fa5..01eba49c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -280,7 +280,7 @@ under the License.
org.apache.maven.pluginsmaven-release-plugin
- 3.0.0-M5
+ 3.0.0-M6
From 58f6d603bc0551be16f1ec98464cbabb64b02f4d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 3 Jun 2022 14:12:14 +0000
Subject: [PATCH 24/64] Bump mockito-core from 4.6.0 to 4.6.1
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.6.0...v4.6.1)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 01eba49c..b7bb4790 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,7 +216,7 @@ under the License.
org.mockitomockito-core
- 4.6.0
+ 4.6.1test
From 876452d118f9cee9b73a21fef907bd3ee72413bf Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 May 2022 10:19:14 +0000
Subject: [PATCH 25/64] Bump maven-shared-utils
Bumps [maven-shared-utils](https://github.com/apache/maven-shared-utils) from 0.1 to 3.3.3.
- [Release notes](https://github.com/apache/maven-shared-utils/releases)
- [Commits](https://github.com/apache/maven-shared-utils/compare/maven-shared-utils-0.1...maven-shared-utils-3.3.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.shared:maven-shared-utils
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml b/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml
index 2ebdaf66..691526db 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml
+++ b/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml
@@ -95,7 +95,7 @@ under the License.
org.apache.maven.sharedmaven-shared-utils
- 0.1
+ 3.3.3
From b965e04cead48a12233fd2513e57536985c0168e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 May 2022 10:19:50 +0000
Subject: [PATCH 26/64] Bump maven-shared-utils in
/src/it/MCOMPILER-157/annotation-verify
Bumps [maven-shared-utils](https://github.com/apache/maven-shared-utils) from 0.1 to 3.3.3.
- [Release notes](https://github.com/apache/maven-shared-utils/releases)
- [Commits](https://github.com/apache/maven-shared-utils/compare/maven-shared-utils-0.1...maven-shared-utils-3.3.3)
---
updated-dependencies:
- dependency-name: org.apache.maven.shared:maven-shared-utils
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
src/it/MCOMPILER-157/annotation-verify/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-157/annotation-verify/pom.xml b/src/it/MCOMPILER-157/annotation-verify/pom.xml
index ddfd0e05..ddfeab34 100644
--- a/src/it/MCOMPILER-157/annotation-verify/pom.xml
+++ b/src/it/MCOMPILER-157/annotation-verify/pom.xml
@@ -102,7 +102,7 @@ under the License.
org.apache.maven.sharedmaven-shared-utils
- 0.1
+ 3.3.3
From 06fc217b0e4254deb3e33e24d8c56ccdb93b2d96 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 21 Jul 2022 05:41:40 +0000
Subject: [PATCH 27/64] Bump plexusCompilerVersion from 2.12.0 to 2.12.1
Bumps `plexusCompilerVersion` from 2.12.0 to 2.12.1.
Updates `plexus-compiler-api` from 2.12.0 to 2.12.1
- [Release notes](https://github.com/codehaus-plexus/plexus-compiler/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-compiler/compare/plexus-compiler-2.12.0...plexus-compiler-2.12.1)
Updates `plexus-compiler-manager` from 2.12.0 to 2.12.1
- [Release notes](https://github.com/codehaus-plexus/plexus-compiler/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-compiler/compare/plexus-compiler-2.12.0...plexus-compiler-2.12.1)
Updates `plexus-compiler-javac` from 2.12.0 to 2.12.1
---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-compiler-api
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: org.codehaus.plexus:plexus-compiler-manager
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: org.codehaus.plexus:plexus-compiler-javac
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b7bb4790..9e62dfab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
3.5
- 2.12.0
+ 2.12.12.4.213.7.0
From 961734ee28b533c0b269b90c89b6e9957ddf8f9b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 21 Jul 2022 15:59:37 +1000
Subject: [PATCH 28/64] Bump junit in
/src/it/MCOMPILER-203-processorpath/annotation-user (#114)
Bumps [junit](https://github.com/junit-team/junit4) from 4.10 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.10.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.10...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
index 9755c54f..80d94fee 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
@@ -40,7 +40,7 @@ under the License.
junitjunit
- 4.10
+ 4.13.1test
From baa4ad918f2cbb375437eedb4857f1b56ef60c2e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 24 Mar 2022 14:36:36 +0000
Subject: [PATCH 29/64] Bump maven-jxr-plugin from 3.1.1 to 3.2.0
Bumps [maven-jxr-plugin](https://github.com/apache/maven-jxr) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/apache/maven-jxr/releases)
- [Commits](https://github.com/apache/maven-jxr/compare/jxr-3.1.1...jxr-3.2.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jxr-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9e62dfab..e81c21bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -267,7 +267,7 @@ under the License.
org.apache.maven.pluginsmaven-jxr-plugin
- 3.1.1
+ 3.2.0org.apache.maven.plugins
From 1b0d19ab17f4aadffffb049a8a911c650182319f Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Fri, 22 Jul 2022 14:08:07 +1000
Subject: [PATCH 30/64] test build with 18 (#126)
* test build with 18
* add maven matrix as well
Signed-off-by: Olivier Lamy
---
.github/workflows/maven-verify.yml | 9 ++++++---
src/it/MCOMPILER-349_dependencyChanged/pom.xml | 2 +-
.../pom.xml | 2 +-
src/it/mcompiler-182/pom.xml | 2 +-
src/it/mcompiler-21_class-remove/pom.xml | 2 +-
src/it/mcompiler-21_methodname-change/pom.xml | 2 +-
6 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index e5c93cb7..103392ea 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -24,7 +24,10 @@ on:
jobs:
build:
name: Verify
- uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2
+ uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
with:
- jdk-distribution-matrix: '[ "temurin", "zulu", "microsoft", "liberica", "adopt-openj9" ]'
- matrix-exclude: '[{ "jdk": "8", "distribution": "microsoft"}]'
+ # maven-args: "-Dinvoker.parallelThreads=2" cannot do this as this generate some concurrent download issues
+ jdk-distribution-matrix: '[ "temurin", "zulu", "microsoft", "adopt-openj9" ]'
+ jdk-matrix: '[ "8", "11", "17", "18" ]' # "19-ea"
+ matrix-exclude: '[{ "jdk": "8", "distribution": "microsoft"},{ "jdk": "19-ea", "distribution": "microsoft"},{ "jdk": "18", "distribution": "microsoft"},{ "jdk": "19-ea", "distribution": "adopt-openj9"},]'
+ maven-matrix: '[ "3.3.9", "3.6.3", "3.8.6" ]' # Maven versions matrix for verify builds
diff --git a/src/it/MCOMPILER-349_dependencyChanged/pom.xml b/src/it/MCOMPILER-349_dependencyChanged/pom.xml
index 929d2dde..2d4e7f44 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/pom.xml
+++ b/src/it/MCOMPILER-349_dependencyChanged/pom.xml
@@ -52,7 +52,7 @@
org.codehaus.gmavengroovy-maven-plugin
- 2.0
+ 2.1.1
def fileToModify = new File(project.basedir, 'service/src/main/java/TestService.java')
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/pom.xml b/src/it/MCOMPILER-474_recompile-dependent-when-package/pom.xml
index fd7035be..49153615 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/pom.xml
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/pom.xml
@@ -51,7 +51,7 @@
org.codehaus.gmavengroovy-maven-plugin
- 2.0
+ 2.1.1
def fileToModify = new File(project.basedir, 'service/src/main/java/TestService.java')
diff --git a/src/it/mcompiler-182/pom.xml b/src/it/mcompiler-182/pom.xml
index 32e8491c..c1fc219f 100644
--- a/src/it/mcompiler-182/pom.xml
+++ b/src/it/mcompiler-182/pom.xml
@@ -48,7 +48,7 @@ under the License.
org.codehaus.gmavengroovy-maven-plugin
- 2.0
+ 2.1.1
def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
diff --git a/src/it/mcompiler-21_class-remove/pom.xml b/src/it/mcompiler-21_class-remove/pom.xml
index e04756a7..bcb5979b 100644
--- a/src/it/mcompiler-21_class-remove/pom.xml
+++ b/src/it/mcompiler-21_class-remove/pom.xml
@@ -48,7 +48,7 @@ under the License.
org.codehaus.gmavengroovy-maven-plugin
- 2.0
+ 2.1.1
def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
diff --git a/src/it/mcompiler-21_methodname-change/pom.xml b/src/it/mcompiler-21_methodname-change/pom.xml
index 19c401a0..90569024 100644
--- a/src/it/mcompiler-21_methodname-change/pom.xml
+++ b/src/it/mcompiler-21_methodname-change/pom.xml
@@ -48,7 +48,7 @@ under the License.
org.codehaus.gmavengroovy-maven-plugin
- 2.0
+ 2.1.1
def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )
From cdfeb52351fea48d49cfdd8da896c42c66b547a8 Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Fri, 22 Jul 2022 16:29:20 +1000
Subject: [PATCH 31/64] usage of reflection is not needed anymore (#140)
* usage of reflection is not needed anymore
* fix possible NPE for test...
Signed-off-by: Olivier Lamy
---
.../plugin/compiler/AbstractCompilerMojo.java | 39 +++----------------
.../plugin/compiler/TestCompilerMojo.java | 6 +--
2 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index cf6b86ce..6f275041 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -48,6 +48,7 @@
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
@@ -1496,7 +1497,7 @@ private Set getCompileSources( Compiler compiler, CompilerConfiguration co
catch ( InclusionScanException e )
{
throw new MojoExecutionException(
- "Error scanning source root: \'" + sourceRoot + "\' for stale files to recompile.", e );
+ "Error scanning source root: '" + sourceRoot + "' for stale files to recompile.", e );
}
}
@@ -1536,42 +1537,14 @@ private boolean isSourceChanged( CompilerConfiguration compilerConfiguration, Co
*/
protected int getRequestThreadCount()
{
- try
- {
- Method getRequestMethod = session.getClass().getMethod( "getRequest" );
- Object mavenExecutionRequest = getRequestMethod.invoke( this.session );
- Method getThreadCountMethod = mavenExecutionRequest.getClass().getMethod( "getThreadCount" );
- String threadCount = (String) getThreadCountMethod.invoke( mavenExecutionRequest );
- return Integer.parseInt( threadCount );
- }
- catch ( Exception e )
- {
- getLog().debug( "unable to get threadCount for the current build: " + e.getMessage() );
- }
- return 1;
+ return session.getRequest().getDegreeOfConcurrency();
}
protected Date getBuildStartTime()
{
- Date buildStartTime = null;
- try
- {
- Method getRequestMethod = session.getClass().getMethod( "getRequest" );
- Object mavenExecutionRequest = getRequestMethod.invoke( session );
- Method getStartTimeMethod = mavenExecutionRequest.getClass().getMethod( "getStartTime" );
- buildStartTime = (Date) getStartTimeMethod.invoke( mavenExecutionRequest );
- }
- catch ( Exception e )
- {
- getLog().debug( "unable to get start time for the current build: " + e.getMessage() );
- }
-
- if ( buildStartTime == null )
- {
- return new Date();
- }
-
- return buildStartTime;
+ MavenExecutionRequest request = session.getRequest();
+ Date buildStartTime = request == null ? new Date() : request.getStartTime();
+ return buildStartTime == null ? new Date() : buildStartTime;
}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index 9d9469f6..43683040 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -306,7 +306,7 @@ protected void preparePaths( Set sourceFiles )
if ( release != null )
{
- if ( Integer.valueOf( release ) < 9 )
+ if ( Integer.parseInt( release ) < 9 )
{
pathElements = Collections.emptyMap();
modulepathElements = Collections.emptyList();
@@ -314,7 +314,7 @@ protected void preparePaths( Set sourceFiles )
return;
}
}
- else if ( Double.valueOf( getTarget() ) < Double.valueOf( MODULE_INFO_TARGET ) )
+ else if ( Double.parseDouble( getTarget() ) < Double.parseDouble( MODULE_INFO_TARGET ) )
{
pathElements = Collections.emptyMap();
modulepathElements = Collections.emptyList();
@@ -440,7 +440,7 @@ protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEndi
if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
{
testIncludes = Collections.singleton( defaultIncludePattern );
- scanner = new SimpleSourceInclusionScanner( testIncludes, Collections.emptySet() );
+ scanner = new SimpleSourceInclusionScanner( testIncludes, Collections.emptySet() );
}
else
{
From a522b315c061429844afb14990487bc2fa99e5fb Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Tue, 26 Jul 2022 20:58:39 +1000
Subject: [PATCH 32/64] [MCOMPILER-500] add some parameter to pattern from
stale source calculation (#141)
Signed-off-by: Olivier Lamy
---
.../invoker.properties | 21 ++++++++
.../MCOMPILER-500-package-info-incr/pom.xml | 50 +++++++++++++++++++
.../src/main/java/dummy/Person.java | 38 ++++++++++++++
.../src/main/java/dummy/foo/Person.java | 38 ++++++++++++++
.../src/main/java/dummy/package-info.java | 23 +++++++++
.../verify.groovy | 27 ++++++++++
.../maven/plugin/compiler/CompilerMojo.java | 18 +++++--
.../plugin/compiler/TestCompilerMojo.java | 19 +++++--
8 files changed, 226 insertions(+), 8 deletions(-)
create mode 100644 src/it/MCOMPILER-500-package-info-incr/invoker.properties
create mode 100644 src/it/MCOMPILER-500-package-info-incr/pom.xml
create mode 100644 src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
create mode 100644 src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
create mode 100644 src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
create mode 100644 src/it/MCOMPILER-500-package-info-incr/verify.groovy
diff --git a/src/it/MCOMPILER-500-package-info-incr/invoker.properties b/src/it/MCOMPILER-500-package-info-incr/invoker.properties
new file mode 100644
index 00000000..367af02d
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/invoker.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = clean compile
+invoker.buildResult = success
+invoker.goals.2 = compile
+invoker.buildResult.2 = success
\ No newline at end of file
diff --git a/src/it/MCOMPILER-500-package-info-incr/pom.xml b/src/it/MCOMPILER-500-package-info-incr/pom.xml
new file mode 100644
index 00000000..c79c3f9a
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/pom.xml
@@ -0,0 +1,50 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins
+ maven-compiler-plugin-it-package-info-incr
+ 1.0.0-SNAPSHOT
+ jar
+
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @pom.version@
+
+ false
+
+ **/package-info.java
+
+
+
+
+
+
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
new file mode 100644
index 00000000..e5fbf583
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
@@ -0,0 +1,38 @@
+package dummy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+public class Person {
+ private long id;
+ private String name;
+
+ public long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
new file mode 100644
index 00000000..9b56c1d6
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
@@ -0,0 +1,38 @@
+package dummy.foo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+public class Person {
+ private long id;
+ private String name;
+
+ public long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
new file mode 100644
index 00000000..ed72542b
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * This is the package javadoc
+ */
+package dummy;
\ No newline at end of file
diff --git a/src/it/MCOMPILER-500-package-info-incr/verify.groovy b/src/it/MCOMPILER-500-package-info-incr/verify.groovy
new file mode 100644
index 00000000..ecba9c29
--- /dev/null
+++ b/src/it/MCOMPILER-500-package-info-incr/verify.groovy
@@ -0,0 +1,27 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+def logFile = new File( basedir, 'build.log' )
+assert logFile.exists()
+content = logFile.text
+
+assert 1 == content.count( 'Changes detected - recompiling the module!' )
+assert 1 == content.count( 'Nothing to compile - all classes are up to date' )
+
+
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index ea41300a..305d1e3f 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@@ -94,6 +94,13 @@ public class CompilerMojo
@Parameter
private Set excludes = new HashSet<>();
+ /**
+ * A list of exclusion filters for the incremental calculation.
+ * @since 3.11
+ */
+ @Parameter
+ private Set incrementalExcludes = new HashSet<>();
+
/**
*
* Specify where to place generated source files created by annotation processing. Only applies to JDK 1.6+
@@ -387,7 +394,7 @@ private List getCompileClasspathElements( MavenProject project )
protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
{
- if ( includes.isEmpty() && excludes.isEmpty() )
+ if ( includes.isEmpty() && excludes.isEmpty() && incrementalExcludes.isEmpty() )
{
return new StaleSourceScanner( staleMillis );
}
@@ -397,7 +404,9 @@ protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
includes.add( "**/*.java" );
}
- return new StaleSourceScanner( staleMillis, includes, excludes );
+ Set excludesIncr = new HashSet<>( excludes );
+ excludesIncr.addAll( this.incrementalExcludes );
+ return new StaleSourceScanner( staleMillis, includes, excludesIncr );
}
protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEnding )
@@ -409,8 +418,9 @@ protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEndi
{
includes.add( defaultIncludePattern );
}
-
- return new SimpleSourceInclusionScanner( includes, excludes );
+ Set excludesIncr = new HashSet<>( excludes );
+ excludesIncr.addAll( excludesIncr );
+ return new SimpleSourceInclusionScanner( includes, excludesIncr );
}
protected String getSource()
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index 43683040..ed855ab5 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -90,6 +90,13 @@ public class TestCompilerMojo
@Parameter
private Set testExcludes = new HashSet<>();
+ /**
+ * A list of exclusion filters for the incremental calculation.
+ * @since 3.11
+ */
+ @Parameter
+ private Set testIncrementalExcludes = new HashSet<>();
+
/**
* The -source argument for the test Java compiler.
*
@@ -414,7 +421,7 @@ protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
{
SourceInclusionScanner scanner;
- if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
+ if ( testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty() )
{
scanner = new StaleSourceScanner( staleMillis );
}
@@ -424,7 +431,9 @@ protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
{
testIncludes.add( "**/*.java" );
}
- scanner = new StaleSourceScanner( staleMillis, testIncludes, testExcludes );
+ Set excludesIncr = new HashSet<>( testExcludes );
+ excludesIncr.addAll( this.testIncrementalExcludes );
+ scanner = new StaleSourceScanner( staleMillis, testIncludes, excludesIncr );
}
return scanner;
@@ -437,7 +446,7 @@ protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEndi
// it's not defined if we get the ending with or without the dot '.'
String defaultIncludePattern = "**/*" + ( inputFileEnding.startsWith( "." ) ? "" : "." ) + inputFileEnding;
- if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
+ if ( testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty() )
{
testIncludes = Collections.singleton( defaultIncludePattern );
scanner = new SimpleSourceInclusionScanner( testIncludes, Collections.emptySet() );
@@ -448,7 +457,9 @@ protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEndi
{
testIncludes.add( defaultIncludePattern );
}
- scanner = new SimpleSourceInclusionScanner( testIncludes, testExcludes );
+ Set excludesIncr = new HashSet<>( testExcludes );
+ excludesIncr.addAll( this.testIncrementalExcludes );
+ scanner = new SimpleSourceInclusionScanner( testIncludes, excludesIncr );
}
return scanner;
From 413dbb702adcd807833454002d179f7ba66e42b3 Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Fri, 29 Jul 2022 07:18:22 +1000
Subject: [PATCH 33/64] MCOMPILER 499 display recompilation causes (#143)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Display recompilation causes
Signed-off-by: Olivier Lamy
Co-authored-by: Loïc Ledoyen
---
.../plugin/compiler/AbstractCompilerMojo.java | 97 +++++++++++++++++--
1 file changed, 89 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 6f275041..d9e5a6d5 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -61,6 +61,8 @@
import org.apache.maven.shared.incremental.IncrementalBuildHelperRequest;
import org.apache.maven.shared.utils.ReaderFactory;
import org.apache.maven.shared.utils.StringUtils;
+import org.apache.maven.shared.utils.io.DirectoryScanResult;
+import org.apache.maven.shared.utils.io.DirectoryScanner;
import org.apache.maven.shared.utils.io.FileUtils;
import org.apache.maven.shared.utils.logging.MessageBuilder;
import org.apache.maven.shared.utils.logging.MessageUtils;
@@ -101,6 +103,8 @@ public abstract class AbstractCompilerMojo
{
protected static final String PS = System.getProperty( "path.separator" );
+ private static final String INPUT_FILES_LST_FILENAME = "inputFiles.lst";
+
static final String DEFAULT_SOURCE = "1.7";
static final String DEFAULT_TARGET = "1.7";
@@ -561,6 +565,8 @@ public abstract class AbstractCompilerMojo
@Parameter( defaultValue = "true", property = "maven.compiler.createMissingPackageInfoClass" )
private boolean createMissingPackageInfoClass = true;
+ @Parameter( defaultValue = "false", property = "maven.compiler.showCompilationChanges" )
+ private boolean showCompilationChanges = false;
/**
* Resolves the artifacts needed.
*/
@@ -876,14 +882,34 @@ else if ( CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy().eq
incrementalBuildHelperRequest = new IncrementalBuildHelperRequest().inputFiles( sources );
+ DirectoryScanResult dsr = computeInputFileTreeChanges( incrementalBuildHelper, sources );
+
+ boolean idk = compiler.getCompilerOutputStyle()
+ .equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget;
+ boolean dependencyChanged = isDependencyChanged();
+ boolean sourceChanged = isSourceChanged( compilerConfiguration, compiler );
+ boolean inputFileTreeChanged = hasInputFileTreeChanged( dsr );
// CHECKSTYLE_OFF: LineLength
- if ( ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget )
- || isDependencyChanged()
- || isSourceChanged( compilerConfiguration, compiler )
- || incrementalBuildHelper.inputFileTreeChanged( incrementalBuildHelperRequest ) )
+ if ( idk
+ || dependencyChanged
+ || sourceChanged
+ || inputFileTreeChanged )
// CHECKSTYLE_ON: LineLength
{
- getLog().info( "Changes detected - recompiling the module!" );
+ String cause = idk ? "idk" : ( dependencyChanged ? "dependency"
+ : ( sourceChanged ? "source" : "input tree" ) );
+ getLog().info( "Changes detected - recompiling the module! :" + cause );
+ if ( showCompilationChanges )
+ {
+ for ( String fileAdded : dsr.getFilesAdded() )
+ {
+ getLog().info( "\t+ " + fileAdded );
+ }
+ for ( String fileRemoved : dsr.getFilesRemoved() )
+ {
+ getLog().info( "\t- " + fileRemoved );
+ }
+ }
compilerConfiguration.setSourceFiles( sources );
}
@@ -1519,11 +1545,18 @@ private boolean isSourceChanged( CompilerConfiguration compilerConfiguration, Co
Set staleSources =
computeStaleSources( compilerConfiguration, compiler, getSourceInclusionScanner( staleMillis ) );
- if ( getLog().isDebugEnabled() )
+ if ( getLog().isDebugEnabled() || showCompilationChanges )
{
for ( File f : staleSources )
{
- getLog().debug( "Stale source detected: " + f.getAbsolutePath() );
+ if ( showCompilationChanges )
+ {
+ getLog().info( "Stale source detected: " + f.getAbsolutePath() );
+ }
+ else
+ {
+ getLog().debug( "Stale source detected: " + f.getAbsolutePath() );
+ }
}
}
return !staleSources.isEmpty();
@@ -1740,7 +1773,14 @@ protected boolean isDependencyChanged()
{
if ( hasNewFile( artifactPath, buildStartTime ) )
{
- getLog().debug( "New dependency detected: " + artifactPath.getAbsolutePath() );
+ if ( showCompilationChanges )
+ {
+ getLog().info( "New dependency detected: " + artifactPath.getAbsolutePath() );
+ }
+ else
+ {
+ getLog().debug( "New dependency detected: " + artifactPath.getAbsolutePath() );
+ }
return true;
}
}
@@ -1889,6 +1929,47 @@ private String getMavenCompilerPluginVersion()
return pomProperties.getProperty( "version" );
}
+ private DirectoryScanResult computeInputFileTreeChanges( IncrementalBuildHelper ibh, Set inputFiles )
+ throws MojoExecutionException
+ {
+ File mojoConfigBase = ibh.getMojoStatusDirectory();
+ File mojoConfigFile = new File( mojoConfigBase, INPUT_FILES_LST_FILENAME );
+
+ String[] oldInputFiles = new String[0];
+
+ if ( mojoConfigFile.exists() )
+ {
+ try
+ {
+ oldInputFiles = FileUtils.fileReadArray( mojoConfigFile );
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error reading old mojo status " + mojoConfigFile, e );
+ }
+ }
+
+ String[] inputFileNames = inputFiles.stream().map( File::getAbsolutePath ).toArray( String[]::new );
+
+ DirectoryScanResult dsr = DirectoryScanner.diffFiles( oldInputFiles, inputFileNames );
+
+ try
+ {
+ FileUtils.fileWriteArray( mojoConfigFile, inputFileNames );
+ }
+ catch ( IOException e )
+ {
+ throw new MojoExecutionException( "Error while storing the mojo status", e );
+ }
+
+ return dsr;
+ }
+
+ private boolean hasInputFileTreeChanged( DirectoryScanResult dsr )
+ {
+ return ( dsr.getFilesAdded().length > 0 || dsr.getFilesRemoved().length > 0 );
+ }
+
public void setTarget( String target )
{
this.target = target;
From 0d1ff9f8fd812d8bdb57ce9795ce92fc3988b3e8 Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Tue, 2 Aug 2022 21:20:18 +1000
Subject: [PATCH 34/64] next version will be 3.11.0
Signed-off-by: Olivier Lamy
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index e81c21bd..b4402d2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ under the License.
maven-compiler-plugin
- 3.10.2-SNAPSHOT
+ 3.11.0-SNAPSHOTmaven-pluginApache Maven Compiler Plugin
From 7761563b0c1937c82666c284832cd9601c8fec2f Mon Sep 17 00:00:00 2001
From: Olivier Lamy
Date: Sun, 21 Aug 2022 21:29:38 +1000
Subject: [PATCH 35/64] force invoker.junitPackageName value
---
pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pom.xml b/pom.xml
index b4402d2f..d2c2fc69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,6 +79,7 @@ under the License.
2.22.23.6.22022-03-08T01:04:02Z
+ org.apache.maven.plugins.compiler.its
From 415c5a27008bfc7822b2de4444552aa2a4ab4ed3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jorge=20Sol=C3=B3rzano?=
Date: Thu, 8 Sep 2022 18:18:50 +0200
Subject: [PATCH 36/64] [MCOMPILER-505] - Update default source/target from 1.7
to 1.8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jorge Solórzano
---
.../maven/plugin/compiler/AbstractCompilerMojo.java | 10 ++++++----
src/site/apt/index.apt.vm | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index d9e5a6d5..b36761a1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -105,10 +105,10 @@ public abstract class AbstractCompilerMojo
private static final String INPUT_FILES_LST_FILENAME = "inputFiles.lst";
- static final String DEFAULT_SOURCE = "1.7";
-
- static final String DEFAULT_TARGET = "1.7";
-
+ static final String DEFAULT_SOURCE = "1.8";
+
+ static final String DEFAULT_TARGET = "1.8";
+
// Used to compare with older targets
static final String MODULE_INFO_TARGET = "1.9";
@@ -184,6 +184,7 @@ public abstract class AbstractCompilerMojo
*
* NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6.
* Since 3.9.0 the default value has changed from 1.6 to 1.7
+ * Since 3.11.0 the default value has changed from 1.7 to 1.8
*/
@Parameter( property = "maven.compiler.source", defaultValue = DEFAULT_SOURCE )
protected String source;
@@ -193,6 +194,7 @@ public abstract class AbstractCompilerMojo
*
* NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6.
* Since 3.9.0 the default value has changed from 1.6 to 1.7
+ * Since 3.11.0 the default value has changed from 1.7 to 1.8
*/
@Parameter( property = "maven.compiler.target", defaultValue = DEFAULT_TARGET )
protected String target;
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 7162b2b3..f1955d38 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -32,8 +32,8 @@ ${project.name}
default compiler is javax.tools.JavaCompiler (if you are using java 1.6) and is used to compile Java sources.
If you want to force the plugin using <<>>, you must configure the plugin option {{{./compile-mojo.html#forceJavacCompilerUse}<<>>}}.
- Also note that at present the default <<>> setting is <<<1.7>>> and the default <<>>
- setting is <<<1.7>>>, independently of the JDK you run Maven with.
+ Also note that at present the default <<>> setting is <<<1.8>>> and the default <<>>
+ setting is <<<1.8>>>, independently of the JDK you run Maven with.
You are highly encouraged to change these defaults by setting <<>> and <<>>
as described in
{{{./examples/set-compiler-source-and-target.html}Setting the -source and -target of the Java Compiler}}.
From f1ed86f6f3e112cae5f3294d5b2af560001c11c6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 19 Aug 2022 14:09:28 +0000
Subject: [PATCH 37/64] Bump maven-jxr-plugin from 3.2.0 to 3.3.0
Bumps [maven-jxr-plugin](https://github.com/apache/maven-jxr) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/apache/maven-jxr/releases)
- [Commits](https://github.com/apache/maven-jxr/compare/jxr-3.2.0...jxr-3.3.0)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jxr-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index d2c2fc69..0d8a2fb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -268,7 +268,7 @@ under the License.
org.apache.maven.pluginsmaven-jxr-plugin
- 3.2.0
+ 3.3.0org.apache.maven.plugins
From 4353f9d3532c3ea8a89a850d76aa5fc87e603573 Mon Sep 17 00:00:00 2001
From: Sylwester Lachiewicz
Date: Fri, 9 Sep 2022 00:58:30 +0200
Subject: [PATCH 38/64] [MCOMPILER-505] Small cleanup after review
---
.../plugin/compiler/AbstractCompilerMojo.java | 18 ++++++-----
.../plugin/compiler/CompilerMojoTestCase.java | 30 +++----------------
2 files changed, 14 insertions(+), 34 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index b36761a1..58d907d1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -181,20 +181,22 @@ public abstract class AbstractCompilerMojo
/**
*
The -source argument for the Java compiler.
- *
- * NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6.
- * Since 3.9.0 the default value has changed from 1.6 to 1.7
- * Since 3.11.0 the default value has changed from 1.7 to 1.8
+ *
+ *
NOTE:
+ *
Since 3.8.0 the default value has changed from 1.5 to 1.6
+ *
Since 3.9.0 the default value has changed from 1.6 to 1.7
+ *
Since 3.11.0 the default value has changed from 1.7 to 1.8
- *
- * NOTE: Since 3.8.0 the default value has changed from 1.5 to 1.6.
- * Since 3.9.0 the default value has changed from 1.6 to 1.7
- * Since 3.11.0 the default value has changed from 1.7 to 1.8
+ *
+ *
NOTE:
+ *
Since 3.8.0 the default value has changed from 1.5 to 1.6
+ *
Since 3.9.0 the default value has changed from 1.6 to 1.7
+ *
Since 3.11.0 the default value has changed from 1.7 to 1.8
*/
@Parameter( property = "maven.compiler.target", defaultValue = DEFAULT_TARGET )
protected String target;
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index bc78398a..6c12627d 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -46,33 +46,11 @@
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.testing.stubs.ArtifactStub;
import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.languages.java.version.JavaVersion;
public class CompilerMojoTestCase
extends AbstractMojoTestCase
{
-
- private String source = AbstractCompilerMojo.DEFAULT_SOURCE;
- private String target = AbstractCompilerMojo.DEFAULT_TARGET;
-
- @Override
- protected void setUp()
- throws Exception
- {
- super.setUp();
-
- String javaSpec = System.getProperty( "java.specification.version" );
- // It is needed to set target/source to JDK 7 for JDK12+
- // because this is the lowest version which is supported by those JDK's.
- // The default source/target "6" is not supported anymore.
- if ( JavaVersion.parse( javaSpec ).isAtLeast( "12" ) )
- {
- source = "7";
- target = "7";
- }
- }
-
/**
* tests the ability of the plugin to compile a basic file
*
@@ -411,8 +389,8 @@ private CompilerMojo getCompilerMojo( String pomXml )
setVariableValueToObject( mojo, "session", getMockMavenSession() );
setVariableValueToObject( mojo, "project", getMockMavenProject() );
setVariableValueToObject( mojo, "mojoExecution", getMockMojoExecution() );
- setVariableValueToObject( mojo, "source", source );
- setVariableValueToObject( mojo, "target", target );
+ setVariableValueToObject( mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE );
+ setVariableValueToObject( mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET );
return mojo;
}
@@ -467,8 +445,8 @@ private TestCompilerMojo getTestCompilerMojo( CompilerMojo compilerMojo, String
setVariableValueToObject( mojo, "testPath", testClasspathList );
setVariableValueToObject( mojo, "session", getMockMavenSession() );
setVariableValueToObject( mojo, "mojoExecution", getMockMojoExecution() );
- setVariableValueToObject( mojo, "source", source );
- setVariableValueToObject( mojo, "target", target );
+ setVariableValueToObject( mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE );
+ setVariableValueToObject( mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET );
return mojo;
}
From ff45fef673b01ff000299f83dec0737c2251bd0c Mon Sep 17 00:00:00 2001
From: Sylwester Lachiewicz
Date: Fri, 9 Sep 2022 00:47:09 +0200
Subject: [PATCH 39/64] [MCOMPILER-506] Upgrade parent pom to 37 and cleanup
pom
---
pom.xml | 95 ++-------------------------------------------------------
1 file changed, 3 insertions(+), 92 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0d8a2fb2..847dc589 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven.pluginsmaven-plugins
- 34
+ 37
@@ -76,8 +76,6 @@ under the License.
1.1.18false
- 2.22.2
- 3.6.22022-03-08T01:04:02Zorg.apache.maven.plugins.compiler.its
@@ -171,35 +169,17 @@ under the License.
org.codehaus.plexusplexus-compiler-api${plexusCompilerVersion}
-
-
- org.codehaus.plexus
- plexus-component-api
-
-
org.codehaus.plexusplexus-compiler-manager${plexusCompilerVersion}
-
-
- org.codehaus.plexus
- plexus-component-api
-
- org.codehaus.plexusplexus-compiler-javac${plexusCompilerVersion}runtime
-
-
- org.codehaus.plexus
- plexus-component-api
-
-
@@ -229,75 +209,10 @@ under the License.
-
-
-
- org.apache.rat
- apache-rat-plugin
-
-
- .java-version
-
-
-
-
- maven-enforcer-plugin
- 3.0.0-M3
-
-
- enforce-bytecode-version
-
-
-
- ${javaVersion}
-
- org.ow2.asm:asm
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-invoker-plugin
- 3.3.0
-
-
- org.apache.maven.plugins
- maven-jxr-plugin
- 3.3.0
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.4.0
-
-
-
-
-
- org.apache.maven.plugins
- maven-release-plugin
- 3.0.0-M6
-
-
-
- org.codehaus.plexus
- plexus-component-metadata
- 2.1.1
-
-
- descriptors
-
- generate-metadata
-
-
-
+ org.eclipse.sisu
+ sisu-maven-plugin
@@ -343,10 +258,6 @@ under the License.
src/it/settings.xml${maven.it.failure.ignore}true
-
-
- ${https.protocols}
- cleantest-compile
From 73ccc38aacbcbc30980957a96e1e2f34af2161b2 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 8 Sep 2022 14:20:01 +0000
Subject: [PATCH 40/64] Bump mockito-core from 4.6.1 to 4.8.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.6.1 to 4.8.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.6.1...v4.8.0)
---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 847dc589..d6b532d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -197,7 +197,7 @@ under the License.
org.mockitomockito-core
- 4.6.1
+ 4.8.0test
From 5afdd48ade31aa59ef02ef1b5d093fd5032273b5 Mon Sep 17 00:00:00 2001
From: Sylwester Lachiewicz
Date: Fri, 9 Sep 2022 01:34:46 +0200
Subject: [PATCH 41/64] [MCOMPILER-507] Upgrade QDox to 2.0.2
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index d6b532d1..467a251d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,10 +102,10 @@ under the License.
-
+
com.thoughtworks.qdoxqdox
- 2.0.1
+ 2.0.2
From 973e5b03ac93dc1798c26dd0d2d888a48d06e551 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Wed, 2 Nov 2022 23:45:35 +0100
Subject: [PATCH 42/64] add Reproducible Builds badge
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 7ea92537..251bb18e 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@ Contributing to [Apache Maven Compiler Plugin](https://maven.apache.org/plugins/
[][jira]
[][license]
[](https://search.maven.org/artifact/org.apache.maven.plugins/maven-compiler-plugin)
+[](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/maven/plugins/maven-compiler-plugin/README.md)
[][build]
[][test-results]
From d0f0bc0ca5d6300ba62cf015581d54a146049e60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?=
Date: Sat, 19 Mar 2022 15:40:10 +0100
Subject: [PATCH 43/64] [MCOMPILER-457] Warn about warn-config conflicting
values
---
.../apache/maven/plugin/compiler/AbstractCompilerMojo.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 58d907d1..99793f8b 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -732,6 +732,12 @@ public void execute()
compilerConfiguration.setFailOnWarning( failOnWarning );
+ if ( failOnWarning && !showWarnings )
+ {
+ getLog().warn( "The property failOnWarning is set to true, but showWarnings is set to false." );
+ getLog().warn( "With compiler's warnings silenced the failOnWarning has no effect." );
+ }
+
compilerConfiguration.setShowDeprecation( showDeprecation );
compilerConfiguration.setSourceVersion( getSource() );
From ffc14f66f91d09c498456282814d3c3ad2239fb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotrek=20=C5=BBygie=C5=82o?=
Date: Fri, 25 Nov 2022 14:25:39 +0100
Subject: [PATCH 44/64] [MCOMPILER-457] Change showWarnings to true by default
Co-authored-by: Slawomir Jaranowski
---
.../apache/maven/plugin/compiler/AbstractCompilerMojo.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 99793f8b..ea37a4d5 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -174,9 +174,9 @@ public abstract class AbstractCompilerMojo
private boolean optimize;
/**
- * Set to true to show compilation warnings.
+ * Set to false to disable warnings during compilation.
*/
- @Parameter( property = "maven.compiler.showWarnings", defaultValue = "false" )
+ @Parameter( property = "maven.compiler.showWarnings", defaultValue = "true" )
private boolean showWarnings;
/**
From 752a1fa09751bb8e5de44a58d8063bf8001715e6 Mon Sep 17 00:00:00 2001
From: project25o1
Date: Thu, 8 Dec 2022 09:57:58 +0100
Subject: [PATCH 45/64] [MCOMPILER-512] - Defining maven.compiler.release as
empty string end with NumberFormatException (#158)
---
src/it/MCOMPILER-512/invoker.properties | 20 ++++++++
src/it/MCOMPILER-512/pom.xml | 46 +++++++++++++++++++
.../src/main/java/dummy/Main.java | 32 +++++++++++++
.../src/test/java/dummy/Test.java | 30 ++++++++++++
.../plugin/compiler/TestCompilerMojo.java | 5 +-
5 files changed, 131 insertions(+), 2 deletions(-)
create mode 100644 src/it/MCOMPILER-512/invoker.properties
create mode 100644 src/it/MCOMPILER-512/pom.xml
create mode 100644 src/it/MCOMPILER-512/src/main/java/dummy/Main.java
create mode 100644 src/it/MCOMPILER-512/src/test/java/dummy/Test.java
diff --git a/src/it/MCOMPILER-512/invoker.properties b/src/it/MCOMPILER-512/invoker.properties
new file mode 100644
index 00000000..9bcebc20
--- /dev/null
+++ b/src/it/MCOMPILER-512/invoker.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = clean test
+invoker.buildResult = success
+invoker.java.version = 9+
\ No newline at end of file
diff --git a/src/it/MCOMPILER-512/pom.xml b/src/it/MCOMPILER-512/pom.xml
new file mode 100644
index 00000000..5e15953a
--- /dev/null
+++ b/src/it/MCOMPILER-512/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins
+ maven-compiler-plugin-MCOMPILER512
+ 1.0.0-SNAPSHOT
+ jar
+
+
+ UTF-8
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @pom.version@
+
+
+
+
diff --git a/src/it/MCOMPILER-512/src/main/java/dummy/Main.java b/src/it/MCOMPILER-512/src/main/java/dummy/Main.java
new file mode 100644
index 00000000..7b36fb73
--- /dev/null
+++ b/src/it/MCOMPILER-512/src/main/java/dummy/Main.java
@@ -0,0 +1,32 @@
+package dummy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import javax.smartcardio.TerminalFactory;
+
+public class Main
+{
+
+ public static void main(String[] args)
+ {
+ TerminalFactory tf = TerminalFactory.getDefault();
+ }
+
+}
diff --git a/src/it/MCOMPILER-512/src/test/java/dummy/Test.java b/src/it/MCOMPILER-512/src/test/java/dummy/Test.java
new file mode 100644
index 00000000..a0cc02cf
--- /dev/null
+++ b/src/it/MCOMPILER-512/src/test/java/dummy/Test.java
@@ -0,0 +1,30 @@
+package dummy;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import javax.smartcardio.TerminalFactory;
+
+public class Test
+{
+ public void test()
+ {
+ TerminalFactory tf = TerminalFactory.getDefault();
+ }
+}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index ed855ab5..1c854fa6 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -38,6 +38,7 @@
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.shared.utils.StringUtils;
import org.apache.maven.toolchain.Toolchain;
import org.apache.maven.toolchain.java.DefaultJavaToolChain;
import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
@@ -311,9 +312,9 @@ protected void preparePaths( Set sourceFiles )
testModuleDescriptor = result.getMainModuleDescriptor();
}
- if ( release != null )
+ if ( StringUtils.isNotEmpty( getRelease() ) )
{
- if ( Integer.parseInt( release ) < 9 )
+ if ( Integer.parseInt( getRelease() ) < 9 )
{
pathElements = Collections.emptyMap();
modulepathElements = Collections.emptyList();
From 5be316391ea7c575ee65c3fe83b4c7b30e1174d0 Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Fri, 9 Dec 2022 18:31:20 +0100
Subject: [PATCH 46/64] [MCOMPILER-501] compileSourceRoots parameter should be
writable (#159)
Make compileSourceRoots read/write so that it can be used in multi-release jars without issuing a warning
---
.../java/org/apache/maven/plugin/compiler/CompilerMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index 305d1e3f..e7efa7f1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@@ -65,7 +65,7 @@ public class CompilerMojo
/**
* The source directories containing the sources to be compiled.
*/
- @Parameter( defaultValue = "${project.compileSourceRoots}", readonly = true, required = true )
+ @Parameter( defaultValue = "${project.compileSourceRoots}", readonly = false, required = true )
private List compileSourceRoots;
/**
From 9b5605cacecdb6f29cd7381ec2923ef6ba4f35aa Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 18 Dec 2022 21:04:16 +1000
Subject: [PATCH 47/64] Bump qdox from 2.0.2 to 2.0.3 (#152)
Bumps [qdox](https://github.com/paul-hammant/qdox) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/paul-hammant/qdox/releases)
- [Commits](https://github.com/paul-hammant/qdox/compare/qdox-2.0.2...qdox-2.0.3)
---
updated-dependencies:
- dependency-name: com.thoughtworks.qdox:qdox
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 467a251d..a2f0b9c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,7 @@ under the License.
com.thoughtworks.qdoxqdox
- 2.0.2
+ 2.0.3
From 81de779e886adfb75b804fca0ab3e2e36724380b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Boutemy?=
Date: Sun, 18 Dec 2022 04:53:54 +0100
Subject: [PATCH 48/64] [MCOMPILER-516] upgrade plexus-compiler to improve
compiling message
---
pom.xml | 2 +-
src/it/MCOMPILER-192/verify.groovy | 2 +-
.../plugin/compiler/AbstractCompilerMojo.java | 35 +------------------
.../plugin/compiler/stubs/CompilerStub.java | 25 -------------
4 files changed, 3 insertions(+), 61 deletions(-)
diff --git a/pom.xml b/pom.xml
index a2f0b9c4..017cbbe9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
3.5
- 2.12.1
+ 2.13.02.4.213.7.0
diff --git a/src/it/MCOMPILER-192/verify.groovy b/src/it/MCOMPILER-192/verify.groovy
index 0bdd307e..4e6e3b0a 100644
--- a/src/it/MCOMPILER-192/verify.groovy
+++ b/src/it/MCOMPILER-192/verify.groovy
@@ -23,7 +23,7 @@ assert logFile.exists()
def content = logFile.getText('UTF-8')
def causedByExpected = content.contains ( 'Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure' )
-def twoFilesBeingCompiled = content.contains ( '[INFO] Compiling 2 source files to ' )
+def twoFilesBeingCompiled = content.contains ( '[INFO] Compiling 2 source files with javac ' )
def checkResult = content.contains ( '[INFO] BUILD FAILURE' )
def compilationFailure1 = content.contains( '[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:')
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index ea37a4d5..8da9213b 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -70,10 +70,8 @@
import org.apache.maven.toolchain.ToolchainManager;
import org.codehaus.plexus.compiler.Compiler;
import org.codehaus.plexus.compiler.CompilerConfiguration;
-import org.codehaus.plexus.compiler.CompilerError;
import org.codehaus.plexus.compiler.CompilerException;
import org.codehaus.plexus.compiler.CompilerMessage;
-import org.codehaus.plexus.compiler.CompilerNotImplementedException;
import org.codehaus.plexus.compiler.CompilerOutputStyle;
import org.codehaus.plexus.compiler.CompilerResult;
import org.codehaus.plexus.compiler.manager.CompilerManager;
@@ -1255,15 +1253,7 @@ else if ( !values[0].equals( descriptor.name() ) )
try
{
- try
- {
- compilerResult = compiler.performCompile( compilerConfiguration );
- }
- catch ( CompilerNotImplementedException cnie )
- {
- List messages = compiler.compile( compilerConfiguration );
- compilerResult = convertToCompilerResult( messages );
- }
+ compilerResult = compiler.performCompile( compilerConfiguration );
}
catch ( Exception e )
{
@@ -1472,29 +1462,6 @@ protected boolean isTestCompile()
return false;
}
- protected CompilerResult convertToCompilerResult( List compilerErrors )
- {
- if ( compilerErrors == null )
- {
- return new CompilerResult();
- }
- List messages = new ArrayList<>( compilerErrors.size() );
- boolean success = true;
- for ( CompilerError compilerError : compilerErrors )
- {
- messages.add(
- new CompilerMessage( compilerError.getFile(), compilerError.getKind(), compilerError.getStartLine(),
- compilerError.getStartColumn(), compilerError.getEndLine(),
- compilerError.getEndColumn(), compilerError.getMessage() ) );
- if ( compilerError.isError() )
- {
- success = false;
- }
- }
-
- return new CompilerResult( success, messages );
- }
-
/**
* @return all source files for the compiler
*/
diff --git a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
index fd94cc24..23eb392a 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
@@ -20,7 +20,6 @@
*/
import org.codehaus.plexus.compiler.CompilerConfiguration;
-import org.codehaus.plexus.compiler.CompilerError;
import org.codehaus.plexus.compiler.CompilerException;
import org.codehaus.plexus.compiler.CompilerMessage;
import org.codehaus.plexus.compiler.CompilerOutputStyle;
@@ -29,7 +28,6 @@
import java.io.File;
import java.io.IOException;
import java.util.Collections;
-import java.util.List;
/**
* @author Edwin Punzalan
@@ -74,29 +72,6 @@ public boolean canUpdateTarget( CompilerConfiguration compilerConfiguration )
return false;
}
- public List compile( CompilerConfiguration compilerConfiguration )
- throws CompilerException
- {
- File outputDir = new File( compilerConfiguration.getOutputLocation() );
-
- try
- {
- outputDir.mkdirs();
-
- File outputFile = new File( outputDir, "compiled.class" );
- if ( !outputFile.exists() && !outputFile.createNewFile() )
- {
- throw new CompilerException( "could not create output file: " + outputFile.getAbsolutePath() );
- }
- }
- catch ( IOException e )
- {
- throw new CompilerException( "An exception occurred while creating output file", e );
- }
-
- return Collections.singletonList( new CompilerError( "message 1", shouldFail ) );
- }
-
public CompilerResult performCompile( CompilerConfiguration compilerConfiguration )
throws CompilerException
{
From c62de5ccc75ff404d8ab5d6aa428434c127fb161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0irok=C3=BD?=
Date: Mon, 9 Jan 2023 23:28:54 +0100
Subject: [PATCH 49/64] [MCOMPILER-519] Upgrade maven-invoker-plugin from 3.3.0
to 3.4.0
* 3.4.0 brings in support for building on JDK 19
* once the parent brings in this version, the explicit version can be
of course removed
---
pom.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pom.xml b/pom.xml
index 017cbbe9..3f6c961c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -226,6 +226,8 @@ under the License.
org.apache.maven.pluginsmaven-invoker-plugin
+
+ 3.4.0integration-test
From 52fb27ea14e0aa96fc1acd30e8c3e7fbd07c5563 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0irok=C3=BD?=
Date: Thu, 19 Jan 2023 11:57:36 +0100
Subject: [PATCH 50/64] [MCOMPILER-522] Use maven-resolver to resolve
'annotationProcessorPaths' dependencies
* heavily based on work by @cstamas (PR #151)
* added IT to verify the build fails if one the dependencies
cannot be resolved (does not exist)
---
pom.xml | 1 +
.../invoker.properties | 19 ++++++
.../pom.xml | 52 ++++++++++++++++
.../SimpleAnnotation.java | 32 ++++++++++
.../SimpleObject.java | 26 ++++++++
.../verify.groovy | 26 ++++++++
.../plugin/compiler/AbstractCompilerMojo.java | 60 ++++++++-----------
7 files changed, 181 insertions(+), 35 deletions(-)
create mode 100644 src/it/MCOMPILER-522-unresolvable-dependency/invoker.properties
create mode 100644 src/it/MCOMPILER-522-unresolvable-dependency/pom.xml
create mode 100644 src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
create mode 100644 src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
create mode 100644 src/it/MCOMPILER-522-unresolvable-dependency/verify.groovy
diff --git a/pom.xml b/pom.xml
index 3f6c961c..a3f67462 100644
--- a/pom.xml
+++ b/pom.xml
@@ -189,6 +189,7 @@ under the License.
test
+
org.apache.mavenmaven-compat${mavenVersion}
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/invoker.properties b/src/it/MCOMPILER-522-unresolvable-dependency/invoker.properties
new file mode 100644
index 00000000..9e2dad8a
--- /dev/null
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/invoker.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = compile
+invoker.buildResult = failure
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/pom.xml b/src/it/MCOMPILER-522-unresolvable-dependency/pom.xml
new file mode 100644
index 00000000..0614cd0d
--- /dev/null
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/pom.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler522-unresolvable-annotation-processor-depdendency
+ 1.0-SNAPSHOT
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @project.version@
+
+
+ org.issue.SimpleAnnotationProcessor
+
+
+
+ org.apache.maven.plugins.compiler.it
+ annotation-processor-non-existing
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
new file mode 100644
index 00000000..0c79335f
--- /dev/null
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.maven.plugins.compiler.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface SimpleAnnotation
+{
+
+}
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
new file mode 100644
index 00000000..5d8760e5
--- /dev/null
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
@@ -0,0 +1,26 @@
+package org.apache.maven.plugins.compiler.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@SimpleAnnotation
+public class SimpleObject
+{
+
+}
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/verify.groovy b/src/it/MCOMPILER-522-unresolvable-dependency/verify.groovy
new file mode 100644
index 00000000..7c862129
--- /dev/null
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/verify.groovy
@@ -0,0 +1,26 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+def logFile = new File( basedir, 'build.log' )
+assert logFile.exists()
+
+def buildLog = logFile.getText('UTF-8')
+assert buildLog.contains( "Caused by: org.apache.maven.plugin.MojoExecutionException: " +
+ "Resolution of annotationProcessorPath dependencies failed: " +
+ "Could not find artifact org.apache.maven.plugins.compiler.it:annotation-processor-non-existing:jar:1.0-SNAPSHOT" )
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 8da9213b..19265a79 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -40,14 +40,8 @@
import java.util.Properties;
import java.util.Set;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.handler.ArtifactHandler;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
-import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
-import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
-import org.apache.maven.artifact.resolver.ResolutionErrorHandler;
-import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
@@ -56,7 +50,6 @@
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.RepositorySystem;
import org.apache.maven.shared.incremental.IncrementalBuildHelper;
import org.apache.maven.shared.incremental.IncrementalBuildHelperRequest;
import org.apache.maven.shared.utils.ReaderFactory;
@@ -83,6 +76,15 @@
import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
import org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor;
import org.codehaus.plexus.languages.java.version.JavaVersion;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.resolution.DependencyRequest;
+import org.eclipse.aether.resolution.DependencyResult;
+import org.eclipse.aether.util.artifact.JavaScopes;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
@@ -581,12 +583,6 @@ public abstract class AbstractCompilerMojo
@Component
private ArtifactHandlerManager artifactHandlerManager;
- /**
- * Throws an exception on artifact resolution errors.
- */
- @Component
- private ResolutionErrorHandler resolutionErrorHandler;
-
protected abstract SourceInclusionScanner getSourceInclusionScanner( int staleMillis );
protected abstract SourceInclusionScanner getSourceInclusionScanner( String inputFileEnding );
@@ -1814,29 +1810,23 @@ private List resolveProcessorPathEntries()
ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( coord.getType() );
Artifact artifact = new DefaultArtifact(
- coord.getGroupId(),
- coord.getArtifactId(),
- VersionRange.createFromVersionSpec( coord.getVersion() ),
- Artifact.SCOPE_RUNTIME,
- coord.getType(),
- coord.getClassifier(),
- handler,
- false );
-
- ArtifactResolutionRequest request = new ArtifactResolutionRequest()
- .setArtifact( artifact )
- .setResolveRoot( true )
- .setResolveTransitively( true )
- .setLocalRepository( session.getLocalRepository() )
- .setRemoteRepositories( project.getRemoteArtifactRepositories() );
-
- ArtifactResolutionResult resolutionResult = repositorySystem.resolve( request );
-
- resolutionErrorHandler.throwErrors( request, resolutionResult );
-
- for ( Artifact resolved : resolutionResult.getArtifacts() )
+ coord.getGroupId(),
+ coord.getArtifactId(),
+ coord.getClassifier(),
+ handler.getExtension(),
+ coord.getVersion()
+ );
+
+ CollectRequest collectRequest = new CollectRequest( new Dependency( artifact, JavaScopes.RUNTIME ),
+ project.getRemoteProjectRepositories() );
+ DependencyRequest dependencyRequest = new DependencyRequest();
+ dependencyRequest.setCollectRequest( collectRequest );
+ DependencyResult dependencyResult = repositorySystem.resolveDependencies(
+ session.getRepositorySession(), dependencyRequest );
+
+ for ( ArtifactResult resolved : dependencyResult.getArtifactResults() )
{
- elements.add( resolved.getFile().getAbsolutePath() );
+ elements.add( resolved.getArtifact().getFile().getAbsolutePath() );
}
}
return new ArrayList<>( elements );
From a87bebfa602bb4ebded71daa7d173cb96a0d10a3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Jan 2023 21:24:45 +0000
Subject: [PATCH 51/64] Bump junit in
/src/it/multirelease-patterns/packaging-plugin
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)
---
updated-dependencies:
- dependency-name: junit:junit
dependency-type: direct:development
...
Signed-off-by: dependabot[bot]
---
src/it/multirelease-patterns/packaging-plugin/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/it/multirelease-patterns/packaging-plugin/pom.xml b/src/it/multirelease-patterns/packaging-plugin/pom.xml
index 41735132..593d4a13 100644
--- a/src/it/multirelease-patterns/packaging-plugin/pom.xml
+++ b/src/it/multirelease-patterns/packaging-plugin/pom.xml
@@ -78,7 +78,7 @@
junitjunit
- 4.12
+ 4.13.1test
From aab8416877222af44695f65797c18adad55a1349 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0irok=C3=BD?=
Date: Sun, 22 Jan 2023 23:56:23 +0100
Subject: [PATCH 52/64] asf.yaml: autolink MCOMPILER JIRAs
---
.asf.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.asf.yaml b/.asf.yaml
index 8f576f26..9a539e38 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -23,3 +23,5 @@ github:
- build-management
- maven-plugins
- maven
+ autolink_jira:
+ - MCOMPILER
From 3f95d39f166809bc1a2bb0b2fa62c190e8d2a9f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0irok=C3=BD?=
Date: Mon, 30 Jan 2023 01:51:40 +0100
Subject: [PATCH 53/64] [MCOMPILER-503] Resolve all annotation processor
dependencies together (#170)
* [MCOMPILER-503] Resolve all annotation processor dependencies together
* resolving the anootation processor paths in multiple requests can easily
lead to duplicated dependencies, e.g. if two processors depend on
the same transitive dependency. Ultimately, both versions would end-up on
processorpath, but of course only one of them would be used
(likely dependeing on the order of elements of processorpath)
* the previous behavior also did match the general rules of dependency
resolution used by Maven itself and other plugins
* this may potentially be a breaking change for certain corner cases,
if for example some projects mistakenly rely on the order of elemenets in
processorpath
* [MCOMPILER-503] Extract and reuse annotation-verify-plugin in multiple ITs
---
pom.xml | 7 +-
src/it/MCOMPILER-157/annotation-user/pom.xml | 6 +-
.../MCOMPILER-157/annotation-verify/pom.xml | 130 -----------
src/it/MCOMPILER-157/pom.xml | 1 -
.../annotation-user/pom.xml | 6 +-
.../java/org/issue/SourcePathReadGoal.java | 107 ---------
src/it/MCOMPILER-203-processorpath/pom.xml | 1 -
.../annotation-processor-dep-v1/pom.xml | 34 +++
.../AnnotationProcessorDependencyV1.java | 23 ++
.../annotation-processor-dep-v2/pom.xml | 35 +++
.../AnnotationProcessorDependencyV2.java | 23 ++
.../annotation-processor/pom.xml | 41 ++++
.../SimpleAnnotationProcessor.java | 121 ++++++++++
.../annotation-user/pom.xml | 78 +++++++
.../java/mcompiler503/SimpleAnnotation.java | 30 +++
.../main/java/mcompiler503/SimpleObject.java | 24 ++
.../java/mcompiler503/SimpleTestObject.java | 24 ++
.../invoker.properties | 18 ++
.../pom.xml | 49 ++++
.../invoker.properties | 18 ++
.../pom.xml | 218 ++++++++----------
.../SourcePathReadGoal.java | 13 +-
.../plugin/compiler/AbstractCompilerMojo.java | 51 ++--
23 files changed, 653 insertions(+), 405 deletions(-)
delete mode 100644 src/it/MCOMPILER-157/annotation-verify/pom.xml
delete mode 100644 src/it/MCOMPILER-203-processorpath/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/pom.xml
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/pom.xml
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/pom.xml
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/pom.xml
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/invoker.properties
create mode 100644 src/it/MCOMPILER-503-processorpath-duplicated-deps/pom.xml
create mode 100644 src/it/setup_annotation-verify-plugin/invoker.properties
rename src/it/{MCOMPILER-203-processorpath/annotation-verify => setup_annotation-verify-plugin}/pom.xml (53%)
rename src/it/{MCOMPILER-157/annotation-verify/src/main/java/org/issue => setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it}/SourcePathReadGoal.java (92%)
diff --git a/pom.xml b/pom.xml
index a3f67462..992a2d91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -249,13 +249,8 @@ under the License.
! https://issues.apache.org/jira/browse/MINVOKER-174
-->
- setup_jar_module/pom.xml
- setup_jar_automodule/pom.xml
- setup_x/pom.xml
+ setup*/pom.xml
-
- setup_x/**
- verify${project.build.directory}/local-reposrc/it/settings.xml
diff --git a/src/it/MCOMPILER-157/annotation-user/pom.xml b/src/it/MCOMPILER-157/annotation-user/pom.xml
index 69066f74..9d304fea 100644
--- a/src/it/MCOMPILER-157/annotation-user/pom.xml
+++ b/src/it/MCOMPILER-157/annotation-user/pom.xml
@@ -58,9 +58,9 @@ under the License.
- org.issue
- annotation-verify
- 1.0-SNAPSHOT
+ org.apache.maven.plugins.compiler.it
+ annotation-verify-plugin
+ 1.0.0-SNAPSHOTverify-annotations
diff --git a/src/it/MCOMPILER-157/annotation-verify/pom.xml b/src/it/MCOMPILER-157/annotation-verify/pom.xml
deleted file mode 100644
index ddfeab34..00000000
--- a/src/it/MCOMPILER-157/annotation-verify/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
- 4.0.0
-
-
- org.issue
- compiler-test
- 1.0-SNAPSHOT
-
-
- annotation-verify
- maven-plugin
-
-
-
- org.issue
- annotation-processor
- 1.0-SNAPSHOT
- provided
-
-
-
- org.apache.maven.plugin-tools
- maven-plugin-annotations
- 3.3
- provided
-
-
- org.apache.maven
- maven-plugin-api
- @mavenVersion@
-
-
- org.apache.maven
- maven-artifact
- @mavenVersion@
-
-
- org.apache.maven
- maven-core
- @mavenVersion@
-
-
- org.apache.maven.reporting
- maven-reporting-api
-
-
- org.apache.maven.wagon
- wagon-file
-
-
- org.apache.maven.wagon
- wagon-http-lightweight
-
-
- org.apache.maven.wagon
- wagon-ssh
-
-
- org.apache.maven.wagon
- wagon-ssh-external
-
-
- commons-cli
- commons-cli
-
-
- classworlds
- classworlds
-
-
- org.codehaus.plexus
- plexus-container-default
-
-
- org.codehaus.plexus
- plexus-interactivity-api
-
-
-
-
- org.apache.maven.shared
- maven-shared-utils
- 3.3.3
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-plugin-plugin
- @mavenPluginPluginVersion@
-
- true
-
-
-
- mojo-descriptor
- process-classes
-
- descriptor
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/it/MCOMPILER-157/pom.xml b/src/it/MCOMPILER-157/pom.xml
index e5494e86..9b2e7560 100644
--- a/src/it/MCOMPILER-157/pom.xml
+++ b/src/it/MCOMPILER-157/pom.xml
@@ -31,7 +31,6 @@ under the License.
annotation-processor
- annotation-verifyannotation-user
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
index 80d94fee..42cb8999 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml
@@ -63,9 +63,9 @@ under the License.
- org.issue
- annotation-verify
- 1.0-SNAPSHOT
+ org.apache.maven.plugins.compiler.it
+ annotation-verify-plugin
+ 1.0.0-SNAPSHOTverify-annotations
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java b/src/it/MCOMPILER-203-processorpath/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java
deleted file mode 100644
index 971870f6..00000000
--- a/src/it/MCOMPILER-203-processorpath/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.issue;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.shared.utils.StringUtils;
-import org.apache.maven.shared.utils.io.FileUtils;
-
-@Mojo( name = "read-source", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES )
-public class SourcePathReadGoal
- extends AbstractMojo
-{
-
- @Parameter
- protected String sourceClass;
-
- @Parameter
- protected String testSourceClass;
-
- @Parameter( defaultValue = "${project}" )
- protected MavenProject project;
-
- @SuppressWarnings( "unchecked" )
- public void execute()
- throws MojoExecutionException, MojoFailureException
- {
- if ( sourceClass != null )
- {
- getLog().info( "Checking compile source roots for: '" + sourceClass + "'" );
- assertGeneratedSourceFileFor( sourceClass, project.getCompileSourceRoots() );
- }
-
- if ( testSourceClass != null )
- {
- getLog().info( "Checking test-compile source roots for: '" + testSourceClass + "'" );
- assertGeneratedSourceFileFor( testSourceClass, project.getTestCompileSourceRoots() );
- }
- }
-
- private void assertGeneratedSourceFileFor( String sourceClass, List sourceRoots )
- throws MojoFailureException, MojoExecutionException
- {
- String sourceFile = sourceClass.replace( '.', '/' )
- .concat( ".txt" );
-
- boolean found = false;
- for ( String root : sourceRoots )
- {
- File f = new File( root, sourceFile );
- getLog().info( "Looking for: " + f );
- if ( f.exists() )
- {
- try
- {
- String[] nameParts = sourceClass.split( "\\." );
- String content = FileUtils.fileRead( f );
- if ( !nameParts[nameParts.length-1].equals( content ) )
- {
- throw new MojoFailureException( "Non-matching content in: " + f + "\n expected: '"
- + sourceClass + "'\n found: '" + content + "'" );
- }
-
- found = true;
- break;
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Cannot read contents of: " + f, e );
- }
- }
- }
-
- if ( !found )
- {
- throw new MojoFailureException( "Cannot find generated source file: " + sourceFile + " in:\n "
- + StringUtils.join( sourceRoots.iterator(), "\n " ) );
- }
- }
-
-}
diff --git a/src/it/MCOMPILER-203-processorpath/pom.xml b/src/it/MCOMPILER-203-processorpath/pom.xml
index 350f0327..3f312d89 100644
--- a/src/it/MCOMPILER-203-processorpath/pom.xml
+++ b/src/it/MCOMPILER-203-processorpath/pom.xml
@@ -31,7 +31,6 @@ under the License.
annotation-processor
- annotation-verifyannotation-user
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/pom.xml b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/pom.xml
new file mode 100644
index 00000000..6f87e713
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/pom.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler503-annotation-processor-dep
+
+
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
new file mode 100644
index 00000000..3df98c47
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
@@ -0,0 +1,23 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class AnnotationProcessorDependencyV1
+{
+}
\ No newline at end of file
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/pom.xml b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/pom.xml
new file mode 100644
index 00000000..d363bd2d
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler503-annotation-processor-dep
+ 2.0.0-SNAPSHOT
+
+
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
new file mode 100644
index 00000000..43f09f39
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
@@ -0,0 +1,23 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public class AnnotationProcessorDependencyV2
+{
+}
\ No newline at end of file
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/pom.xml b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/pom.xml
new file mode 100644
index 00000000..ed0e4906
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler503-annotation-processor
+
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-annotation-processor-dep
+ 1.0.0-SNAPSHOT
+
+
+
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
new file mode 100644
index 00000000..05f205c0
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
@@ -0,0 +1,121 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.tools.FileObject;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardLocation;
+
+@SupportedSourceVersion( SourceVersion.RELEASE_6 )
+@SupportedAnnotationTypes( "mcompiler503.SimpleAnnotation" )
+public class SimpleAnnotationProcessor
+ extends AbstractProcessor
+{
+
+ @Override
+ public boolean process( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
+ {
+ if ( annotations.isEmpty() )
+ {
+ return true;
+ }
+
+ // assert that mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is on the classpath
+ try
+ {
+ getClass().getClassLoader().loadClass( "mcompiler503.AnnotationProcessorDependencyV2" );
+ }
+ catch ( ClassNotFoundException expected )
+ {
+ throw new RuntimeException( "Expected mcompiler503.AnnotationProcessorDependencyV2 to be on the"
+ + "processorpath, because mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is specifically"
+ + "configured as one the elements of the processorpath." );
+ }
+
+ // assert that mcompiler503-annotation-processor-dep:1.0.0-SNAPSHOT is NOT on the classpath,
+ // since it should be replaced by mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT
+ // when resolving annotation processors and their dependencies
+ try
+ {
+ getClass().getClassLoader().loadClass( "mcompiler503.AnnotationProcessorDependencyV1" );
+ throw new RuntimeException( "Expected a ClassNotFoundException, because "
+ + "mcompiler503.AnnotationProcessorDependencyV1 is not supposed to be on the processorpath." );
+ }
+ catch ( ClassNotFoundException expected )
+ {
+ // expected.
+ }
+
+ Filer filer = processingEnv.getFiler();
+
+ Elements elementUtils = processingEnv.getElementUtils();
+
+ Set extends Element> elements = roundEnv.getElementsAnnotatedWith( annotations.iterator().next() );
+
+ for ( Element element : elements )
+ {
+ Name name = element.getSimpleName();
+
+ PackageElement packageElement = elementUtils.getPackageOf( element );
+
+ try
+ {
+ Name packageName = packageElement.getQualifiedName();
+ FileObject resource =
+ filer.createResource( StandardLocation.SOURCE_OUTPUT, packageName, name + ".txt", element );
+
+ Writer writer = resource.openWriter();
+ writer.write( name.toString() );
+ writer.close();
+
+ String className = name + "Companion";
+ JavaFileObject javaFile = filer.createSourceFile( packageName + "." + className, element );
+
+ Writer javaWriter = javaFile.openWriter();
+ javaWriter.append( "package " ).append( packageName ).append( ";\n\n" );
+ javaWriter.append( "public class " ).append( className ).append( " {\n" );
+ javaWriter.append( " public " ).append( className ).append( "() {\n" );
+ javaWriter.append( " System.out.println(\"Hey there!\");\n" );
+ javaWriter.append( " }\n}\n" );
+ javaWriter.close();
+ }
+ catch ( IOException e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+
+ return !elements.isEmpty();
+ }
+}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/pom.xml b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/pom.xml
new file mode 100644
index 00000000..111eca20
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/pom.xml
@@ -0,0 +1,78 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler503-annotation-user
+
+
+
+
+ maven-compiler-plugin
+
+
+ mcompiler503.SimpleAnnotationProcessor
+
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-annotation-processor
+ 1.0.0-SNAPSHOT
+
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-annotation-processor-dep
+ 2.0.0-SNAPSHOT
+
+
+
+
+
+ org.apache.maven.plugins.compiler.it
+ annotation-verify-plugin
+ 1.0.0-SNAPSHOT
+
+
+ verify-annotations
+ process-test-classes
+
+ read-source
+
+
+ mcompiler503.SimpleObject
+ mcompiler503.SimpleTestObject
+
+
+
+
+
+
+
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
new file mode 100644
index 00000000..72649385
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
@@ -0,0 +1,30 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface SimpleAnnotation
+{
+}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
new file mode 100644
index 00000000..faa913f6
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
@@ -0,0 +1,24 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@SimpleAnnotation
+public class SimpleObject
+{
+}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
new file mode 100644
index 00000000..5c47d303
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
@@ -0,0 +1,24 @@
+package mcompiler503;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@SimpleAnnotation
+public class SimpleTestObject
+{
+}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/invoker.properties b/src/it/MCOMPILER-503-processorpath-duplicated-deps/invoker.properties
new file mode 100644
index 00000000..a0a3964f
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals=process-test-classes
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/pom.xml b/src/it/MCOMPILER-503-processorpath-duplicated-deps/pom.xml
new file mode 100644
index 00000000..85fd2baf
--- /dev/null
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/pom.xml
@@ -0,0 +1,49 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler503-test
+ 1.0.0-SNAPSHOT
+ pom
+
+
+ annotation-processor-dep-v1
+ annotation-processor-dep-v2
+ annotation-processor
+ annotation-user
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @project.version@
+
+
+
+
+
diff --git a/src/it/setup_annotation-verify-plugin/invoker.properties b/src/it/setup_annotation-verify-plugin/invoker.properties
new file mode 100644
index 00000000..d5d6ca5d
--- /dev/null
+++ b/src/it/setup_annotation-verify-plugin/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = install
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml b/src/it/setup_annotation-verify-plugin/pom.xml
similarity index 53%
rename from src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml
rename to src/it/setup_annotation-verify-plugin/pom.xml
index 691526db..f6ae99b3 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-verify/pom.xml
+++ b/src/it/setup_annotation-verify-plugin/pom.xml
@@ -1,123 +1,95 @@
-
-
-
-
-
- 4.0.0
-
-
- org.issue
- compiler-test
- 1.0-SNAPSHOT
-
-
- annotation-verify
- maven-plugin
-
-
-
- org.apache.maven.plugin-tools
- maven-plugin-annotations
- 3.3
- provided
-
-
- org.apache.maven
- maven-plugin-api
- @mavenVersion@
-
-
- org.apache.maven
- maven-artifact
- @mavenVersion@
-
-
- org.apache.maven
- maven-core
- @mavenVersion@
-
-
- org.apache.maven.reporting
- maven-reporting-api
-
-
- org.apache.maven.wagon
- wagon-file
-
-
- org.apache.maven.wagon
- wagon-http-lightweight
-
-
- org.apache.maven.wagon
- wagon-ssh
-
-
- org.apache.maven.wagon
- wagon-ssh-external
-
-
- commons-cli
- commons-cli
-
-
- classworlds
- classworlds
-
-
- org.codehaus.plexus
- plexus-container-default
-
-
- org.codehaus.plexus
- plexus-interactivity-api
-
-
-
-
- org.apache.maven.shared
- maven-shared-utils
- 3.3.3
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-plugin-plugin
- @mavenPluginPluginVersion@
-
- true
-
-
-
- mojo-descriptor
- process-classes
-
- descriptor
-
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins.compiler.it
+ annotation-verify-plugin
+ 1.0.0-SNAPSHOT
+ maven-plugin
+
+
+
+ org.apache.maven.plugin-tools
+ maven-plugin-annotations
+ 3.3
+ provided
+
+
+ org.apache.maven
+ maven-plugin-api
+ @mavenVersion@
+ provided
+
+
+ org.apache.maven
+ maven-artifact
+ @mavenVersion@
+ provided
+
+
+ org.apache.maven
+ maven-core
+ @mavenVersion@
+ provided
+
+
+ org.apache.maven.reporting
+ maven-reporting-api
+
+
+ org.apache.maven.wagon
+ wagon-file
+
+
+ org.apache.maven.wagon
+ wagon-http-lightweight
+
+
+ org.apache.maven.wagon
+ wagon-ssh
+
+
+ org.apache.maven.wagon
+ wagon-ssh-external
+
+
+ commons-cli
+ commons-cli
+
+
+ classworlds
+ classworlds
+
+
+ org.codehaus.plexus
+ plexus-container-default
+
+
+ org.codehaus.plexus
+ plexus-interactivity-api
+
+
+
+
+
diff --git a/src/it/MCOMPILER-157/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java b/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
similarity index 92%
rename from src/it/MCOMPILER-157/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java
rename to src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
index aafec6f6..668809a8 100644
--- a/src/it/MCOMPILER-157/annotation-verify/src/main/java/org/issue/SourcePathReadGoal.java
+++ b/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
@@ -1,5 +1,4 @@
-package org.issue;
-
+package org.apache.maven.plugins.compiler.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -21,7 +20,9 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
import java.util.List;
+import java.util.StringJoiner;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
@@ -30,8 +31,6 @@
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
-import org.apache.maven.shared.utils.StringUtils;
-import org.apache.maven.shared.utils.io.FileUtils;
@Mojo( name = "read-source", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES )
public class SourcePathReadGoal
@@ -80,13 +79,12 @@ private void assertGeneratedSourceFileFor( String sourceClass, List sour
try
{
String[] nameParts = sourceClass.split( "\\." );
- String content = FileUtils.fileRead( f );
+ String content = new String( Files.readAllBytes( f.toPath() ) );
if ( !nameParts[nameParts.length-1].equals( content ) )
{
throw new MojoFailureException( "Non-matching content in: " + f + "\n expected: '"
+ sourceClass + "'\n found: '" + content + "'" );
}
-
found = true;
break;
}
@@ -100,8 +98,7 @@ private void assertGeneratedSourceFileFor( String sourceClass, List sour
if ( !found )
{
throw new MojoFailureException( "Cannot find generated source file: " + sourceFile + " in:\n "
- + StringUtils.join( sourceRoots.iterator(), "\n " ) );
+ + String.join( "\n ", sourceRoots ) );
}
}
-
}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 19265a79..03cd6af1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1802,32 +1802,20 @@ private List resolveProcessorPathEntries()
return null;
}
+ Set elements = new LinkedHashSet<>();
try
{
- Set elements = new LinkedHashSet<>();
- for ( DependencyCoordinate coord : annotationProcessorPaths )
+ List dependencies = convertToDependencies( annotationProcessorPaths );
+ CollectRequest collectRequest = new CollectRequest( dependencies, Collections.emptyList(),
+ project.getRemoteProjectRepositories() );
+ DependencyRequest dependencyRequest = new DependencyRequest();
+ dependencyRequest.setCollectRequest( collectRequest );
+ DependencyResult dependencyResult = repositorySystem.resolveDependencies(
+ session.getRepositorySession(), dependencyRequest );
+
+ for ( ArtifactResult resolved : dependencyResult.getArtifactResults() )
{
- ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( coord.getType() );
-
- Artifact artifact = new DefaultArtifact(
- coord.getGroupId(),
- coord.getArtifactId(),
- coord.getClassifier(),
- handler.getExtension(),
- coord.getVersion()
- );
-
- CollectRequest collectRequest = new CollectRequest( new Dependency( artifact, JavaScopes.RUNTIME ),
- project.getRemoteProjectRepositories() );
- DependencyRequest dependencyRequest = new DependencyRequest();
- dependencyRequest.setCollectRequest( collectRequest );
- DependencyResult dependencyResult = repositorySystem.resolveDependencies(
- session.getRepositorySession(), dependencyRequest );
-
- for ( ArtifactResult resolved : dependencyResult.getArtifactResults() )
- {
- elements.add( resolved.getArtifact().getFile().getAbsolutePath() );
- }
+ elements.add( resolved.getArtifact().getFile().getAbsolutePath() );
}
return new ArrayList<>( elements );
}
@@ -1838,6 +1826,23 @@ private List resolveProcessorPathEntries()
}
}
+ private List convertToDependencies( List annotationProcessorPaths )
+ {
+ List dependencies = new ArrayList<>();
+ for ( DependencyCoordinate annotationProcessorPath : annotationProcessorPaths )
+ {
+ ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( annotationProcessorPath.getType() );
+ Artifact artifact = new DefaultArtifact(
+ annotationProcessorPath.getGroupId(),
+ annotationProcessorPath.getArtifactId(),
+ annotationProcessorPath.getClassifier(),
+ handler.getExtension(),
+ annotationProcessorPath.getVersion() );
+ dependencies.add( new Dependency( artifact, JavaScopes.RUNTIME ) );
+ }
+ return dependencies;
+ }
+
private void writePlugin( MessageBuilder mb )
{
mb.a( " " ).newline();
From f9b6bd0fe3cec756f4f0864176bf522003dcdd78 Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Fri, 10 Feb 2023 16:56:38 +0100
Subject: [PATCH 54/64] [MCOMPILER-523] Test with Maven 3.9.0 and fix the
failing IT (#176)
---
.github/workflows/maven-verify.yml | 2 +-
src/it/MCOMPILER-481-requires-static-included/pom.xml | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 103392ea..71a27fa1 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -30,4 +30,4 @@ jobs:
jdk-distribution-matrix: '[ "temurin", "zulu", "microsoft", "adopt-openj9" ]'
jdk-matrix: '[ "8", "11", "17", "18" ]' # "19-ea"
matrix-exclude: '[{ "jdk": "8", "distribution": "microsoft"},{ "jdk": "19-ea", "distribution": "microsoft"},{ "jdk": "18", "distribution": "microsoft"},{ "jdk": "19-ea", "distribution": "adopt-openj9"},]'
- maven-matrix: '[ "3.3.9", "3.6.3", "3.8.6" ]' # Maven versions matrix for verify builds
+ maven-matrix: '[ "3.3.9", "3.8.7", "3.9.0" ]' # Maven versions matrix for verify builds
diff --git a/src/it/MCOMPILER-481-requires-static-included/pom.xml b/src/it/MCOMPILER-481-requires-static-included/pom.xml
index a395992a..5bcd1bcb 100644
--- a/src/it/MCOMPILER-481-requires-static-included/pom.xml
+++ b/src/it/MCOMPILER-481-requires-static-included/pom.xml
@@ -48,6 +48,12 @@ under the License.
11
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.2
+
From 3dca82f4bf91e747c81ff3fe43e670f7cd7c08e1 Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Fri, 10 Feb 2023 10:11:40 +0100
Subject: [PATCH 55/64] [MCOMPILER-526] Add packages to please the formatter
---
.../src/main/java/MyClass.java | 1 +
.../verify.groovy | 4 +--
.../dependent-module/src/main/java/Main.java | 1 +
.../service/src/main/java/TestService.java | 1 +
.../dependent-module/src/main/java/Main.java | 1 +
.../service/src/main/java/TestService.java | 1 +
.../src/main/java/MyClass.java | 1 +
.../src/test/java/MyTest.java | 1 +
src/it/default-fork-windows/verify.groovy | 4 +--
.../default-fork/src/main/java/MyClass.java | 1 +
src/it/default-fork/src/test/java/MyTest.java | 1 +
src/it/default-fork/verify.groovy | 4 +--
.../src/main/java/{ => foo}/MyClass.java | 1 +
.../src/test/java/{ => foo}/MyTest.java | 1 +
.../default-incremental-disable/verify.groovy | 4 +--
src/it/default/src/main/java/MyClass.java | 1 +
src/it/default/src/test/java/MyTest.java | 1 +
src/it/default/verify.bsh | 4 +--
.../mcompiler-106/src/main/java/MyClass.java | 1 +
.../mcompiler-135/src/main/java/MyClass.java | 1 +
src/it/mcompiler-182/src/main/java/BeanA.java | 1 +
.../mcompiler-182/src/main/java/BeanA2.java | 1 +
src/it/mcompiler-182/verify.groovy | 2 +-
.../src/main/java/BeanA.java | 1 +
.../src/main/java/BeanA2.java | 1 +
.../src/main/java/BeanA.java | 1 +
.../src/main/java/BeanA2.java | 1 +
.../src/main/java/MyClass.java | 1 +
.../src/test/java/MyTest.java | 1 +
src/it/non-english-warnings/verify.bsh | 4 +--
src/it/test1/src/main/java/MyClass.java | 1 +
.../plugin/compiler/CompilerMojoTestCase.java | 28 +++++++++----------
.../src/main/java/TestCompile0.java | 1 +
.../src/test/java/TestCompile0Test.java | 1 +
.../src/main/java/TestCompile0.java | 1 +
.../src/main/java/TestCompile0.java | 1 +
.../src/test/java/TestCompile0Test.java | 1 +
.../src/main/java/TestCompile0.java | 1 +
.../src/test/java/TestCompile0Test.java | 1 +
.../src/main/java/TestCompile0.java | 1 +
.../src/test/java/TestCompile0Test.java | 1 +
.../src/main/java/TestCompile1.java | 1 +
.../src/test/java/TestCompile1TestCase.java | 1 +
.../src/main/java/TestCompile2.java | 1 +
.../src/main/java/TestCompile3.java | 1 +
.../src/main/java/TestCompile4.java | 1 +
.../src/test/java/TestCompile2TestCase.java | 1 +
.../src/test/java/TestCompile3TestCase.java | 1 +
.../src/test/java/TestCompile4TestCase.java | 1 +
.../src/main/java/TestCompile2.java | 1 +
.../src/main/java/TestCompile3.java | 1 +
.../src/main/java/TestCompile4.java | 1 +
.../src/test/java/TestCompile2TestCase.java | 1 +
.../src/test/java/TestCompile3TestCase.java | 1 +
.../src/test/java/TestCompile4TestCase.java | 1 +
.../src/main/java/TestCompile2.java | 2 +-
.../src/main/java/TestCompile3.java | 1 +
.../src/main/java/TestCompile4.java | 1 +
.../src/test/java/TestCompile2TestCase.java | 1 +
.../src/test/java/TestCompile3TestCase.java | 1 +
.../src/test/java/TestCompile4TestCase.java | 1 +
.../src/main/java/TestSkipMainCompile0.java | 1 +
.../test/java/TestSkipMainCompile0Test.java | 1 +
.../src/main/java/TestSkipTestCompile0.java | 1 +
.../test/java/TestSkipTestCompile0Test.java | 1 +
65 files changed, 84 insertions(+), 28 deletions(-)
rename src/it/default-incremental-disable/src/main/java/{ => foo}/MyClass.java (98%)
rename src/it/default-incremental-disable/src/test/java/{ => foo}/MyTest.java (98%)
diff --git a/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java b/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
+++ b/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/MCOMPILER-328_multiReleaseOutput/verify.groovy b/src/it/MCOMPILER-328_multiReleaseOutput/verify.groovy
index ea03de5e..f3423da7 100644
--- a/src/it/MCOMPILER-328_multiReleaseOutput/verify.groovy
+++ b/src/it/MCOMPILER-328_multiReleaseOutput/verify.groovy
@@ -17,6 +17,6 @@
* under the License.
*/
-assert !new File( basedir, 'target/classes/MyClass.class').exists()
+assert !new File( basedir, 'target/classes/foo/MyClass.class').exists()
-assert new File( basedir, 'target/classes/META-INF/versions/9/MyClass.class').exists()
\ No newline at end of file
+assert new File( basedir, 'target/classes/META-INF/versions/9/foo/MyClass.class').exists()
\ No newline at end of file
diff --git a/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java b/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
index f77ad070..1d0ba1f1 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
+++ b/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class Main
{
diff --git a/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java b/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
index df21d267..2e1d747a 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
+++ b/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestService
{
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java b/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
index dbad7cf7..14039917 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class Main
{
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java b/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
index 7d5e8787..4fb1ade5 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestService
{
diff --git a/src/it/default-fork-windows/src/main/java/MyClass.java b/src/it/default-fork-windows/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/default-fork-windows/src/main/java/MyClass.java
+++ b/src/it/default-fork-windows/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/default-fork-windows/src/test/java/MyTest.java b/src/it/default-fork-windows/src/test/java/MyTest.java
index 46ba41d4..33d41784 100644
--- a/src/it/default-fork-windows/src/test/java/MyTest.java
+++ b/src/it/default-fork-windows/src/test/java/MyTest.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/it/default-fork-windows/verify.groovy b/src/it/default-fork-windows/verify.groovy
index 6b1651d7..2d4a24c5 100644
--- a/src/it/default-fork-windows/verify.groovy
+++ b/src/it/default-fork-windows/verify.groovy
@@ -17,9 +17,9 @@
* under the License.
*/
-assert new File( basedir, 'target/classes/MyClass.class').exists()
+assert new File( basedir, 'target/classes/foo/MyClass.class').exists()
-assert new File( basedir, 'target/test-classes/MyTest.class').exists()
+assert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()
assert !new File( basedir, 'target/classes/javac.sh').exists()
assert !new File( basedir, 'target/classes/javac.bat').exists()
diff --git a/src/it/default-fork/src/main/java/MyClass.java b/src/it/default-fork/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/default-fork/src/main/java/MyClass.java
+++ b/src/it/default-fork/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/default-fork/src/test/java/MyTest.java b/src/it/default-fork/src/test/java/MyTest.java
index 46ba41d4..33d41784 100644
--- a/src/it/default-fork/src/test/java/MyTest.java
+++ b/src/it/default-fork/src/test/java/MyTest.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/it/default-fork/verify.groovy b/src/it/default-fork/verify.groovy
index ba3bd7a2..6fb1fa1e 100644
--- a/src/it/default-fork/verify.groovy
+++ b/src/it/default-fork/verify.groovy
@@ -17,9 +17,9 @@
* under the License.
*/
-assert new File( basedir, 'target/classes/MyClass.class').exists()
+assert new File( basedir, 'target/classes/foo/MyClass.class').exists()
-assert new File( basedir, 'target/test-classes/MyTest.class').exists()
+assert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()
assert !new File( basedir, 'target/classes/javac.sh').exists()
assert !new File( basedir, 'target/classes/javac.bat').exists()
diff --git a/src/it/default-incremental-disable/src/main/java/MyClass.java b/src/it/default-incremental-disable/src/main/java/foo/MyClass.java
similarity index 98%
rename from src/it/default-incremental-disable/src/main/java/MyClass.java
rename to src/it/default-incremental-disable/src/main/java/foo/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/default-incremental-disable/src/main/java/MyClass.java
+++ b/src/it/default-incremental-disable/src/main/java/foo/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/default-incremental-disable/src/test/java/MyTest.java b/src/it/default-incremental-disable/src/test/java/foo/MyTest.java
similarity index 98%
rename from src/it/default-incremental-disable/src/test/java/MyTest.java
rename to src/it/default-incremental-disable/src/test/java/foo/MyTest.java
index 46ba41d4..33d41784 100644
--- a/src/it/default-incremental-disable/src/test/java/MyTest.java
+++ b/src/it/default-incremental-disable/src/test/java/foo/MyTest.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/it/default-incremental-disable/verify.groovy b/src/it/default-incremental-disable/verify.groovy
index 2f72f1c9..2f9fe2c6 100644
--- a/src/it/default-incremental-disable/verify.groovy
+++ b/src/it/default-incremental-disable/verify.groovy
@@ -17,8 +17,8 @@
* under the License.
*/
-assert new File( basedir, "target/classes/MyClass.class" ).exists();
-assert new File( basedir, "target/test-classes/MyTest.class" ).exists();
+assert new File( basedir, "target/classes/foo/MyClass.class" ).exists();
+assert new File( basedir, "target/test-classes/foo/MyTest.class" ).exists();
content = new File( basedir, 'build.log' ).text;
diff --git a/src/it/default/src/main/java/MyClass.java b/src/it/default/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/default/src/main/java/MyClass.java
+++ b/src/it/default/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/default/src/test/java/MyTest.java b/src/it/default/src/test/java/MyTest.java
index 46ba41d4..33d41784 100644
--- a/src/it/default/src/test/java/MyTest.java
+++ b/src/it/default/src/test/java/MyTest.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/it/default/verify.bsh b/src/it/default/verify.bsh
index 12bb5436..402fb942 100644
--- a/src/it/default/verify.bsh
+++ b/src/it/default/verify.bsh
@@ -23,14 +23,14 @@ import java.util.regex.*;
try
{
- File mainClass = new File( basedir, "target/classes/MyClass.class" );
+ File mainClass = new File( basedir, "target/classes/foo/MyClass.class" );
if ( !mainClass.isFile() )
{
System.out.println( "Main class not existent: " + mainClass );
return false;
}
- File testClass = new File( basedir, "target/test-classes/MyTest.class" );
+ File testClass = new File( basedir, "target/test-classes/foo/MyTest.class" );
if ( !testClass.isFile() )
{
System.out.println( "Test class not existent: " + testClass );
diff --git a/src/it/mcompiler-106/src/main/java/MyClass.java b/src/it/mcompiler-106/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/mcompiler-106/src/main/java/MyClass.java
+++ b/src/it/mcompiler-106/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/mcompiler-135/src/main/java/MyClass.java b/src/it/mcompiler-135/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/mcompiler-135/src/main/java/MyClass.java
+++ b/src/it/mcompiler-135/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/mcompiler-182/src/main/java/BeanA.java b/src/it/mcompiler-182/src/main/java/BeanA.java
index 4d314950..aa6a35ee 100644
--- a/src/it/mcompiler-182/src/main/java/BeanA.java
+++ b/src/it/mcompiler-182/src/main/java/BeanA.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/mcompiler-182/src/main/java/BeanA2.java b/src/it/mcompiler-182/src/main/java/BeanA2.java
index e5725626..42731363 100644
--- a/src/it/mcompiler-182/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-182/src/main/java/BeanA2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/mcompiler-182/verify.groovy b/src/it/mcompiler-182/verify.groovy
index 316aeafb..fdff21e0 100644
--- a/src/it/mcompiler-182/verify.groovy
+++ b/src/it/mcompiler-182/verify.groovy
@@ -23,4 +23,4 @@ content = logFile.text
assert content.contains( 'COMPILATION ERROR :' )
-assert !new File( basedir, 'target/classes/BeanA.class' ).exists();
+assert !new File( basedir, 'target/classes/foo/BeanA.class' ).exists();
diff --git a/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java b/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
index 4d314950..aa6a35ee 100644
--- a/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
+++ b/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java b/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
index e5725626..42731363 100644
--- a/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
index 4d314950..aa6a35ee 100644
--- a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
+++ b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
index e5725626..42731363 100644
--- a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
/**
* dumb test bean
diff --git a/src/it/non-english-warnings/src/main/java/MyClass.java b/src/it/non-english-warnings/src/main/java/MyClass.java
index 22efe455..62c02eea 100644
--- a/src/it/non-english-warnings/src/main/java/MyClass.java
+++ b/src/it/non-english-warnings/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/it/non-english-warnings/src/test/java/MyTest.java b/src/it/non-english-warnings/src/test/java/MyTest.java
index 1de5f624..a51de2bb 100644
--- a/src/it/non-english-warnings/src/test/java/MyTest.java
+++ b/src/it/non-english-warnings/src/test/java/MyTest.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyTest
{
diff --git a/src/it/non-english-warnings/verify.bsh b/src/it/non-english-warnings/verify.bsh
index 8b1bc6eb..919db9da 100644
--- a/src/it/non-english-warnings/verify.bsh
+++ b/src/it/non-english-warnings/verify.bsh
@@ -21,13 +21,13 @@ import java.io.*;
import java.util.*;
import java.util.regex.*;
-File mainClass = new File( basedir, "target/classes/MyClass.class" );
+File mainClass = new File( basedir, "target/classes/foo/MyClass.class" );
if ( !mainClass.isFile() )
{
throw new FileNotFoundException( "Main class not existent: " + mainClass );
}
-File testClass = new File( basedir, "target/test-classes/MyTest.class" );
+File testClass = new File( basedir, "target/test-classes/foo/MyTest.class" );
if ( !testClass.isFile() )
{
throw new FileNotFoundException( "Test class not existent: " + testClass );
diff --git a/src/it/test1/src/main/java/MyClass.java b/src/it/test1/src/main/java/MyClass.java
index 4945381a..90a93702 100644
--- a/src/it/test1/src/main/java/MyClass.java
+++ b/src/it/test1/src/main/java/MyClass.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class MyClass
{
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index 6c12627d..ae3e6708 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -67,7 +67,7 @@ public void testCompilerBasic()
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile0.class" );
+ File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile0.class" );
assertTrue( testClass.exists() );
@@ -80,7 +80,7 @@ public void testCompilerBasic()
assertNotNull( "MCOMPILER-94: artifact file should only be null if there is nothing to compile",
projectArtifact.getFile() );
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile0Test.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile0Test.class" );
verify( log ).warn( startsWith( "No explicit value set for target or release!" ) );
@@ -150,13 +150,13 @@ public void testCompilerIncludesExcludes()
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile2.class" );
+ File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile2.class" );
assertFalse( testClass.exists() );
- testClass = new File( compileMojo.getOutputDirectory(), "TestCompile3.class" );
+ testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile3.class" );
assertFalse( testClass.exists() );
- testClass = new File( compileMojo.getOutputDirectory(), "TestCompile4.class" );
+ testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile4.class" );
assertTrue( testClass.exists() );
TestCompilerMojo testCompileMojo = getTestCompilerMojo( compileMojo,
@@ -167,13 +167,13 @@ public void testCompilerIncludesExcludes()
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile2TestCase.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile2TestCase.class" );
assertFalse( testClass.exists() );
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile3TestCase.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile3TestCase.class" );
assertFalse( testClass.exists() );
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile4TestCase.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile4TestCase.class" );
assertTrue( testClass.exists() );
}
@@ -192,7 +192,7 @@ public void testCompilerFork()
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile1.class" );
+ File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile1.class" );
assertTrue( testClass.exists() );
TestCompilerMojo testCompileMojo =
@@ -203,7 +203,7 @@ public void testCompilerFork()
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile1TestCase.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile1TestCase.class" );
assertTrue( testClass.exists() );
}
@@ -345,13 +345,13 @@ public void testCompileSkipMain()
CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
setVariableValueToObject( compileMojo, "skipMain", true );
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "TestSkipMainCompile0.class" );
+ File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0.class" );
assertFalse( testClass.exists() );
TestCompilerMojo testCompileMojo =
getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestSkipMainCompile0Test.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0Test.class" );
assertTrue( testClass.exists() );
}
@@ -365,14 +365,14 @@ public void testCompileSkipTest()
{
CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "TestSkipTestCompile0.class" );
+ File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0.class" );
assertTrue( testClass.exists() );
TestCompilerMojo testCompileMojo =
getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
setVariableValueToObject( testCompileMojo, "skip", true );
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "TestSkipTestCompile0Test.class" );
+ testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0Test.class" );
assertFalse( testClass.exists() );
}
diff --git a/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
index 44c03597..959bdc77 100644
--- a/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile0
{
diff --git a/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
index 5df6d4f5..e4a02f7d 100644
--- a/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
index 44c03597..959bdc77 100644
--- a/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile0
{
diff --git a/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
index 44c03597..959bdc77 100644
--- a/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile0
{
diff --git a/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
index 5df6d4f5..e4a02f7d 100644
--- a/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
index 44c03597..959bdc77 100644
--- a/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile0
{
diff --git a/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
index 5df6d4f5..e4a02f7d 100644
--- a/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
index 44c03597..959bdc77 100644
--- a/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile0
{
diff --git a/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
index 5df6d4f5..e4a02f7d 100644
--- a/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java b/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
index 4e4ded81..c694c3fc 100644
--- a/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
+++ b/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile1
{
diff --git a/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java b/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
index ede2355c..cf276f99 100644
--- a/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
+++ b/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
index 18053c37..ff8fa234 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile2
{
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
index 5091952c..e618ca9a 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile3
{
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
index d0660046..779c8d0a 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile4
{
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
index 14392e33..b0520395 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
index fc81992f..9f77f435 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
index e42e21b4..2210fc13 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
index 18053c37..ff8fa234 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile2
{
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
index 5091952c..e618ca9a 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile3
{
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
index d0660046..779c8d0a 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile4
{
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
index 14392e33..b0520395 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
index fc81992f..9f77f435 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
index e42e21b4..2210fc13 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
index 18053c37..e187e0c4 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile2
{
@@ -25,5 +26,4 @@ public TestCompile2()
System.out.println( "Woo Hoo!" );
}
-
}
\ No newline at end of file
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
index 5091952c..e618ca9a 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile3
{
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
index d0660046..779c8d0a 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestCompile4
{
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
index 14392e33..b0520395 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
index fc81992f..9f77f435 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
index e42e21b4..2210fc13 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java b/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
index f1788b4b..a7805d70 100644
--- a/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
+++ b/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestSkipMainCompile0
{
diff --git a/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java b/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
index 30589982..d3d66b49 100644
--- a/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
+++ b/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
diff --git a/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java b/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
index 95bcc5ac..08911a95 100644
--- a/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
+++ b/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
public class TestSkipTestCompile0
{
diff --git a/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java b/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
index aa5e09d6..0c64e554 100644
--- a/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
+++ b/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import junit.framework.TestCase;
From cc78aee657a684af721b3efafd0e1525272d4201 Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Fri, 10 Feb 2023 08:55:20 +0100
Subject: [PATCH 56/64] [MCOMPILER-526] Upgrade to parent 39
---
pom.xml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 992a2d91..a20f8b9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven.pluginsmaven-plugins
- 37
+ 39
@@ -215,6 +215,17 @@ under the License.
org.eclipse.sisusisu-maven-plugin
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+
+
+
+ src/**/*.java
+
+
+
+
From f7a4613eaa2364dcaf10f96f04a6b1afb2feb7ed Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Fri, 10 Feb 2023 10:13:04 +0100
Subject: [PATCH 57/64] [MCOMPILER-526] Reformat
# Conflicts:
# src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
---
pom.xml | 50 +-
.../MCOMPILER-129/src/main/java/MyClass.java | 44 +-
.../main/java/org/issue/SimpleAnnotation.java | 7 +-
.../org/issue/SimpleAnnotationProcessor.java | 46 +-
.../src/main/java/org/issue/SimpleObject.java | 8 +-
.../test/java/org/issue/SimpleTestObject.java | 8 +-
.../apache/maven/plugins/compiler/it/App.java | 36 +-
.../maven/plugins/compiler/it/App2.java | 36 +-
.../maven/plugins/compiler/it/App3.java | 36 +-
.../maven/plugins/compiler/it/App4.java | 36 +-
.../maven/plugins/compiler/it/App5.java | 36 +-
.../maven/plugins/compiler/it/App6.java | 36 +-
.../maven/plugins/compiler/it/App7.java | 36 +-
.../maven/plugins/compiler/it/AppTest.java | 27 +-
.../apache/maven/plugins/compiler/it/App.java | 36 +-
.../maven/plugins/compiler/it/App2.java | 36 +-
.../maven/plugins/compiler/it/App3.java | 36 +-
.../maven/plugins/compiler/it/App4.java | 36 +-
.../maven/plugins/compiler/it/App5.java | 36 +-
.../maven/plugins/compiler/it/App6.java | 36 +-
.../maven/plugins/compiler/it/App7.java | 36 +-
.../maven/plugins/compiler/it/AppTest.java | 27 +-
.../apache/maven/plugins/compiler/it/App.java | 36 +-
.../maven/plugins/compiler/it/App2.java | 36 +-
.../maven/plugins/compiler/it/App3.java | 36 +-
.../maven/plugins/compiler/it/App4.java | 36 +-
.../maven/plugins/compiler/it/App5.java | 36 +-
.../maven/plugins/compiler/it/App6.java | 36 +-
.../maven/plugins/compiler/it/App7.java | 36 +-
.../maven/plugins/compiler/it/AppTest.java | 27 +-
.../apache/maven/plugins/compiler/it/App.java | 36 +-
.../maven/plugins/compiler/it/App2.java | 36 +-
.../maven/plugins/compiler/it/App3.java | 36 +-
.../maven/plugins/compiler/it/App4.java | 36 +-
.../maven/plugins/compiler/it/App5.java | 36 +-
.../maven/plugins/compiler/it/App6.java | 36 +-
.../maven/plugins/compiler/it/App7.java | 36 +-
.../maven/plugins/compiler/it/AppTest.java | 27 +-
.../java/org/example/pce/sample/Dummy.java | 14 +-
.../src/main/java/dummy/HelloWorld.java | 53 +-
src/it/MCOMPILER-192/verify.groovy | 1 -
.../src/main/java/org/issue/Person.java | 4 +-
.../org/issue/SimpleAnnotationProcessor.java | 226 ++-
.../main/java/org/issue/SimpleAnnotation.java | 59 +-
.../src/main/java/org/issue/SimpleObject.java | 48 +-
.../test/java/org/issue/SimpleTestObject.java | 48 +-
.../src/main/java/dummy/HelloWorld.java | 53 +-
.../src/main/java/dummy/package-info.java | 2 +-
src/it/MCOMPILER-205/verify.groovy | 1 -
.../src/main/java/org/issue/MCompiler224.java | 13 +-
.../MCompiler224AnnotationProcessor.java | 39 +-
.../src/main/java/org/issue/user/User.java | 13 +-
.../src/main/java/example/FinalExample.java | 89 +-
.../src/main/java/com/foo/MyClass.java | 46 +-
.../src/main/java/com/foo/MyClass.java | 46 +-
.../src/main/java/module-info.java | 44 +-
.../src/test/java/com/foo/MyTest.java | 53 +-
.../src/main/java/MyClass.java | 44 +-
.../src/test/java/MyTest.java | 49 +-
.../src/main/java/processor1/Processor1.java | 17 +-
.../src/main/java/processor2/dep/Foo.java | 9 +-
.../src/main/java/processor2/Processor2.java | 17 +-
.../src/main/java/project/Project.java | 14 +-
.../src/main/java/com/foo/MyClass.java | 46 +-
.../src/main/java/module-info.java | 43 +-
.../src/test/java/com/foo/MyTest.java | 53 +-
.../src/main/java/com/foo/MyClass.java | 12 +-
.../src/test/java/com/foo/MyTest.java | 11 +-
.../app/src/main/java/module-info.java | 44 +-
.../main/java/org/maven/test/app/Main.java | 63 +-
.../lib/src/main/java/module-info.java | 44 +-
.../main/java/org/maven/test/lib/Sout.java | 64 +-
.../src/main/java/com/foo/ParameterClass.java | 10 +-
.../src/test/java/com/foo/ParameterTest.java | 20 +-
.../src/main/java/module-info.java | 8 +-
.../src/test/java/test/MyTest.java | 11 +-
.../src/main/java/MyClass.java | 9 +-
.../a/src/main/java/module-info.java | 4 +-
.../b/src/main/java/module-info.java | 3 +-
.../b/src/main/java/test/Foo.java | 6 +-
.../b/src/main/java/test/package-info.java | 5 +-
.../server/PooledJenkinsController.java | 41 +-
.../dependent-module/src/main/java/Main.java | 8 +-
.../service/src/main/java/TestService.java | 10 +-
.../verify.groovy | 1 -
.../main360/src/main/java/module-info.java | 7 +-
.../src/main/java/module-info.java | 10 +-
.../src/main/java/org/maven/test/Main.java | 13 +-
.../src/main/java/org/maven/bug/A.java | 13 +-
.../src/main/java/org/maven/bug/B.java | 13 +-
.../src/main/java11/org/maven/bug/B.java | 13 +-
.../src/main/java9/org/maven/bug/A9.java | 13 +-
.../src/main/java9/org/maven/bug/B.java | 13 +-
.../src/main/java/com/natros/mcp/Foo.java | 7 +-
.../dependent-module/src/main/java/Main.java | 6 +-
.../service/src/main/java/TestService.java | 8 +-
.../verify.groovy | 1 -
.../app/src/main/java/org/test/app/Main.java | 7 +-
.../src/test/java/org/test/app/MainTest.java | 9 +-
.../java/org/test/service/JSONService.java | 6 +-
.../main/java/org/test/service/Service.java | 7 +-
.../src/main/java/dummy/HelloWorld.java | 13 +-
.../src/main/java/dummy/package-info.java | 2 +-
src/it/MCOMPILER-485/verify.groovy | 1 -
.../src/main/java/dummy/package-info.java | 2 +-
src/it/MCOMPILER-495/verify.groovy | 1 -
.../src/main/java/dummy/Person.java | 4 +-
.../src/main/java/dummy/foo/Person.java | 4 +-
.../src/main/java/dummy/package-info.java | 2 +-
.../verify.groovy | 1 -
.../AnnotationProcessorDependencyV1.java | 6 +-
.../AnnotationProcessorDependencyV2.java | 6 +-
.../SimpleAnnotationProcessor.java | 83 +-
.../java/mcompiler503/SimpleAnnotation.java | 6 +-
.../main/java/mcompiler503/SimpleObject.java | 6 +-
.../java/mcompiler503/SimpleTestObject.java | 6 +-
.../src/main/java/dummy/Main.java | 12 +-
.../src/test/java/dummy/Test.java | 11 +-
.../SimpleAnnotation.java | 8 +-
.../SimpleObject.java | 8 +-
.../src/main/java/module-info.java | 43 +-
.../src/main/java/org/maven/test/Main.java | 63 +-
.../src/main/java/module-info.java | 47 +-
.../src/main/java/org/maven/test/Main.java | 63 +-
.../src/main/java/module-info.java | 43 +-
.../src/main/java/org/maven/test/Main.java | 53 +-
.../src/main/java/module-info.java | 47 +-
.../src/main/java/org/maven/test/Main.java | 63 +-
.../src/main/java/MyClass.java | 9 +-
.../src/test/java/MyTest.java | 10 +-
.../default-fork/src/main/java/MyClass.java | 9 +-
src/it/default-fork/src/test/java/MyTest.java | 10 +-
.../src/main/java/foo/MyClass.java | 9 +-
.../src/test/java/foo/MyTest.java | 10 +-
src/it/default/src/main/java/MyClass.java | 9 +-
src/it/default/src/test/java/MyTest.java | 10 +-
.../verify.groovy | 1 -
.../java/org/apache/maven/it0055/Person.java | 21 +-
.../org/apache/maven/it0055/PersonTwo.java | 21 +-
.../org/apache/maven/it0055/PersonTest.java | 23 +-
.../apache/maven/it0055/PersonTwoTest.java | 23 +-
.../com/mycompany/jdk16annotation/App.java | 16 +-
.../jdk16annotation/ServiceProvider.java | 12 +-
.../ServiceProviderProcessor.java | 40 +-
.../mycompany/jdk16annotation/AppTest.java | 29 +-
.../bar/src/main/java/module-info.java | 44 +-
.../foo/src/main/java/foo/Foo.java | 43 +-
.../foo/src/main/java/module-info.java | 45 +-
.../src/main/java/module-info.java | 41 +-
.../src/main/java/org/maven/test/Main.java | 69 +-
.../src/test/java/bar/BarTests.java | 11 +-
.../src/test/java/module-info.java | 3 +-
.../src/main/java/foo/Foo.java | 9 +-
.../src/main/java/module-info.java | 4 +-
.../src/test/java/bar/BarTests.java | 15 +-
.../src/test/java/module-info.java | 3 +-
.../src/main/java/foo/Foo.java | 9 +-
.../src/main/java/module-info.java | 3 +-
.../src/test/java/foo/FooTests.java | 15 +-
.../src/test/java/module-info.java | 3 +-
.../src/main/java/module-info.java | 41 +-
.../src/main/java/org/maven/test/Main.java | 69 +-
.../test/java/org/maven/test/MainTest.java | 59 +-
.../mcompiler-106/src/main/java/MyClass.java | 9 +-
.../src/main/java/org/maven/test/Main.java | 9 +-
src/it/mcompiler-120/verify.groovy | 1 -
.../mcompiler-135/src/main/java/MyClass.java | 9 +-
.../src/main/java/org/maven/test/MyClass.java | 8 +-
src/it/mcompiler-182/src/main/java/BeanA.java | 6 +-
.../mcompiler-182/src/main/java/BeanA2.java | 4 +-
src/it/mcompiler-182/verify.groovy | 1 -
.../src/main/java/BeanA.java | 6 +-
.../src/main/java/BeanA2.java | 4 +-
.../mcompiler-21_class-remove/verify.groovy | 1 -
.../src/main/java/BeanA.java | 6 +-
.../src/main/java/BeanA2.java | 4 +-
.../verify.groovy | 1 -
.../src/main/java/base/Base.java | 3 +-
.../multirelease-base/src/main/java/mr/A.java | 8 +-
.../multirelease-base/src/main/java/mr/I.java | 8 +-
.../src/test/java/mr/ATest.java | 44 +-
.../multirelease-nine/src/main/java/mr/A.java | 14 +-
.../src/test/java/mr/ATest.java | 46 +-
.../src/main/java/base/Base.java | 3 +-
.../multirelease-base/src/main/java/mr/A.java | 8 +-
.../multirelease-base/src/main/java/mr/I.java | 8 +-
.../src/test/java/mr/ATest.java | 44 +-
.../multirelease-nine/src/main/java/mr/A.java | 14 +-
.../src/test/java/mr/ATest.java | 46 +-
.../src/main/java-mr/9/module-info.java | 7 +-
.../src/main/java-mr/9/mr/A.java | 14 +-
.../src/main/java/base/Base.java | 3 +-
.../packaging-plugin/src/main/java/mr/A.java | 8 +-
.../packaging-plugin/src/main/java/mr/I.java | 8 +-
.../src/test/java/mr/ATest.java | 40 +-
.../src/main/java/base/Base.java | 3 +-
.../src/main/java/mr/A.java | 8 +-
.../src/main/java/mr/I.java | 8 +-
.../src/main/java9/module-info.java | 7 +-
.../src/main/java9/mr/A.java | 14 +-
.../src/test/java/mr/ATest.java | 40 +-
.../src/main/java/base/Base.java | 3 +-
.../src/main/java/mr/A.java | 8 +-
.../src/main/java/mr/I.java | 8 +-
.../src/main/java9/module-info.java | 7 +-
.../src/main/java9/mr/A.java | 14 +-
.../src/test/java/mr/ATest.java | 40 +-
.../src/main/java/MyClass.java | 13 +-
.../src/test/java/MyTest.java | 13 +-
src/it/non-english-warnings/verify.bsh | 1 +
.../SourcePathReadGoal.java | 78 +-
.../src/main/java/com/ta3/MyClass.java | 46 +-
.../src/main/java/com/ta2/MyClass.java | 46 +-
.../src/main/java/module-info.java | 46 +-
.../src/main/java/com/ta2/MyClass.java | 46 +-
.../src/main/java/com/ta2/plus/MyClass.java | 46 +-
.../src/main/java/module-info.java | 46 +-
src/it/test1/src/main/java/MyClass.java | 9 +-
.../plugin/compiler/AbstractCompilerMojo.java | 1459 +++++++----------
.../compiler/CompilationFailureException.java | 38 +-
.../maven/plugin/compiler/CompilerMojo.java | 340 ++--
.../plugin/compiler/DependencyCoordinate.java | 328 ++--
.../plugin/compiler/TestCompilerMojo.java | 344 ++--
.../plugin/compiler/CompilerMojoTestCase.java | 468 +++---
.../compiler/stubs/CompilerManagerStub.java | 20 +-
.../plugin/compiler/stubs/CompilerStub.java | 69 +-
.../compiler/stubs/DebugEnabledLog.java | 13 +-
.../src/main/java/TestCompile0.java | 11 +-
.../src/test/java/TestCompile0Test.java | 9 +-
.../src/main/java/TestCompile0.java | 11 +-
.../src/main/java/TestCompile0.java | 11 +-
.../src/test/java/TestCompile0Test.java | 9 +-
.../src/main/java/TestCompile0.java | 11 +-
.../src/test/java/TestCompile0Test.java | 9 +-
.../src/main/java/TestCompile0.java | 11 +-
.../src/test/java/TestCompile0Test.java | 9 +-
.../src/main/java/TestCompile1.java | 11 +-
.../src/test/java/TestCompile1TestCase.java | 9 +-
.../src/main/java/TestCompile2.java | 11 +-
.../src/main/java/TestCompile3.java | 11 +-
.../src/main/java/TestCompile4.java | 11 +-
.../src/test/java/TestCompile2TestCase.java | 9 +-
.../src/test/java/TestCompile3TestCase.java | 9 +-
.../src/test/java/TestCompile4TestCase.java | 9 +-
.../src/main/java/TestCompile2.java | 11 +-
.../src/main/java/TestCompile3.java | 11 +-
.../src/main/java/TestCompile4.java | 11 +-
.../src/test/java/TestCompile2TestCase.java | 9 +-
.../src/test/java/TestCompile3TestCase.java | 9 +-
.../src/test/java/TestCompile4TestCase.java | 9 +-
.../src/main/java/TestCompile2.java | 10 +-
.../src/main/java/TestCompile3.java | 11 +-
.../src/main/java/TestCompile4.java | 11 +-
.../src/test/java/TestCompile2TestCase.java | 9 +-
.../src/test/java/TestCompile3TestCase.java | 9 +-
.../src/test/java/TestCompile4TestCase.java | 9 +-
.../src/main/java/TestSkipMainCompile0.java | 11 +-
.../test/java/TestSkipMainCompile0Test.java | 11 +-
.../src/main/java/TestSkipTestCompile0.java | 11 +-
.../test/java/TestSkipTestCompile0Test.java | 9 +-
260 files changed, 3660 insertions(+), 4991 deletions(-)
diff --git a/pom.xml b/pom.xml
index a20f8b9f..774e6069 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,4 @@
-
-
+
-
4.0.0
@@ -37,6 +35,12 @@ under the License.
The Compiler Plugin is used to compile the sources of your project.2001
+
+
+ Jan Sievers
+
+
+
${mavenVersion}
@@ -44,8 +48,8 @@ under the License.
scm:git:https://github.com/apache/maven-compiler-plugin.gitscm:git:https://github.com/apache/maven-compiler-plugin.git
- https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}maven-compiler-plugin-3.10.0
+ https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}JIRA
@@ -80,25 +84,6 @@ under the License.
org.apache.maven.plugins.compiler.its
-
-
- Jan Sievers
-
-
-
-
-
- plexus.snapshots
- https://oss.sonatype.org/content/repositories/plexus-snapshots
-
- false
-
-
- true
-
-
-
-
@@ -145,16 +130,16 @@ under the License.
1.1
- maven-coreorg.apache.maven
+ maven-core
- maven-plugin-apiorg.apache.maven
+ maven-plugin-api
- maven-shared-utilsorg.apache.maven.shared
+ maven-shared-utils
@@ -209,6 +194,19 @@ under the License.
+
+
+
+ false
+
+
+ true
+
+ plexus.snapshots
+ https://oss.sonatype.org/content/repositories/plexus-snapshots
+
+
+
diff --git a/src/it/MCOMPILER-129/src/main/java/MyClass.java b/src/it/MCOMPILER-129/src/main/java/MyClass.java
index 80144b07..d4132bb2 100644
--- a/src/it/MCOMPILER-129/src/main/java/MyClass.java
+++ b/src/it/MCOMPILER-129/src/main/java/MyClass.java
@@ -1,23 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package foo;
+
+public class MyClass {}
diff --git a/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.java b/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.java
index ccae1639..5339365e 100644
--- a/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.java
+++ b/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.issue;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -26,6 +25,4 @@
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
-public @interface SimpleAnnotation {
-
-}
+public @interface SimpleAnnotation {}
diff --git a/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java b/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
index 30823a1d..b95f3e22 100644
--- a/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
+++ b/src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,10 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Set;
+package org.issue;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
@@ -37,44 +32,39 @@
import javax.tools.FileObject;
import javax.tools.StandardLocation;
-@SupportedSourceVersion( SourceVersion.RELEASE_6 )
-@SupportedAnnotationTypes( "org.issue.SimpleAnnotation" )
-public class SimpleAnnotationProcessor
- extends AbstractProcessor
-{
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Set;
+
+@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedAnnotationTypes("org.issue.SimpleAnnotation")
+public class SimpleAnnotationProcessor extends AbstractProcessor {
@Override
- public boolean process( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
- {
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
Filer filer = processingEnv.getFiler();
Elements elementUtils = processingEnv.getElementUtils();
- Set extends Element> elements = roundEnv.getElementsAnnotatedWith( SimpleAnnotation.class );
+ Set extends Element> elements = roundEnv.getElementsAnnotatedWith(SimpleAnnotation.class);
- for ( Element element : elements )
- {
+ for (Element element : elements) {
Name name = element.getSimpleName();
- PackageElement packageElement = elementUtils.getPackageOf( element );
+ PackageElement packageElement = elementUtils.getPackageOf(element);
- try
- {
- FileObject resource =
- filer.createResource( StandardLocation.SOURCE_OUTPUT, packageElement.getQualifiedName(), name
- + ".txt", element );
+ try {
+ FileObject resource = filer.createResource(
+ StandardLocation.SOURCE_OUTPUT, packageElement.getQualifiedName(), name + ".txt", element);
Writer writer = resource.openWriter();
- writer.write( name.toString() );
+ writer.write(name.toString());
writer.close();
- }
- catch ( IOException e )
- {
- throw new RuntimeException( e );
+ } catch (IOException e) {
+ throw new RuntimeException(e);
}
}
return !elements.isEmpty();
}
-
}
diff --git a/src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.java b/src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.java
index 56524fb8..18b8fc43 100644
--- a/src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.java
+++ b/src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,9 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.issue;
@SimpleAnnotation
-public class SimpleObject
-{
-
-}
+public class SimpleObject {}
diff --git a/src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.java b/src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.java
index 9024f6a3..706dccf1 100644
--- a/src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.java
+++ b/src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,9 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.issue;
@SimpleAnnotation
-public class SimpleTestObject
-{
-
-}
+public class SimpleTestObject {}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App.java
index bcbf5dd6..3fa54ed1 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,35 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*/
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App2.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
index 6a22d395..9a6511fc 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App2
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App2 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App3.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
index d970eecf..eb55f16f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App3
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App3 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App4.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
index 1cce4d8d..1156f54d 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App4
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App4 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App5.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
index beab680b..dd3c028a 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App5
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App5 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App6.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
index c748ea2c..ca09789f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App6
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App6 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App7.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
index 0b09cdfa..e0f50da0 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App7
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App7 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java b/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
index 464f9af3..af3a4542 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-1/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -27,32 +25,27 @@
/**
* Unit test for simple App.
*/
-public class AppTest
- extends TestCase
-{
+public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
- public AppTest( String testName )
- {
- super( testName );
+ public AppTest(String testName) {
+ super(testName);
}
/**
* @return the suite of tests being tested
*/
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
+ public static Test suite() {
+ return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
- public void testApp()
- {
- assertTrue( true );
+ public void testApp() {
+ assertTrue(true);
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App.java
index bcbf5dd6..3fa54ed1 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,35 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*/
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App2.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
index 6a22d395..9a6511fc 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App2
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App2 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App3.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
index d970eecf..eb55f16f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App3
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App3 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App4.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
index 1cce4d8d..1156f54d 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App4
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App4 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App5.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
index beab680b..dd3c028a 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App5
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App5 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App6.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
index c748ea2c..ca09789f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App6
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App6 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App7.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
index 0b09cdfa..e0f50da0 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App7
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App7 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-2/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java b/src/it/MCOMPILER-170/mcompiler-170-2/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
index 464f9af3..af3a4542 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-2/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-2/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -27,32 +25,27 @@
/**
* Unit test for simple App.
*/
-public class AppTest
- extends TestCase
-{
+public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
- public AppTest( String testName )
- {
- super( testName );
+ public AppTest(String testName) {
+ super(testName);
}
/**
* @return the suite of tests being tested
*/
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
+ public static Test suite() {
+ return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
- public void testApp()
- {
- assertTrue( true );
+ public void testApp() {
+ assertTrue(true);
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App.java
index bcbf5dd6..3fa54ed1 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,35 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*/
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App2.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
index 6a22d395..9a6511fc 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App2
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App2 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App3.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
index d970eecf..eb55f16f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App3
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App3 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App4.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
index 1cce4d8d..1156f54d 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App4
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App4 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App5.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
index beab680b..dd3c028a 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App5
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App5 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App6.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
index c748ea2c..ca09789f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App6
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App6 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App7.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
index 0b09cdfa..e0f50da0 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App7
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App7 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-3/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java b/src/it/MCOMPILER-170/mcompiler-170-3/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
index 464f9af3..af3a4542 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-3/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-3/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -27,32 +25,27 @@
/**
* Unit test for simple App.
*/
-public class AppTest
- extends TestCase
-{
+public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
- public AppTest( String testName )
- {
- super( testName );
+ public AppTest(String testName) {
+ super(testName);
}
/**
* @return the suite of tests being tested
*/
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
+ public static Test suite() {
+ return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
- public void testApp()
- {
- assertTrue( true );
+ public void testApp() {
+ assertTrue(true);
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App.java
index bcbf5dd6..3fa54ed1 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,35 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*/
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App2.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
index 6a22d395..9a6511fc 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App2.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App2
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App2 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App3.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
index d970eecf..eb55f16f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App3.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App3
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App3 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App4.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
index 1cce4d8d..1156f54d 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App4.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App4
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App4 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App5.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
index beab680b..dd3c028a 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App5.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App5
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App5 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App6.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
index c748ea2c..ca09789f 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App6.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App6
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App6 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App7.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
index 0b09cdfa..e0f50da0 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App7.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,36 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
/**
* Hello world!
*
*/
-public class App7
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App7 {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
- public static void mainFoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public static void mainFoo(String[] args) {
+ System.out.println("Hello World!");
}
- public void bar( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void bar(String[] args) {
+ System.out.println("Hello World!");
}
- public void foo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void foo(String[] args) {
+ System.out.println("Hello World!");
}
- public void barfoo( String[] args )
- {
- System.out.println( "Hello World!" );
+ public void barfoo(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/MCOMPILER-170/mcompiler-170-4/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java b/src/it/MCOMPILER-170/mcompiler-170-4/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
index 464f9af3..af3a4542 100644
--- a/src/it/MCOMPILER-170/mcompiler-170-4/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
+++ b/src/it/MCOMPILER-170/mcompiler-170-4/src/test/java/org/apache/maven/plugins/compiler/it/AppTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.plugins.compiler.it;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -27,32 +25,27 @@
/**
* Unit test for simple App.
*/
-public class AppTest
- extends TestCase
-{
+public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
- public AppTest( String testName )
- {
- super( testName );
+ public AppTest(String testName) {
+ super(testName);
}
/**
* @return the suite of tests being tested
*/
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
+ public static Test suite() {
+ return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
- public void testApp()
- {
- assertTrue( true );
+ public void testApp() {
+ assertTrue(true);
}
}
diff --git a/src/it/MCOMPILER-190/src/main/java/org/example/pce/sample/Dummy.java b/src/it/MCOMPILER-190/src/main/java/org/example/pce/sample/Dummy.java
index 96a49ffc..00225397 100644
--- a/src/it/MCOMPILER-190/src/main/java/org/example/pce/sample/Dummy.java
+++ b/src/it/MCOMPILER-190/src/main/java/org/example/pce/sample/Dummy.java
@@ -1,5 +1,3 @@
-package org.example.pce.sample;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.example.pce.sample;
public class Dummy {
- public static void main(final String[] args) {
- String dummy = new Integer(1);
- }
+ public static void main(final String[] args) {
+ String dummy = new Integer(1);
+ }
}
diff --git a/src/it/MCOMPILER-192/src/main/java/dummy/HelloWorld.java b/src/it/MCOMPILER-192/src/main/java/dummy/HelloWorld.java
index f223c74d..7ceb91cb 100644
--- a/src/it/MCOMPILER-192/src/main/java/dummy/HelloWorld.java
+++ b/src/it/MCOMPILER-192/src/main/java/dummy/HelloWorld.java
@@ -1,28 +1,25 @@
-package dummy;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-public class HelloWorld
-{
- public static void main(String[] argv) {
- System.out.println("Hello World");
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package dummy;
+
+public class HelloWorld {
+ public static void main(String[] argv) {
+ System.out.println("Hello World");
+ }
+}
diff --git a/src/it/MCOMPILER-192/verify.groovy b/src/it/MCOMPILER-192/verify.groovy
index 4e6e3b0a..a23fe871 100644
--- a/src/it/MCOMPILER-192/verify.groovy
+++ b/src/it/MCOMPILER-192/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-197/src/main/java/org/issue/Person.java b/src/it/MCOMPILER-197/src/main/java/org/issue/Person.java
index 701035c0..d80a49b9 100644
--- a/src/it/MCOMPILER-197/src/main/java/org/issue/Person.java
+++ b/src/it/MCOMPILER-197/src/main/java/org/issue/Person.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.issue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -28,6 +27,7 @@ public class Person {
@Id
@GeneratedValue
private long id;
+
private String name;
public long getId() {
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java b/src/it/MCOMPILER-203-processorpath/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
index a3dcbf9b..b2dfd6ca 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
+++ b/src/it/MCOMPILER-203-processorpath/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.java
@@ -1,121 +1,105 @@
-package org.issue;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Set;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.Filer;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedSourceVersion;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.PackageElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.util.Elements;
-import javax.tools.FileObject;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardLocation;
-
-@SupportedSourceVersion( SourceVersion.RELEASE_6 )
-@SupportedAnnotationTypes( "org.issue.SimpleAnnotation" )
-public class SimpleAnnotationProcessor
- extends AbstractProcessor
-{
-
- @Override
- public boolean process( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
- {
- if ( annotations.isEmpty() )
- {
- return true;
- }
-
- // assert that commons-lang3 is on the classpath
- try
- {
- getClass().getClassLoader().loadClass( "org.apache.commons.lang3.StringUtils" );
- }
- catch ( ClassNotFoundException expected )
- {
- throw new RuntimeException( "Expected org.apache.commons.lang3.StringUtils to be on the processorpath,"
- + "because it is a declared dependency of the annotation processor." );
- }
-
- // assert that commons-io is NOT on the classpath, as it is only a project dependency in "annotation-user"
- try
- {
- getClass().getClassLoader().loadClass( "org.apache.commons.io.IOUtils" );
- throw new RuntimeException( "Expected a ClassNotFoundException because "
- + "org.apache.commons.io.IOUtils is not supposed to be on the processorpath." );
- }
- catch ( ClassNotFoundException expected )
- {
- // expected.
- }
-
- Filer filer = processingEnv.getFiler();
-
- Elements elementUtils = processingEnv.getElementUtils();
-
- Set extends Element> elements = roundEnv.getElementsAnnotatedWith( annotations.iterator().next() );
-
- for ( Element element : elements )
- {
- Name name = element.getSimpleName();
-
- PackageElement packageElement = elementUtils.getPackageOf( element );
-
- try
- {
- Name packageName = packageElement.getQualifiedName();
- FileObject resource =
- filer.createResource( StandardLocation.SOURCE_OUTPUT, packageName, name
- + ".txt", element );
-
- Writer writer = resource.openWriter();
- writer.write( name.toString() );
- writer.close();
-
- String className = name + "Companion";
- JavaFileObject javaFile = filer.createSourceFile( packageName + "." + className, element );
-
- Writer javaWriter = javaFile.openWriter();
- javaWriter.append( "package " ).append( packageName ).append( ";\n\n" );
- javaWriter.append( "public class " ).append( className ).append( " {\n" );
- javaWriter.append( " public " ).append( className ).append( "() {\n" );
- javaWriter.append( " System.out.println(\"Hey there!\");\n" );
- javaWriter.append( " }\n}\n" );
- javaWriter.close();
- }
- catch ( IOException e )
- {
- throw new RuntimeException( e );
- }
- }
-
- return !elements.isEmpty();
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.issue;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.tools.FileObject;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardLocation;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Set;
+
+@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedAnnotationTypes("org.issue.SimpleAnnotation")
+public class SimpleAnnotationProcessor extends AbstractProcessor {
+
+ @Override
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ if (annotations.isEmpty()) {
+ return true;
+ }
+
+ // assert that commons-lang3 is on the classpath
+ try {
+ getClass().getClassLoader().loadClass("org.apache.commons.lang3.StringUtils");
+ } catch (ClassNotFoundException expected) {
+ throw new RuntimeException("Expected org.apache.commons.lang3.StringUtils to be on the processorpath,"
+ + "because it is a declared dependency of the annotation processor.");
+ }
+
+ // assert that commons-io is NOT on the classpath, as it is only a project dependency in "annotation-user"
+ try {
+ getClass().getClassLoader().loadClass("org.apache.commons.io.IOUtils");
+ throw new RuntimeException("Expected a ClassNotFoundException because "
+ + "org.apache.commons.io.IOUtils is not supposed to be on the processorpath.");
+ } catch (ClassNotFoundException expected) {
+ // expected.
+ }
+
+ Filer filer = processingEnv.getFiler();
+
+ Elements elementUtils = processingEnv.getElementUtils();
+
+ Set extends Element> elements =
+ roundEnv.getElementsAnnotatedWith(annotations.iterator().next());
+
+ for (Element element : elements) {
+ Name name = element.getSimpleName();
+
+ PackageElement packageElement = elementUtils.getPackageOf(element);
+
+ try {
+ Name packageName = packageElement.getQualifiedName();
+ FileObject resource =
+ filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + ".txt", element);
+
+ Writer writer = resource.openWriter();
+ writer.write(name.toString());
+ writer.close();
+
+ String className = name + "Companion";
+ JavaFileObject javaFile = filer.createSourceFile(packageName + "." + className, element);
+
+ Writer javaWriter = javaFile.openWriter();
+ javaWriter.append("package ").append(packageName).append(";\n\n");
+ javaWriter.append("public class ").append(className).append(" {\n");
+ javaWriter.append(" public ").append(className).append("() {\n");
+ javaWriter.append(" System.out.println(\"Hey there!\");\n");
+ javaWriter.append(" }\n}\n");
+ javaWriter.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return !elements.isEmpty();
+ }
+}
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.java b/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.java
index b867beb5..5339365e 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.java
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.java
@@ -1,31 +1,28 @@
-package org.issue;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.SOURCE)
-public @interface SimpleAnnotation {
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.issue;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface SimpleAnnotation {}
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleObject.java b/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleObject.java
index 5b7a43f6..18b8fc43 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleObject.java
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleObject.java
@@ -1,26 +1,22 @@
-package org.issue;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-@SimpleAnnotation
-public class SimpleObject
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.issue;
+
+@SimpleAnnotation
+public class SimpleObject {}
diff --git a/src/it/MCOMPILER-203-processorpath/annotation-user/src/test/java/org/issue/SimpleTestObject.java b/src/it/MCOMPILER-203-processorpath/annotation-user/src/test/java/org/issue/SimpleTestObject.java
index 48aed126..706dccf1 100644
--- a/src/it/MCOMPILER-203-processorpath/annotation-user/src/test/java/org/issue/SimpleTestObject.java
+++ b/src/it/MCOMPILER-203-processorpath/annotation-user/src/test/java/org/issue/SimpleTestObject.java
@@ -1,26 +1,22 @@
-package org.issue;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-@SimpleAnnotation
-public class SimpleTestObject
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.issue;
+
+@SimpleAnnotation
+public class SimpleTestObject {}
diff --git a/src/it/MCOMPILER-205/src/main/java/dummy/HelloWorld.java b/src/it/MCOMPILER-205/src/main/java/dummy/HelloWorld.java
index f223c74d..7ceb91cb 100644
--- a/src/it/MCOMPILER-205/src/main/java/dummy/HelloWorld.java
+++ b/src/it/MCOMPILER-205/src/main/java/dummy/HelloWorld.java
@@ -1,28 +1,25 @@
-package dummy;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-public class HelloWorld
-{
- public static void main(String[] argv) {
- System.out.println("Hello World");
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package dummy;
+
+public class HelloWorld {
+ public static void main(String[] argv) {
+ System.out.println("Hello World");
+ }
+}
diff --git a/src/it/MCOMPILER-205/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-205/src/main/java/dummy/package-info.java
index ed72542b..9d2deff2 100644
--- a/src/it/MCOMPILER-205/src/main/java/dummy/package-info.java
+++ b/src/it/MCOMPILER-205/src/main/java/dummy/package-info.java
@@ -20,4 +20,4 @@
/**
* This is the package javadoc
*/
-package dummy;
\ No newline at end of file
+package dummy;
diff --git a/src/it/MCOMPILER-205/verify.groovy b/src/it/MCOMPILER-205/verify.groovy
index 1526f866..1041376b 100644
--- a/src/it/MCOMPILER-205/verify.groovy
+++ b/src/it/MCOMPILER-205/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224.java b/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224.java
index c47ffa04..045a64b1 100644
--- a/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224.java
+++ b/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,9 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.issue;
-
-public @interface MCompiler224
-{
-
-}
+public @interface MCompiler224 {}
diff --git a/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224AnnotationProcessor.java b/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224AnnotationProcessor.java
index 2e92f08c..c7ded6bc 100644
--- a/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224AnnotationProcessor.java
+++ b/src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224AnnotationProcessor.java
@@ -1,5 +1,3 @@
-package org.issue;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,9 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-
-import java.util.Set;
+package org.issue;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Messager;
@@ -31,38 +27,31 @@
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic.Kind;
+import java.util.Set;
+
/* @formatter:off */
-@SupportedAnnotationTypes( {
- "org.issue.MCompiler224"
-} )
+@SupportedAnnotationTypes({"org.issue.MCompiler224"})
/* @formatter:on */
-@SupportedSourceVersion( SourceVersion.RELEASE_6 )
-public class MCompiler224AnnotationProcessor
- extends AbstractProcessor
-{
+@SupportedSourceVersion(SourceVersion.RELEASE_6)
+public class MCompiler224AnnotationProcessor extends AbstractProcessor {
@Override
- public boolean process( final Set extends TypeElement> elts, final RoundEnvironment env )
- {
- if ( elts.isEmpty() )
- {
+ public boolean process(final Set extends TypeElement> elts, final RoundEnvironment env) {
+ if (elts.isEmpty()) {
return true;
}
final Messager messager = this.processingEnv.getMessager();
- for ( final Kind kind : Kind.values() )
- {
- if ( Kind.ERROR == kind )
- {
+ for (final Kind kind : Kind.values()) {
+ if (Kind.ERROR == kind) {
continue;
}
- System.out.println( "Testing message for: " + kind );
- messager.printMessage( kind, kind + " Test message." );
+ System.out.println("Testing message for: " + kind);
+ messager.printMessage(kind, kind + " Test message.");
}
return true;
}
-
}
diff --git a/src/it/MCOMPILER-224/annotation-user/src/main/java/org/issue/user/User.java b/src/it/MCOMPILER-224/annotation-user/src/main/java/org/issue/user/User.java
index 38b2ebd5..660beafe 100644
--- a/src/it/MCOMPILER-224/annotation-user/src/main/java/org/issue/user/User.java
+++ b/src/it/MCOMPILER-224/annotation-user/src/main/java/org/issue/user/User.java
@@ -1,5 +1,3 @@
-package org.issue.user;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,12 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.issue.user;
import org.issue.MCompiler224;
@MCompiler224
-public class User
-{
-
-}
+public class User {}
diff --git a/src/it/MCOMPILER-228/src/main/java/example/FinalExample.java b/src/it/MCOMPILER-228/src/main/java/example/FinalExample.java
index bb577774..dd510e86 100644
--- a/src/it/MCOMPILER-228/src/main/java/example/FinalExample.java
+++ b/src/it/MCOMPILER-228/src/main/java/example/FinalExample.java
@@ -1,49 +1,40 @@
-package example;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Comparator;
-
-public class FinalExample
-{
- public static final Comparator comparator = ( o1, o2 ) ->
- {
- final String desc1 = o1;
- final String desc2 = o2;
- final int compareTo;
- if ( desc1 == null )
- {
- compareTo = -1;
- }
- else if ( desc2 == null )
- {
- compareTo = 1;
- }
- else
- {
- compareTo = desc1.compareTo( desc2 );
- }
- if ( compareTo == 0 )
- {
- return 3;
- }
- return compareTo;
- };
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package example;
+
+import java.util.Comparator;
+
+public class FinalExample {
+ public static final Comparator comparator = (o1, o2) -> {
+ final String desc1 = o1;
+ final String desc2 = o2;
+ final int compareTo;
+ if (desc1 == null) {
+ compareTo = -1;
+ } else if (desc2 == null) {
+ compareTo = 1;
+ } else {
+ compareTo = desc1.compareTo(desc2);
+ }
+ if (compareTo == 0) {
+ return 3;
+ }
+ return compareTo;
+ };
+}
diff --git a/src/it/MCOMPILER-260_customArguments/src/main/java/com/foo/MyClass.java b/src/it/MCOMPILER-260_customArguments/src/main/java/com/foo/MyClass.java
index dae085a4..f646e4ae 100644
--- a/src/it/MCOMPILER-260_customArguments/src/main/java/com/foo/MyClass.java
+++ b/src/it/MCOMPILER-260_customArguments/src/main/java/com/foo/MyClass.java
@@ -1,25 +1,21 @@
-package com.foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+public class MyClass {}
diff --git a/src/it/MCOMPILER-268_modulepath/src/main/java/com/foo/MyClass.java b/src/it/MCOMPILER-268_modulepath/src/main/java/com/foo/MyClass.java
index dae085a4..f646e4ae 100644
--- a/src/it/MCOMPILER-268_modulepath/src/main/java/com/foo/MyClass.java
+++ b/src/it/MCOMPILER-268_modulepath/src/main/java/com/foo/MyClass.java
@@ -1,25 +1,21 @@
-package com.foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+public class MyClass {}
diff --git a/src/it/MCOMPILER-268_modulepath/src/main/java/module-info.java b/src/it/MCOMPILER-268_modulepath/src/main/java/module-info.java
index d9800e36..029b6e71 100644
--- a/src/it/MCOMPILER-268_modulepath/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-268_modulepath/src/main/java/module-info.java
@@ -1,22 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module M.N {
- requires org.apache.commons.lang3;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module M.N {
+ requires org.apache.commons.lang3;
+}
diff --git a/src/it/MCOMPILER-268_modulepath/src/test/java/com/foo/MyTest.java b/src/it/MCOMPILER-268_modulepath/src/test/java/com/foo/MyTest.java
index efb936e6..072b8086 100644
--- a/src/it/MCOMPILER-268_modulepath/src/test/java/com/foo/MyTest.java
+++ b/src/it/MCOMPILER-268_modulepath/src/test/java/com/foo/MyTest.java
@@ -1,28 +1,25 @@
-package com.foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import junit.framework.TestCase;
-
-public class MyTest
- extends TestCase
-{
- private MyClass myClass = new MyClass();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+import junit.framework.TestCase;
+
+public class MyTest extends TestCase {
+ private MyClass myClass = new MyClass();
+}
diff --git a/src/it/MCOMPILER-270_release/src/main/java/MyClass.java b/src/it/MCOMPILER-270_release/src/main/java/MyClass.java
index 4f947346..d4132bb2 100644
--- a/src/it/MCOMPILER-270_release/src/main/java/MyClass.java
+++ b/src/it/MCOMPILER-270_release/src/main/java/MyClass.java
@@ -1,23 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package foo;
+
+public class MyClass {}
diff --git a/src/it/MCOMPILER-270_release/src/test/java/MyTest.java b/src/it/MCOMPILER-270_release/src/test/java/MyTest.java
index d80ce855..77db4f1d 100644
--- a/src/it/MCOMPILER-270_release/src/test/java/MyTest.java
+++ b/src/it/MCOMPILER-270_release/src/test/java/MyTest.java
@@ -1,26 +1,23 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import junit.framework.TestCase;
-
-public class MyTest
- extends TestCase
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package foo;
+
+import junit.framework.TestCase;
+
+public class MyTest extends TestCase {}
diff --git a/src/it/MCOMPILER-272/processor1/src/main/java/processor1/Processor1.java b/src/it/MCOMPILER-272/processor1/src/main/java/processor1/Processor1.java
index 319d2740..d1638492 100644
--- a/src/it/MCOMPILER-272/processor1/src/main/java/processor1/Processor1.java
+++ b/src/it/MCOMPILER-272/processor1/src/main/java/processor1/Processor1.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,21 +18,18 @@
*/
package processor1;
-import java.util.Set;
-
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.TypeElement;
+import java.util.Set;
+
@SupportedAnnotationTypes({"java.lang.SuppressWarnings"})
-public class Processor1
- extends AbstractProcessor
-{
+public class Processor1 extends AbstractProcessor {
@Override
- public boolean process ( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
- {
- System.out.println( "Run processor1" );
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ System.out.println("Run processor1");
return false;
}
}
diff --git a/src/it/MCOMPILER-272/processor2-dep/src/main/java/processor2/dep/Foo.java b/src/it/MCOMPILER-272/processor2-dep/src/main/java/processor2/dep/Foo.java
index bd1e92a4..f9fa52a5 100644
--- a/src/it/MCOMPILER-272/processor2-dep/src/main/java/processor2/dep/Foo.java
+++ b/src/it/MCOMPILER-272/processor2-dep/src/main/java/processor2/dep/Foo.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package processor2.dep;
-public class Foo
-{
-
-}
+public class Foo {}
diff --git a/src/it/MCOMPILER-272/processor2/src/main/java/processor2/Processor2.java b/src/it/MCOMPILER-272/processor2/src/main/java/processor2/Processor2.java
index b96a20f4..c2adcb04 100644
--- a/src/it/MCOMPILER-272/processor2/src/main/java/processor2/Processor2.java
+++ b/src/it/MCOMPILER-272/processor2/src/main/java/processor2/Processor2.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,21 +18,18 @@
*/
package processor2;
-import java.util.Set;
-
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.TypeElement;
+import java.util.Set;
+
@SupportedAnnotationTypes({"java.lang.SuppressWarnings"})
-public class Processor2
- extends AbstractProcessor
-{
+public class Processor2 extends AbstractProcessor {
@Override
- public boolean process ( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
- {
- System.out.println( "Run processor2" );
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ System.out.println("Run processor2");
new processor2.dep.Foo();
return false;
}
diff --git a/src/it/MCOMPILER-272/project/src/main/java/project/Project.java b/src/it/MCOMPILER-272/project/src/main/java/project/Project.java
index 9f00a997..be9e170a 100644
--- a/src/it/MCOMPILER-272/project/src/main/java/project/Project.java
+++ b/src/it/MCOMPILER-272/project/src/main/java/project/Project.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,11 +20,7 @@
import java.util.List;
-public class Project
-{
- @SuppressWarnings( "rawtypes" )
- public void foo( List toto )
- {
-
- }
+public class Project {
+ @SuppressWarnings("rawtypes")
+ public void foo(List toto) {}
}
diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/com/foo/MyClass.java b/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/com/foo/MyClass.java
index dae085a4..f646e4ae 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/com/foo/MyClass.java
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/com/foo/MyClass.java
@@ -1,25 +1,21 @@
-package com.foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+public class MyClass {}
diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/module-info.java b/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/module-info.java
index c0e023a4..e30faf17 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/module-info.java
@@ -1,22 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module M.N {
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+module M.N {}
diff --git a/src/it/MCOMPILER-275_separate-moduleinfo/src/test/java/com/foo/MyTest.java b/src/it/MCOMPILER-275_separate-moduleinfo/src/test/java/com/foo/MyTest.java
index efb936e6..072b8086 100644
--- a/src/it/MCOMPILER-275_separate-moduleinfo/src/test/java/com/foo/MyTest.java
+++ b/src/it/MCOMPILER-275_separate-moduleinfo/src/test/java/com/foo/MyTest.java
@@ -1,28 +1,25 @@
-package com.foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import junit.framework.TestCase;
-
-public class MyTest
- extends TestCase
-{
- private MyClass myClass = new MyClass();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.foo;
+
+import junit.framework.TestCase;
+
+public class MyTest extends TestCase {
+ private MyClass myClass = new MyClass();
+}
diff --git a/src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.java b/src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.java
index 7370ac08..f646e4ae 100644
--- a/src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.java
+++ b/src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.java
@@ -1,5 +1,3 @@
-package com.foo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package com.foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.java b/src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.java
index f152b90e..072b8086 100644
--- a/src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.java
+++ b/src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.java
@@ -1,5 +1,3 @@
-package com.foo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package com.foo;
import junit.framework.TestCase;
-public class MyTest
- extends TestCase
-{
+public class MyTest extends TestCase {
private MyClass myClass = new MyClass();
}
diff --git a/src/it/MCOMPILER-294/app/src/main/java/module-info.java b/src/it/MCOMPILER-294/app/src/main/java/module-info.java
index 3cda7211..d90b8a19 100644
--- a/src/it/MCOMPILER-294/app/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-294/app/src/main/java/module-info.java
@@ -1,22 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module org.maven.test.app {
- requires org.maven.test.lib;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module org.maven.test.app {
+ requires org.maven.test.lib;
+}
diff --git a/src/it/MCOMPILER-294/app/src/main/java/org/maven/test/app/Main.java b/src/it/MCOMPILER-294/app/src/main/java/org/maven/test/app/Main.java
index 5d94eec5..cdd399a9 100644
--- a/src/it/MCOMPILER-294/app/src/main/java/org/maven/test/app/Main.java
+++ b/src/it/MCOMPILER-294/app/src/main/java/org/maven/test/app/Main.java
@@ -1,32 +1,31 @@
-package org.maven.test.app;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.maven.test.lib.Sout;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Sout.println( args );
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test.app;
+
+import org.maven.test.lib.Sout;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ Sout.println(args);
+ }
+}
diff --git a/src/it/MCOMPILER-294/lib/src/main/java/module-info.java b/src/it/MCOMPILER-294/lib/src/main/java/module-info.java
index a218436f..52414cf8 100644
--- a/src/it/MCOMPILER-294/lib/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-294/lib/src/main/java/module-info.java
@@ -1,22 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module org.maven.test.lib {
- exports org.maven.test.lib;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module org.maven.test.lib {
+ exports org.maven.test.lib;
+}
diff --git a/src/it/MCOMPILER-294/lib/src/main/java/org/maven/test/lib/Sout.java b/src/it/MCOMPILER-294/lib/src/main/java/org/maven/test/lib/Sout.java
index 658044ec..99c65f94 100644
--- a/src/it/MCOMPILER-294/lib/src/main/java/org/maven/test/lib/Sout.java
+++ b/src/it/MCOMPILER-294/lib/src/main/java/org/maven/test/lib/Sout.java
@@ -1,33 +1,31 @@
-package org.maven.test.lib;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class Sout {
-
- /**
- * @param args
- */
- public static void println(String[] args) {
- for ( String string : args )
- {
- System.out.println( args );
- }
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test.lib;
+
+public class Sout {
+
+ /**
+ * @param args
+ */
+ public static void println(String[] args) {
+ for (String string : args) {
+ System.out.println(args);
+ }
+ }
+}
diff --git a/src/it/MCOMPILER-298/src/main/java/com/foo/ParameterClass.java b/src/it/MCOMPILER-298/src/main/java/com/foo/ParameterClass.java
index 439e1e1e..44d79122 100644
--- a/src/it/MCOMPILER-298/src/main/java/com/foo/ParameterClass.java
+++ b/src/it/MCOMPILER-298/src/main/java/com/foo/ParameterClass.java
@@ -1,5 +1,3 @@
-package com.foo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,12 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package com.foo;
-
-public class ParameterClass
-{
- public void method( String parameterName )
- {
+public class ParameterClass {
+ public void method(String parameterName) {
// nothing
}
}
diff --git a/src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.java b/src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.java
index b552b774..42d771df 100644
--- a/src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.java
+++ b/src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.java
@@ -1,5 +1,3 @@
-package com.foo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,19 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.junit.Assert.*;
+package com.foo;
import org.junit.Test;
+import static org.junit.Assert.*;
-
-public class ParameterTest
-{
+public class ParameterTest {
@Test
- public void testParameter() throws Exception
- {
- assertEquals( "parameterName", ParameterClass.class.getMethod( "method", String.class ).getParameters()[0].getName() );
+ public void testParameter() throws Exception {
+ assertEquals(
+ "parameterName",
+ ParameterClass.class
+ .getMethod("method", String.class)
+ .getParameters()[0]
+ .getName());
}
}
diff --git a/src/it/MCOMPILER-321_pathexceptions/src/main/java/module-info.java b/src/it/MCOMPILER-321_pathexceptions/src/main/java/module-info.java
index 0f43b063..a57384df 100644
--- a/src/it/MCOMPILER-321_pathexceptions/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-321_pathexceptions/src/main/java/module-info.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -17,6 +17,4 @@
* under the License.
*/
-module M.N {
-
-}
\ No newline at end of file
+module M.N {}
diff --git a/src/it/MCOMPILER-321_pathexceptions/src/test/java/test/MyTest.java b/src/it/MCOMPILER-321_pathexceptions/src/test/java/test/MyTest.java
index e2e08352..c42edd69 100644
--- a/src/it/MCOMPILER-321_pathexceptions/src/test/java/test/MyTest.java
+++ b/src/it/MCOMPILER-321_pathexceptions/src/test/java/test/MyTest.java
@@ -1,5 +1,3 @@
-package test;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package test;
-public class MyTest
-{
-}
\ No newline at end of file
+public class MyTest {}
diff --git a/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java b/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
+++ b/src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/MCOMPILER-336_incremental-modulepath/a/src/main/java/module-info.java b/src/it/MCOMPILER-336_incremental-modulepath/a/src/main/java/module-info.java
index 234b5f94..aef91dbb 100644
--- a/src/it/MCOMPILER-336_incremental-modulepath/a/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-336_incremental-modulepath/a/src/main/java/module-info.java
@@ -16,6 +16,4 @@
* specific language governing permissions and limitations
* under the License.
*/
-module test.a
-{
-}
+module test.a {}
diff --git a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/module-info.java b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/module-info.java
index c9f16f17..f2213e3c 100644
--- a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/module-info.java
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-module test.b
-{
+module test.b {
requires transitive test.a;
}
diff --git a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/Foo.java b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/Foo.java
index c22b20aa..0ec20eb3 100644
--- a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/Foo.java
+++ b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/Foo.java
@@ -1,5 +1,3 @@
-package org.opengis.annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.opengis.annotation;
-public class Foo {
-}
+public class Foo {}
diff --git a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/package-info.java b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/package-info.java
index 41a65d1f..d4eae974 100644
--- a/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/package-info.java
+++ b/src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/package-info.java
@@ -1,5 +1,3 @@
-package org.opengis.annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,4 +15,5 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
\ No newline at end of file
+ */
+package org.opengis.annotation;
diff --git a/src/it/MCOMPILER-346/src/main/java/org/jenkinsci/test/acceptance/server/PooledJenkinsController.java b/src/it/MCOMPILER-346/src/main/java/org/jenkinsci/test/acceptance/server/PooledJenkinsController.java
index f7fbf61f..06706f90 100644
--- a/src/it/MCOMPILER-346/src/main/java/org/jenkinsci/test/acceptance/server/PooledJenkinsController.java
+++ b/src/it/MCOMPILER-346/src/main/java/org/jenkinsci/test/acceptance/server/PooledJenkinsController.java
@@ -1,5 +1,3 @@
-package org.jenkinsci.test.acceptance.server;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.jenkinsci.test.acceptance.server;
import javax.inject.Inject;
+
import java.io.File;
import java.io.IOException;
import java.net.URL;
@@ -27,23 +27,22 @@
import java.util.List;
import java.util.concurrent.Executors;
-import org.jenkinsci.remoting.RoleChecker;
-import org.jenkinsci.test.acceptance.controller.IJenkinsController;
-import org.jenkinsci.test.acceptance.controller.JenkinsController;
-import org.jenkinsci.test.acceptance.controller.LocalController.LocalFactoryImpl;
-import org.jenkinsci.test.acceptance.log.LogListenable;
-import org.jenkinsci.test.acceptance.log.LogListener;
-import org.jenkinsci.test.acceptance.log.LogSplitter;
-
import com.cloudbees.sdk.extensibility.Extension;
import com.google.inject.Injector;
-
import hudson.remoting.Callable;
import hudson.remoting.Channel;
import hudson.remoting.Channel.Mode;
import hudson.remoting.ChannelBuilder;
import jnr.unixsocket.UnixSocketAddress;
import jnr.unixsocket.UnixSocketChannel;
+import org.jenkinsci.remoting.RoleChecker;
+import org.jenkinsci.test.acceptance.controller.IJenkinsController;
+import org.jenkinsci.test.acceptance.controller.JenkinsController;
+import org.jenkinsci.test.acceptance.controller.LocalController.LocalFactoryImpl;
+import org.jenkinsci.test.acceptance.log.LogListenable;
+import org.jenkinsci.test.acceptance.log.LogListener;
+import org.jenkinsci.test.acceptance.log.LogSplitter;
+
import static java.lang.System.*;
/**
@@ -76,7 +75,7 @@ public void removeLogListener(LogListener l) {
}
private boolean connect() throws IOException {
- if (conn != null) return false;
+ if (conn != null) return false;
System.out.println("Requesting jut instance using socket " + socket.getAbsolutePath());
UnixSocketAddress address = new UnixSocketAddress(socket);
@@ -87,7 +86,7 @@ private boolean connect() throws IOException {
.build(ChannelStream.in(conn), ChannelStream.out(conn));
try {
- controller = (IJenkinsController)channel.waitForRemoteProperty("controller");
+ controller = (IJenkinsController) channel.waitForRemoteProperty("controller");
controller.start();
url = controller.getUrl();
@@ -96,7 +95,7 @@ private boolean connect() throws IOException {
}
final LogListener l = channel.export(LogListener.class, splitter);
- channel.call(new InstallLogger(controller,l));
+ channel.call(new InstallLogger(controller, l));
for (byte[] content : toUnpack) {
controller.populateJenkinsHome(content, false);
@@ -133,8 +132,7 @@ public void populateJenkinsHome(byte[] template, boolean clean) throws IOExcepti
@Override
public URL getUrl() {
- if (url==null)
- throw new IllegalStateException("This controller has not been started");
+ if (url == null) throw new IllegalStateException("This controller has not been started");
return url;
}
@@ -146,8 +144,7 @@ public void tearDown() throws IOException {
} catch (InterruptedException e) {
throw new IOException(e);
} finally {
- if (conn !=null)
- conn.close();
+ if (conn != null) conn.close();
conn = null;
}
}
@@ -156,7 +153,7 @@ public void tearDown() throws IOException {
public void diagnose(Throwable cause) {
// TODO: Report jenkins log
cause.printStackTrace(out);
- if(getenv("INTERACTIVE") != null && getenv("INTERACTIVE").equals("true")){
+ if (getenv("INTERACTIVE") != null && getenv("INTERACTIVE").equals("true")) {
out.println("Commencing interactive debugging. Browser session was kept open.");
out.println("Press return to proceed.");
try {
@@ -169,7 +166,8 @@ public void diagnose(Throwable cause) {
@Extension
public static class FactoryImpl extends LocalFactoryImpl {
- @Inject Injector i;
+ @Inject
+ Injector i;
@Override
public String getId() {
@@ -204,8 +202,7 @@ public Void call() throws IOException {
}
@Override
- public void checkRoles(RoleChecker checker) throws SecurityException {
- }
+ public void checkRoles(RoleChecker checker) throws SecurityException {}
private static final long serialVersionUID = 1L;
}
diff --git a/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java b/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
index 1d0ba1f1..3f50a05e 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
+++ b/src/it/MCOMPILER-349_dependencyChanged/dependent-module/src/main/java/Main.java
@@ -18,11 +18,9 @@
*/
package foo;
-public class Main
-{
- public static void main( String[] args )
- {
+public class Main {
+ public static void main(String[] args) {
TestService testService = new TestService();
testService.run();
}
-}
\ No newline at end of file
+}
diff --git a/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java b/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
index 2e1d747a..08e2016a 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
+++ b/src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.java
@@ -18,11 +18,7 @@
*/
package foo;
-public class TestService
-{
+public class TestService {
- public void run()
- {
-
- }
-}
\ No newline at end of file
+ public void run() {}
+}
diff --git a/src/it/MCOMPILER-349_dependencyChanged/verify.groovy b/src/it/MCOMPILER-349_dependencyChanged/verify.groovy
index c2182819..f09d28da 100644
--- a/src/it/MCOMPILER-349_dependencyChanged/verify.groovy
+++ b/src/it/MCOMPILER-349_dependencyChanged/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-360/main360/src/main/java/module-info.java b/src/it/MCOMPILER-360/main360/src/main/java/module-info.java
index 2ad68325..084009f0 100644
--- a/src/it/MCOMPILER-360/main360/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-360/main360/src/main/java/module-info.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -17,5 +17,4 @@
* under the License.
*/
-module org.maven.test.app {
-}
+module org.maven.test.app {}
diff --git a/src/it/MCOMPILER-366/src/main/java/module-info.java b/src/it/MCOMPILER-366/src/main/java/module-info.java
index 95e72665..543dc053 100644
--- a/src/it/MCOMPILER-366/src/main/java/module-info.java
+++ b/src/it/MCOMPILER-366/src/main/java/module-info.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-module lib
-{
+module lib {
requires plexus.utils;
requires plexus.resources;
+
exports org.maven.test;
-}
\ No newline at end of file
+}
diff --git a/src/it/MCOMPILER-366/src/main/java/org/maven/test/Main.java b/src/it/MCOMPILER-366/src/main/java/org/maven/test/Main.java
index f2c4a2fa..833bee54 100644
--- a/src/it/MCOMPILER-366/src/main/java/org/maven/test/Main.java
+++ b/src/it/MCOMPILER-366/src/main/java/org/maven/test/Main.java
@@ -1,5 +1,3 @@
-package org.maven.test;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,9 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.test;
-import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.resource.ResourceManager;
+import org.codehaus.plexus.util.StringUtils;
public class Main {
@@ -28,7 +27,7 @@ public class Main {
* @param args
*/
public static void main(String[] args) {
- System.out.println( StringUtils.concatenate( args ) );
+ System.out.println(StringUtils.concatenate(args));
ResourceManager manager = null;
}
-}
\ No newline at end of file
+}
diff --git a/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/A.java b/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/A.java
index 03303316..7360b4a5 100644
--- a/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/A.java
+++ b/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/A.java
@@ -1,5 +1,3 @@
-package org.maven.bug;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.bug;
-public class A
-{
- static int getCount()
- {
+public class A {
+ static int getCount() {
return 1;
}
}
diff --git a/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/B.java b/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/B.java
index e30f7296..aec29939 100644
--- a/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/B.java
+++ b/src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/B.java
@@ -1,5 +1,3 @@
-package org.maven.bug;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.bug;
-public class B
-{
- static int getCount()
- {
+public class B {
+ static int getCount() {
return A.getCount() + 1;
}
}
diff --git a/src/it/MCOMPILER-373_mrjar/src/main/java11/org/maven/bug/B.java b/src/it/MCOMPILER-373_mrjar/src/main/java11/org/maven/bug/B.java
index 8963f312..1797e69e 100644
--- a/src/it/MCOMPILER-373_mrjar/src/main/java11/org/maven/bug/B.java
+++ b/src/it/MCOMPILER-373_mrjar/src/main/java11/org/maven/bug/B.java
@@ -1,5 +1,3 @@
-package org.maven.bug;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.bug;
-public class B
-{
- int getCount()
- {
+public class B {
+ int getCount() {
return A9.getCount() + 2;
}
}
diff --git a/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/A9.java b/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/A9.java
index 16fcc261..4b56281d 100644
--- a/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/A9.java
+++ b/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/A9.java
@@ -1,5 +1,3 @@
-package org.maven.bug;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.bug;
-public class A9
-{
- static int getCount()
- {
+public class A9 {
+ static int getCount() {
return A.getCount() + 1;
}
}
diff --git a/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/B.java b/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/B.java
index cfb033b6..1e54a47e 100644
--- a/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/B.java
+++ b/src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/B.java
@@ -1,5 +1,3 @@
-package org.maven.bug;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.bug;
-public class B
-{
- static int getCount()
- {
+public class B {
+ static int getCount() {
return A9.getCount() + 1;
}
}
diff --git a/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java b/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java
index 7e6d55c2..c63e6e40 100644
--- a/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java
+++ b/src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,5 +18,4 @@
*/
package com.natros.mcp;
-public class Foo {
-}
+public class Foo {}
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java b/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
index 14039917..3f50a05e 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/src/main/java/Main.java
@@ -18,10 +18,8 @@
*/
package foo;
-public class Main
-{
- public static void main( String[] args )
- {
+public class Main {
+ public static void main(String[] args) {
TestService testService = new TestService();
testService.run();
}
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java b/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
index 4fb1ade5..08e2016a 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.java
@@ -18,11 +18,7 @@
*/
package foo;
-public class TestService
-{
+public class TestService {
- public void run()
- {
-
- }
+ public void run() {}
}
diff --git a/src/it/MCOMPILER-474_recompile-dependent-when-package/verify.groovy b/src/it/MCOMPILER-474_recompile-dependent-when-package/verify.groovy
index 11789f72..e32f7a63 100644
--- a/src/it/MCOMPILER-474_recompile-dependent-when-package/verify.groovy
+++ b/src/it/MCOMPILER-474_recompile-dependent-when-package/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-481-requires-static-included/app/src/main/java/org/test/app/Main.java b/src/it/MCOMPILER-481-requires-static-included/app/src/main/java/org/test/app/Main.java
index 6debb0cf..631169b8 100644
--- a/src/it/MCOMPILER-481-requires-static-included/app/src/main/java/org/test/app/Main.java
+++ b/src/it/MCOMPILER-481-requires-static-included/app/src/main/java/org/test/app/Main.java
@@ -1,5 +1,3 @@
-package org.test.app;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.test.app;
-public class Main
-{
-}
+public class Main {}
diff --git a/src/it/MCOMPILER-481-requires-static-included/app/src/test/java/org/test/app/MainTest.java b/src/it/MCOMPILER-481-requires-static-included/app/src/test/java/org/test/app/MainTest.java
index 9c220a88..216b3a9a 100644
--- a/src/it/MCOMPILER-481-requires-static-included/app/src/test/java/org/test/app/MainTest.java
+++ b/src/it/MCOMPILER-481-requires-static-included/app/src/test/java/org/test/app/MainTest.java
@@ -1,5 +1,3 @@
-package org.test.app;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,16 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.test.app;
import org.eclipse.jetty.util.ajax.JSON;
import org.junit.jupiter.api.Test;
import org.test.service.JSONService;
-public class MainTest
-{
+public class MainTest {
@Test
- public void test()
- {
+ public void test() {
JSON json = new JSONService().json;
System.err.println("json = " + json);
}
diff --git a/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/JSONService.java b/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/JSONService.java
index 0bca3de1..022fd19a 100644
--- a/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/JSONService.java
+++ b/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/JSONService.java
@@ -1,5 +1,3 @@
-package org.test.service;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,10 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.test.service;
import org.eclipse.jetty.util.ajax.JSON;
-public class JSONService extends Service
-{
+public class JSONService extends Service {
public final JSON json = new JSON();
}
diff --git a/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/Service.java b/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/Service.java
index 69b865f1..7bd21cf5 100644
--- a/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/Service.java
+++ b/src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/Service.java
@@ -1,5 +1,3 @@
-package org.test.service;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.test.service;
-public abstract class Service
-{
-}
+public abstract class Service {}
diff --git a/src/it/MCOMPILER-485/src/main/java/dummy/HelloWorld.java b/src/it/MCOMPILER-485/src/main/java/dummy/HelloWorld.java
index cda1006a..7ceb91cb 100644
--- a/src/it/MCOMPILER-485/src/main/java/dummy/HelloWorld.java
+++ b/src/it/MCOMPILER-485/src/main/java/dummy/HelloWorld.java
@@ -1,5 +1,3 @@
-package dummy;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
+package dummy;
-
-public class HelloWorld
-{
- public static void main(String[] argv) {
- System.out.println("Hello World");
- }
+public class HelloWorld {
+ public static void main(String[] argv) {
+ System.out.println("Hello World");
+ }
}
diff --git a/src/it/MCOMPILER-485/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-485/src/main/java/dummy/package-info.java
index ed72542b..9d2deff2 100644
--- a/src/it/MCOMPILER-485/src/main/java/dummy/package-info.java
+++ b/src/it/MCOMPILER-485/src/main/java/dummy/package-info.java
@@ -20,4 +20,4 @@
/**
* This is the package javadoc
*/
-package dummy;
\ No newline at end of file
+package dummy;
diff --git a/src/it/MCOMPILER-485/verify.groovy b/src/it/MCOMPILER-485/verify.groovy
index 2384fecd..d8ccdafe 100644
--- a/src/it/MCOMPILER-485/verify.groovy
+++ b/src/it/MCOMPILER-485/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
index ed72542b..9d2deff2 100644
--- a/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
+++ b/src/it/MCOMPILER-495/src/main/java/dummy/package-info.java
@@ -20,4 +20,4 @@
/**
* This is the package javadoc
*/
-package dummy;
\ No newline at end of file
+package dummy;
diff --git a/src/it/MCOMPILER-495/verify.groovy b/src/it/MCOMPILER-495/verify.groovy
index 2384fecd..d8ccdafe 100644
--- a/src/it/MCOMPILER-495/verify.groovy
+++ b/src/it/MCOMPILER-495/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
index e5fbf583..f07d0f37 100644
--- a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.java
@@ -1,5 +1,3 @@
-package dummy;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package dummy;
public class Person {
private long id;
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
index 9b56c1d6..15d396d1 100644
--- a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.java
@@ -1,5 +1,3 @@
-package dummy.foo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package dummy.foo;
public class Person {
private long id;
diff --git a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
index ed72542b..9d2deff2 100644
--- a/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
+++ b/src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/package-info.java
@@ -20,4 +20,4 @@
/**
* This is the package javadoc
*/
-package dummy;
\ No newline at end of file
+package dummy;
diff --git a/src/it/MCOMPILER-500-package-info-incr/verify.groovy b/src/it/MCOMPILER-500-package-info-incr/verify.groovy
index ecba9c29..ef41bdec 100644
--- a/src/it/MCOMPILER-500-package-info-incr/verify.groovy
+++ b/src/it/MCOMPILER-500-package-info-incr/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
index 3df98c47..35fe82b1 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mcompiler503;
-public class AnnotationProcessorDependencyV1
-{
-}
\ No newline at end of file
+public class AnnotationProcessorDependencyV1 {}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
index 43f09f39..08c5067d 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mcompiler503;
-public class AnnotationProcessorDependencyV2
-{
-}
\ No newline at end of file
+public class AnnotationProcessorDependencyV2 {}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
index 05f205c0..74c44a4b 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,10 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Set;
+package mcompiler503;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
@@ -37,43 +33,37 @@
import javax.tools.JavaFileObject;
import javax.tools.StandardLocation;
-@SupportedSourceVersion( SourceVersion.RELEASE_6 )
-@SupportedAnnotationTypes( "mcompiler503.SimpleAnnotation" )
-public class SimpleAnnotationProcessor
- extends AbstractProcessor
-{
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Set;
+
+@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedAnnotationTypes("mcompiler503.SimpleAnnotation")
+public class SimpleAnnotationProcessor extends AbstractProcessor {
@Override
- public boolean process( Set extends TypeElement> annotations, RoundEnvironment roundEnv )
- {
- if ( annotations.isEmpty() )
- {
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ if (annotations.isEmpty()) {
return true;
}
// assert that mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is on the classpath
- try
- {
- getClass().getClassLoader().loadClass( "mcompiler503.AnnotationProcessorDependencyV2" );
- }
- catch ( ClassNotFoundException expected )
- {
- throw new RuntimeException( "Expected mcompiler503.AnnotationProcessorDependencyV2 to be on the"
+ try {
+ getClass().getClassLoader().loadClass("mcompiler503.AnnotationProcessorDependencyV2");
+ } catch (ClassNotFoundException expected) {
+ throw new RuntimeException("Expected mcompiler503.AnnotationProcessorDependencyV2 to be on the"
+ "processorpath, because mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is specifically"
- + "configured as one the elements of the processorpath." );
+ + "configured as one the elements of the processorpath.");
}
// assert that mcompiler503-annotation-processor-dep:1.0.0-SNAPSHOT is NOT on the classpath,
// since it should be replaced by mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT
// when resolving annotation processors and their dependencies
- try
- {
- getClass().getClassLoader().loadClass( "mcompiler503.AnnotationProcessorDependencyV1" );
- throw new RuntimeException( "Expected a ClassNotFoundException, because "
- + "mcompiler503.AnnotationProcessorDependencyV1 is not supposed to be on the processorpath." );
- }
- catch ( ClassNotFoundException expected )
- {
+ try {
+ getClass().getClassLoader().loadClass("mcompiler503.AnnotationProcessorDependencyV1");
+ throw new RuntimeException("Expected a ClassNotFoundException, because "
+ + "mcompiler503.AnnotationProcessorDependencyV1 is not supposed to be on the processorpath.");
+ } catch (ClassNotFoundException expected) {
// expected.
}
@@ -81,38 +71,35 @@ public boolean process( Set extends TypeElement> annotations, RoundEnvironment
Elements elementUtils = processingEnv.getElementUtils();
- Set extends Element> elements = roundEnv.getElementsAnnotatedWith( annotations.iterator().next() );
+ Set extends Element> elements =
+ roundEnv.getElementsAnnotatedWith(annotations.iterator().next());
- for ( Element element : elements )
- {
+ for (Element element : elements) {
Name name = element.getSimpleName();
- PackageElement packageElement = elementUtils.getPackageOf( element );
+ PackageElement packageElement = elementUtils.getPackageOf(element);
- try
- {
+ try {
Name packageName = packageElement.getQualifiedName();
FileObject resource =
- filer.createResource( StandardLocation.SOURCE_OUTPUT, packageName, name + ".txt", element );
+ filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + ".txt", element);
Writer writer = resource.openWriter();
- writer.write( name.toString() );
+ writer.write(name.toString());
writer.close();
String className = name + "Companion";
- JavaFileObject javaFile = filer.createSourceFile( packageName + "." + className, element );
+ JavaFileObject javaFile = filer.createSourceFile(packageName + "." + className, element);
Writer javaWriter = javaFile.openWriter();
- javaWriter.append( "package " ).append( packageName ).append( ";\n\n" );
- javaWriter.append( "public class " ).append( className ).append( " {\n" );
- javaWriter.append( " public " ).append( className ).append( "() {\n" );
- javaWriter.append( " System.out.println(\"Hey there!\");\n" );
- javaWriter.append( " }\n}\n" );
+ javaWriter.append("package ").append(packageName).append(";\n\n");
+ javaWriter.append("public class ").append(className).append(" {\n");
+ javaWriter.append(" public ").append(className).append("() {\n");
+ javaWriter.append(" System.out.println(\"Hey there!\");\n");
+ javaWriter.append(" }\n}\n");
javaWriter.close();
- }
- catch ( IOException e )
- {
- throw new RuntimeException( e );
+ } catch (IOException e) {
+ throw new RuntimeException(e);
}
}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
index 72649385..40846cd5 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mcompiler503;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -25,6 +25,4 @@
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
-public @interface SimpleAnnotation
-{
-}
+public @interface SimpleAnnotation {}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
index faa913f6..954d70e6 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,8 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mcompiler503;
@SimpleAnnotation
-public class SimpleObject
-{
-}
+public class SimpleObject {}
diff --git a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
index 5c47d303..43640f43 100644
--- a/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
+++ b/src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.java
@@ -1,4 +1,3 @@
-package mcompiler503;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,8 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mcompiler503;
@SimpleAnnotation
-public class SimpleTestObject
-{
-}
+public class SimpleTestObject {}
diff --git a/src/it/MCOMPILER-512/src/main/java/dummy/Main.java b/src/it/MCOMPILER-512/src/main/java/dummy/Main.java
index 7b36fb73..09cdacc5 100644
--- a/src/it/MCOMPILER-512/src/main/java/dummy/Main.java
+++ b/src/it/MCOMPILER-512/src/main/java/dummy/Main.java
@@ -1,5 +1,3 @@
-package dummy;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
+package dummy;
import javax.smartcardio.TerminalFactory;
-public class Main
-{
+public class Main {
- public static void main(String[] args)
- {
- TerminalFactory tf = TerminalFactory.getDefault();
+ public static void main(String[] args) {
+ TerminalFactory tf = TerminalFactory.getDefault();
}
-
}
diff --git a/src/it/MCOMPILER-512/src/test/java/dummy/Test.java b/src/it/MCOMPILER-512/src/test/java/dummy/Test.java
index a0cc02cf..eb7058cd 100644
--- a/src/it/MCOMPILER-512/src/test/java/dummy/Test.java
+++ b/src/it/MCOMPILER-512/src/test/java/dummy/Test.java
@@ -1,5 +1,3 @@
-package dummy;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,13 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
+package dummy;
import javax.smartcardio.TerminalFactory;
-public class Test
-{
- public void test()
- {
- TerminalFactory tf = TerminalFactory.getDefault();
+public class Test {
+ public void test() {
+ TerminalFactory tf = TerminalFactory.getDefault();
}
}
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
index 0c79335f..f84e9d09 100644
--- a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugins.compiler.it;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -26,7 +25,4 @@
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
-public @interface SimpleAnnotation
-{
-
-}
+public @interface SimpleAnnotation {}
diff --git a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
index 5d8760e5..9f507195 100644
--- a/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
+++ b/src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,9 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugins.compiler.it;
@SimpleAnnotation
-public class SimpleObject
-{
-
-}
+public class SimpleObject {}
diff --git a/src/it/automodules-application/src/main/java/module-info.java b/src/it/automodules-application/src/main/java/module-info.java
index 047359df..cd75a746 100644
--- a/src/it/automodules-application/src/main/java/module-info.java
+++ b/src/it/automodules-application/src/main/java/module-info.java
@@ -1,22 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module app
-{
- requires plexus.utils;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module app {
+ requires plexus.utils;
+}
diff --git a/src/it/automodules-application/src/main/java/org/maven/test/Main.java b/src/it/automodules-application/src/main/java/org/maven/test/Main.java
index eea50369..76cd55e4 100644
--- a/src/it/automodules-application/src/main/java/org/maven/test/Main.java
+++ b/src/it/automodules-application/src/main/java/org/maven/test/Main.java
@@ -1,32 +1,31 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.util.StringUtils;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- System.out.println( StringUtils.concatenate( args ) );
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+import org.codehaus.plexus.util.StringUtils;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ System.out.println(StringUtils.concatenate(args));
+ }
+}
diff --git a/src/it/automodules-library/src/main/java/module-info.java b/src/it/automodules-library/src/main/java/module-info.java
index 17205e31..ace11219 100644
--- a/src/it/automodules-library/src/main/java/module-info.java
+++ b/src/it/automodules-library/src/main/java/module-info.java
@@ -1,24 +1,23 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module lib
-{
- requires plexus.utils;
-
- exports org.maven.test;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module lib {
+ requires plexus.utils;
+
+ exports org.maven.test;
+}
diff --git a/src/it/automodules-library/src/main/java/org/maven/test/Main.java b/src/it/automodules-library/src/main/java/org/maven/test/Main.java
index 463feac7..76cd55e4 100644
--- a/src/it/automodules-library/src/main/java/org/maven/test/Main.java
+++ b/src/it/automodules-library/src/main/java/org/maven/test/Main.java
@@ -1,32 +1,31 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.util.StringUtils;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- System.out.println( StringUtils.concatenate( args ) );
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+import org.codehaus.plexus.util.StringUtils;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ System.out.println(StringUtils.concatenate(args));
+ }
+}
diff --git a/src/it/automodules-manifest/src/main/java/module-info.java b/src/it/automodules-manifest/src/main/java/module-info.java
index 5bd017f6..684f7e3b 100644
--- a/src/it/automodules-manifest/src/main/java/module-info.java
+++ b/src/it/automodules-manifest/src/main/java/module-info.java
@@ -1,22 +1,21 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module app
-{
- requires com.ta3;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module app {
+ requires com.ta3;
+}
diff --git a/src/it/automodules-manifest/src/main/java/org/maven/test/Main.java b/src/it/automodules-manifest/src/main/java/org/maven/test/Main.java
index b81a7208..642ee05f 100644
--- a/src/it/automodules-manifest/src/main/java/org/maven/test/Main.java
+++ b/src/it/automodules-manifest/src/main/java/org/maven/test/Main.java
@@ -1,28 +1,25 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class Main
-{
- public static void main( String[] args )
- {
- System.out.println( com.ta3.MyClass.class.getName() );
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println(com.ta3.MyClass.class.getName());
+ }
+}
diff --git a/src/it/automodules-transitive-module/src/main/java/module-info.java b/src/it/automodules-transitive-module/src/main/java/module-info.java
index 17205e31..ace11219 100644
--- a/src/it/automodules-transitive-module/src/main/java/module-info.java
+++ b/src/it/automodules-transitive-module/src/main/java/module-info.java
@@ -1,24 +1,23 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module lib
-{
- requires plexus.utils;
-
- exports org.maven.test;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module lib {
+ requires plexus.utils;
+
+ exports org.maven.test;
+}
diff --git a/src/it/automodules-transitive-module/src/main/java/org/maven/test/Main.java b/src/it/automodules-transitive-module/src/main/java/org/maven/test/Main.java
index 463feac7..76cd55e4 100644
--- a/src/it/automodules-transitive-module/src/main/java/org/maven/test/Main.java
+++ b/src/it/automodules-transitive-module/src/main/java/org/maven/test/Main.java
@@ -1,32 +1,31 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.util.StringUtils;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- System.out.println( StringUtils.concatenate( args ) );
- }
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+import org.codehaus.plexus.util.StringUtils;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ System.out.println(StringUtils.concatenate(args));
+ }
+}
diff --git a/src/it/default-fork-windows/src/main/java/MyClass.java b/src/it/default-fork-windows/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/default-fork-windows/src/main/java/MyClass.java
+++ b/src/it/default-fork-windows/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/default-fork-windows/src/test/java/MyTest.java b/src/it/default-fork-windows/src/test/java/MyTest.java
index 33d41784..77db4f1d 100644
--- a/src/it/default-fork-windows/src/test/java/MyTest.java
+++ b/src/it/default-fork-windows/src/test/java/MyTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,8 +20,4 @@
import junit.framework.TestCase;
-public class MyTest
- extends TestCase
-{
-
-}
+public class MyTest extends TestCase {}
diff --git a/src/it/default-fork/src/main/java/MyClass.java b/src/it/default-fork/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/default-fork/src/main/java/MyClass.java
+++ b/src/it/default-fork/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/default-fork/src/test/java/MyTest.java b/src/it/default-fork/src/test/java/MyTest.java
index 33d41784..77db4f1d 100644
--- a/src/it/default-fork/src/test/java/MyTest.java
+++ b/src/it/default-fork/src/test/java/MyTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,8 +20,4 @@
import junit.framework.TestCase;
-public class MyTest
- extends TestCase
-{
-
-}
+public class MyTest extends TestCase {}
diff --git a/src/it/default-incremental-disable/src/main/java/foo/MyClass.java b/src/it/default-incremental-disable/src/main/java/foo/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/default-incremental-disable/src/main/java/foo/MyClass.java
+++ b/src/it/default-incremental-disable/src/main/java/foo/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/default-incremental-disable/src/test/java/foo/MyTest.java b/src/it/default-incremental-disable/src/test/java/foo/MyTest.java
index 33d41784..77db4f1d 100644
--- a/src/it/default-incremental-disable/src/test/java/foo/MyTest.java
+++ b/src/it/default-incremental-disable/src/test/java/foo/MyTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,8 +20,4 @@
import junit.framework.TestCase;
-public class MyTest
- extends TestCase
-{
-
-}
+public class MyTest extends TestCase {}
diff --git a/src/it/default/src/main/java/MyClass.java b/src/it/default/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/default/src/main/java/MyClass.java
+++ b/src/it/default/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/default/src/test/java/MyTest.java b/src/it/default/src/test/java/MyTest.java
index 33d41784..77db4f1d 100644
--- a/src/it/default/src/test/java/MyTest.java
+++ b/src/it/default/src/test/java/MyTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,8 +20,4 @@
import junit.framework.TestCase;
-public class MyTest
- extends TestCase
-{
-
-}
+public class MyTest extends TestCase {}
diff --git a/src/it/groovy-project-with-new-plexus-compiler/verify.groovy b/src/it/groovy-project-with-new-plexus-compiler/verify.groovy
index 500f7f96..4ea3c478 100644
--- a/src/it/groovy-project-with-new-plexus-compiler/verify.groovy
+++ b/src/it/groovy-project-with-new-plexus-compiler/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/Person.java b/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/Person.java
index d1ecf61c..1fa3d8cf 100644
--- a/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/Person.java
+++ b/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/Person.java
@@ -1,5 +1,3 @@
-package org.apache.maven.it0055;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,19 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.it0055;
-
-public class Person
-{
+public class Person {
private String name;
-
- public void setName( String name )
- {
+
+ public void setName(String name) {
this.name = name;
}
-
- public String getName()
- {
+
+ public String getName() {
return name;
}
}
diff --git a/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/PersonTwo.java b/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/PersonTwo.java
index 7f1914b6..8bb36452 100644
--- a/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/PersonTwo.java
+++ b/src/it/includes-excludes/src/main/java/org/apache/maven/it0055/PersonTwo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.it0055;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,19 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.it0055;
-
-public class PersonTwo
-{
+public class PersonTwo {
private String name;
-
- public void setName( String name )
- {
+
+ public void setName(String name) {
this.name = name;
}
-
- public String getName()
- {
+
+ public String getName() {
return name;
}
}
diff --git a/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.java b/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.java
index c8c40ed0..f3601658 100644
--- a/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.java
+++ b/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.it0055;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,19 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.it0055;
import junit.framework.TestCase;
-public class PersonTest
- extends TestCase
-{
- public void testPerson()
- {
+public class PersonTest extends TestCase {
+ public void testPerson() {
Person person = new Person();
-
- person.setName( "foo" );
-
- assertEquals( "foo", person.getName() );
+
+ person.setName("foo");
+
+ assertEquals("foo", person.getName());
}
}
diff --git a/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.java b/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.java
index 6a51799c..a9096ee3 100644
--- a/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.java
+++ b/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.it0055;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,19 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.apache.maven.it0055;
import junit.framework.TestCase;
-public class PersonTwoTest
- extends TestCase
-{
- public void testPerson()
- {
+public class PersonTwoTest extends TestCase {
+ public void testPerson() {
Person person = new Person();
-
- person.setName( "foo" );
-
- assertEquals( "foo", person.getName() );
+
+ person.setName("foo");
+
+ assertEquals("foo", person.getName());
}
}
diff --git a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/App.java b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/App.java
index 814edb98..41ebecd3 100644
--- a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/App.java
+++ b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/App.java
@@ -1,5 +1,3 @@
-package com.mycompany.jdk16annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package com.mycompany.jdk16annotation;
/**
* Hello world!
*
*/
-public class App
-{
- public static void main( String[] args )
- {
- System.out.println( "Hello World!" );
+public class App {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
}
}
diff --git a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProvider.java b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProvider.java
index b87cc680..a7921fdb 100644
--- a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProvider.java
+++ b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProvider.java
@@ -1,5 +1,3 @@
-package com.mycompany.jdk16annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,19 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package com.mycompany.jdk16annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
-
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface ServiceProvider {
Class> service();
+
int position() default Integer.MAX_VALUE;
+
String path() default "";
}
diff --git a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProviderProcessor.java b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProviderProcessor.java
index 8f39d10c..f5777e90 100644
--- a/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProviderProcessor.java
+++ b/src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProviderProcessor.java
@@ -1,5 +1,3 @@
-package com.mycompany.jdk16annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,33 +16,31 @@
* specific language governing permissions and limitations
* under the License.
*/
+package com.mycompany.jdk16annotation;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
-
import javax.tools.Diagnostic.Kind;
import javax.tools.FileObject;
import javax.tools.StandardLocation;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class ServiceProviderProcessor extends AbstractProcessor {
public @Override Set getSupportedAnnotationTypes() {
- return new HashSet(Arrays.asList(
- ServiceProvider.class.getCanonicalName()
- ));
+ return new HashSet(Arrays.asList(ServiceProvider.class.getCanonicalName()));
}
/** public for ServiceLoader */
@@ -61,14 +57,18 @@ public boolean process(Set extends TypeElement> annotations, RoundEnvironment
} else {
return true;
}
-
}
private void writeServices() {
try {
- FileObject out = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", "META-INF/one",new Element[0]);
+ FileObject out = processingEnv
+ .getFiler()
+ .createResource(StandardLocation.CLASS_OUTPUT, "", "META-INF/one", new Element[0]);
OutputStream os = out.openOutputStream();
- OutputStream os2 = processingEnv.getFiler().createSourceFile("org.Milos", new Element[0]).openOutputStream();
+ OutputStream os2 = processingEnv
+ .getFiler()
+ .createSourceFile("org.Milos", new Element[0])
+ .openOutputStream();
OutputStreamWriter osr = new OutputStreamWriter(os2);
try {
PrintWriter w = new PrintWriter(new OutputStreamWriter(os, "UTF-8"));
@@ -82,10 +82,8 @@ private void writeServices() {
os.close();
}
-
} catch (IOException x) {
processingEnv.getMessager().printMessage(Kind.ERROR, "Failed to write to one: " + x.toString());
}
}
-
}
diff --git a/src/it/jdk16-annotation/src/test/java/com/mycompany/jdk16annotation/AppTest.java b/src/it/jdk16-annotation/src/test/java/com/mycompany/jdk16annotation/AppTest.java
index 9faeebec..63bde8ed 100644
--- a/src/it/jdk16-annotation/src/test/java/com/mycompany/jdk16annotation/AppTest.java
+++ b/src/it/jdk16-annotation/src/test/java/com/mycompany/jdk16annotation/AppTest.java
@@ -1,5 +1,3 @@
-package com.mycompany.jdk16annotation;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package com.mycompany.jdk16annotation;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -27,33 +25,28 @@
/**
* Unit test for simple App.
*/
-@ServiceProvider(service=App.class, path="xxx", position=1)
-public class AppTest
- extends TestCase
-{
+@ServiceProvider(service = App.class, path = "xxx", position = 1)
+public class AppTest extends TestCase {
/**
* Create the test case
*
* @param testName name of the test case
*/
- public AppTest( String testName )
- {
- super( testName );
+ public AppTest(String testName) {
+ super(testName);
}
/**
* @return the suite of tests being tested
*/
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
+ public static Test suite() {
+ return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
- public void testApp()
- {
- assertTrue( true );
+ public void testApp() {
+ assertTrue(true);
}
}
diff --git a/src/it/jdk9-exportsto/bar/src/main/java/module-info.java b/src/it/jdk9-exportsto/bar/src/main/java/module-info.java
index 22d23765..5cdec552 100644
--- a/src/it/jdk9-exportsto/bar/src/main/java/module-info.java
+++ b/src/it/jdk9-exportsto/bar/src/main/java/module-info.java
@@ -1,22 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module bar {
- requires foo;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module bar {
+ requires foo;
+}
diff --git a/src/it/jdk9-exportsto/foo/src/main/java/foo/Foo.java b/src/it/jdk9-exportsto/foo/src/main/java/foo/Foo.java
index 156976c8..0fd6b804 100644
--- a/src/it/jdk9-exportsto/foo/src/main/java/foo/Foo.java
+++ b/src/it/jdk9-exportsto/foo/src/main/java/foo/Foo.java
@@ -1,22 +1,21 @@
-package foo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class Foo {}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package foo;
+
+public class Foo {}
diff --git a/src/it/jdk9-exportsto/foo/src/main/java/module-info.java b/src/it/jdk9-exportsto/foo/src/main/java/module-info.java
index 17d226f2..48dd5786 100644
--- a/src/it/jdk9-exportsto/foo/src/main/java/module-info.java
+++ b/src/it/jdk9-exportsto/foo/src/main/java/module-info.java
@@ -1,22 +1,23 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module foo {
- exports foo to bar;
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module foo {
+ exports foo to
+ bar;
+}
diff --git a/src/it/jpms_add-exports/src/main/java/module-info.java b/src/it/jpms_add-exports/src/main/java/module-info.java
index c48284ef..cfa968a8 100644
--- a/src/it/jpms_add-exports/src/main/java/module-info.java
+++ b/src/it/jpms_add-exports/src/main/java/module-info.java
@@ -1,22 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module app
-{
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module app {}
diff --git a/src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java b/src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java
index 51d5c4a6..8fab0b26 100644
--- a/src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java
+++ b/src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java
@@ -1,36 +1,33 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- try {
- Class.forName( "jdk.internal.util.Preconditions" ).newInstance();
- }
- catch ( Exception e )
- {
- // noop
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ try {
+ Class.forName("jdk.internal.util.Preconditions").newInstance();
+ } catch (Exception e) {
+ // noop
+ }
+ }
+}
diff --git a/src/it/jpms_compile-main-empty-test-bar/src/test/java/bar/BarTests.java b/src/it/jpms_compile-main-empty-test-bar/src/test/java/bar/BarTests.java
index 872ca40f..2316ac32 100644
--- a/src/it/jpms_compile-main-empty-test-bar/src/test/java/bar/BarTests.java
+++ b/src/it/jpms_compile-main-empty-test-bar/src/test/java/bar/BarTests.java
@@ -19,15 +19,14 @@
package bar;
import javax.script.*;
+
import org.junit.jupiter.api.*;
-class BarTests
-{
+class BarTests {
@Test
- void scripting() throws ScriptException
- {
+ void scripting() throws ScriptException {
ScriptEngineManager factory = new ScriptEngineManager();
- ScriptEngine engine = factory.getEngineByName( "JavaScript" );
- Assertions.assertDoesNotThrow( () -> engine.eval( "print('Hello, World')" ), "Script evaluation failed!" );
+ ScriptEngine engine = factory.getEngineByName("JavaScript");
+ Assertions.assertDoesNotThrow(() -> engine.eval("print('Hello, World')"), "Script evaluation failed!");
}
}
diff --git a/src/it/jpms_compile-main-empty-test-bar/src/test/java/module-info.java b/src/it/jpms_compile-main-empty-test-bar/src/test/java/module-info.java
index ed157adf..55840434 100644
--- a/src/it/jpms_compile-main-empty-test-bar/src/test/java/module-info.java
+++ b/src/it/jpms_compile-main-empty-test-bar/src/test/java/module-info.java
@@ -17,8 +17,7 @@
* under the License.
*/
-open module bar
-{
+open module bar {
requires java.scripting;
requires org.junit.jupiter.api;
}
diff --git a/src/it/jpms_compile-main-foo-test-bar/src/main/java/foo/Foo.java b/src/it/jpms_compile-main-foo-test-bar/src/main/java/foo/Foo.java
index efcf8221..f361b016 100644
--- a/src/it/jpms_compile-main-foo-test-bar/src/main/java/foo/Foo.java
+++ b/src/it/jpms_compile-main-foo-test-bar/src/main/java/foo/Foo.java
@@ -16,15 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package foo;
import org.apache.commons.lang3.*;
-public class Foo
-{
- public Foo()
- {
- System.out.println( StringUtils.swapCase( "fOO" ) + " created!" );
+public class Foo {
+ public Foo() {
+ System.out.println(StringUtils.swapCase("fOO") + " created!");
}
}
diff --git a/src/it/jpms_compile-main-foo-test-bar/src/main/java/module-info.java b/src/it/jpms_compile-main-foo-test-bar/src/main/java/module-info.java
index ec0bd80f..fd24faa4 100644
--- a/src/it/jpms_compile-main-foo-test-bar/src/main/java/module-info.java
+++ b/src/it/jpms_compile-main-foo-test-bar/src/main/java/module-info.java
@@ -17,8 +17,8 @@
* under the License.
*/
-module foo
-{
+module foo {
requires org.apache.commons.lang3;
+
exports foo;
}
diff --git a/src/it/jpms_compile-main-foo-test-bar/src/test/java/bar/BarTests.java b/src/it/jpms_compile-main-foo-test-bar/src/test/java/bar/BarTests.java
index 25d48191..60ba2856 100644
--- a/src/it/jpms_compile-main-foo-test-bar/src/test/java/bar/BarTests.java
+++ b/src/it/jpms_compile-main-foo-test-bar/src/test/java/bar/BarTests.java
@@ -21,18 +21,15 @@
import foo.*;
import org.junit.jupiter.api.*;
-class BarTests
-{
+class BarTests {
@Test
- void constructor()
- {
- Assertions.assertNotNull( new Foo() );
+ void constructor() {
+ Assertions.assertNotNull(new Foo());
}
@Test
- void moduleNameIsFoo()
- {
- Assertions.assertTrue( Foo.class.getModule().isNamed(), "Foo resides in a named module" );
- Assertions.assertEquals( "foo", Foo.class.getModule().getName() );
+ void moduleNameIsFoo() {
+ Assertions.assertTrue(Foo.class.getModule().isNamed(), "Foo resides in a named module");
+ Assertions.assertEquals("foo", Foo.class.getModule().getName());
}
}
diff --git a/src/it/jpms_compile-main-foo-test-bar/src/test/java/module-info.java b/src/it/jpms_compile-main-foo-test-bar/src/test/java/module-info.java
index ed971d40..9bd6f9c1 100644
--- a/src/it/jpms_compile-main-foo-test-bar/src/test/java/module-info.java
+++ b/src/it/jpms_compile-main-foo-test-bar/src/test/java/module-info.java
@@ -17,8 +17,7 @@
* under the License.
*/
-open module bar
-{
+open module bar {
requires foo;
requires java.scripting;
requires org.junit.jupiter.api;
diff --git a/src/it/jpms_compile-main-foo-test-foo/src/main/java/foo/Foo.java b/src/it/jpms_compile-main-foo-test-foo/src/main/java/foo/Foo.java
index 8d00c098..5e99dc28 100644
--- a/src/it/jpms_compile-main-foo-test-foo/src/main/java/foo/Foo.java
+++ b/src/it/jpms_compile-main-foo-test-foo/src/main/java/foo/Foo.java
@@ -16,15 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package foo;
import org.apache.commons.lang3.*;
-class Foo
-{
- Foo()
- {
- System.out.println( StringUtils.swapCase( "fOO" ) + " created!" );
+class Foo {
+ Foo() {
+ System.out.println(StringUtils.swapCase("fOO") + " created!");
}
}
diff --git a/src/it/jpms_compile-main-foo-test-foo/src/main/java/module-info.java b/src/it/jpms_compile-main-foo-test-foo/src/main/java/module-info.java
index dbd4fea8..84db0b19 100644
--- a/src/it/jpms_compile-main-foo-test-foo/src/main/java/module-info.java
+++ b/src/it/jpms_compile-main-foo-test-foo/src/main/java/module-info.java
@@ -17,7 +17,6 @@
* under the License.
*/
-module foo
-{
+module foo {
requires org.apache.commons.lang3;
}
diff --git a/src/it/jpms_compile-main-foo-test-foo/src/test/java/foo/FooTests.java b/src/it/jpms_compile-main-foo-test-foo/src/test/java/foo/FooTests.java
index 78d1ae1c..98fb088f 100644
--- a/src/it/jpms_compile-main-foo-test-foo/src/test/java/foo/FooTests.java
+++ b/src/it/jpms_compile-main-foo-test-foo/src/test/java/foo/FooTests.java
@@ -20,18 +20,15 @@
import org.junit.jupiter.api.*;
-class FooTests
-{
+class FooTests {
@Test
- void constructor()
- {
- Assertions.assertNotNull( new Foo() );
+ void constructor() {
+ Assertions.assertNotNull(new Foo());
}
@Test
- void moduleNameIsFoo()
- {
- Assertions.assertTrue( Foo.class.getModule().isNamed(), "Foo resides in a named module" );
- Assertions.assertEquals( "foo", Foo.class.getModule().getName() );
+ void moduleNameIsFoo() {
+ Assertions.assertTrue(Foo.class.getModule().isNamed(), "Foo resides in a named module");
+ Assertions.assertEquals("foo", Foo.class.getModule().getName());
}
}
diff --git a/src/it/jpms_compile-main-foo-test-foo/src/test/java/module-info.java b/src/it/jpms_compile-main-foo-test-foo/src/test/java/module-info.java
index 1196f176..38ecd13f 100644
--- a/src/it/jpms_compile-main-foo-test-foo/src/test/java/module-info.java
+++ b/src/it/jpms_compile-main-foo-test-foo/src/test/java/module-info.java
@@ -17,8 +17,7 @@
* under the License.
*/
-open module foo
-{
+open module foo {
// main
requires org.apache.commons.lang3;
diff --git a/src/it/jpms_patch-module/src/main/java/module-info.java b/src/it/jpms_patch-module/src/main/java/module-info.java
index c48284ef..cfa968a8 100644
--- a/src/it/jpms_patch-module/src/main/java/module-info.java
+++ b/src/it/jpms_patch-module/src/main/java/module-info.java
@@ -1,22 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-module app
-{
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+module app {}
diff --git a/src/it/jpms_patch-module/src/main/java/org/maven/test/Main.java b/src/it/jpms_patch-module/src/main/java/org/maven/test/Main.java
index 51d5c4a6..8fab0b26 100644
--- a/src/it/jpms_patch-module/src/main/java/org/maven/test/Main.java
+++ b/src/it/jpms_patch-module/src/main/java/org/maven/test/Main.java
@@ -1,36 +1,33 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- try {
- Class.forName( "jdk.internal.util.Preconditions" ).newInstance();
- }
- catch ( Exception e )
- {
- // noop
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+public class Main {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ try {
+ Class.forName("jdk.internal.util.Preconditions").newInstance();
+ } catch (Exception e) {
+ // noop
+ }
+ }
+}
diff --git a/src/it/jpms_patch-module/src/test/java/org/maven/test/MainTest.java b/src/it/jpms_patch-module/src/test/java/org/maven/test/MainTest.java
index a6fd3af5..dbcfba6f 100644
--- a/src/it/jpms_patch-module/src/test/java/org/maven/test/MainTest.java
+++ b/src/it/jpms_patch-module/src/test/java/org/maven/test/MainTest.java
@@ -1,30 +1,29 @@
-package org.maven.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MainTest {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Main.main( args );
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.maven.test;
+
+public class MainTest {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ Main.main(args);
+ }
+}
diff --git a/src/it/mcompiler-106/src/main/java/MyClass.java b/src/it/mcompiler-106/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/mcompiler-106/src/main/java/MyClass.java
+++ b/src/it/mcompiler-106/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/mcompiler-120/src/main/java/org/maven/test/Main.java b/src/it/mcompiler-120/src/main/java/org/maven/test/Main.java
index 695e93d1..4298c7eb 100644
--- a/src/it/mcompiler-120/src/main/java/org/maven/test/Main.java
+++ b/src/it/mcompiler-120/src/main/java/org/maven/test/Main.java
@@ -1,5 +1,3 @@
-package org.maven.test;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,12 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.maven.test;
import java.util.ArrayList;
import java.util.List;
-
-
public class Main {
/**
* @param args
diff --git a/src/it/mcompiler-120/verify.groovy b/src/it/mcompiler-120/verify.groovy
index c04959f6..cd6ef26e 100644
--- a/src/it/mcompiler-120/verify.groovy
+++ b/src/it/mcompiler-120/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/mcompiler-135/src/main/java/MyClass.java b/src/it/mcompiler-135/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/mcompiler-135/src/main/java/MyClass.java
+++ b/src/it/mcompiler-135/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/it/mcompiler-179/src/main/java/org/maven/test/MyClass.java b/src/it/mcompiler-179/src/main/java/org/maven/test/MyClass.java
index bfa8aafc..386f9fed 100644
--- a/src/it/mcompiler-179/src/main/java/org/maven/test/MyClass.java
+++ b/src/it/mcompiler-179/src/main/java/org/maven/test/MyClass.java
@@ -1,5 +1,3 @@
-package org.maven.test;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -8,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
+package org.maven.test;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/it/mcompiler-182/src/main/java/BeanA.java b/src/it/mcompiler-182/src/main/java/BeanA.java
index aa6a35ee..c53e6bd6 100644
--- a/src/it/mcompiler-182/src/main/java/BeanA.java
+++ b/src/it/mcompiler-182/src/main/java/BeanA.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@
*/
public class BeanA {
- private int i,y;
+ private int i, y;
public int getI() {
return i;
diff --git a/src/it/mcompiler-182/src/main/java/BeanA2.java b/src/it/mcompiler-182/src/main/java/BeanA2.java
index 42731363..076a1fc2 100644
--- a/src/it/mcompiler-182/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-182/src/main/java/BeanA2.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/src/it/mcompiler-182/verify.groovy b/src/it/mcompiler-182/verify.groovy
index fdff21e0..40cb317c 100644
--- a/src/it/mcompiler-182/verify.groovy
+++ b/src/it/mcompiler-182/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java b/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
index aa6a35ee..c53e6bd6 100644
--- a/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
+++ b/src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@
*/
public class BeanA {
- private int i,y;
+ private int i, y;
public int getI() {
return i;
diff --git a/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java b/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
index 42731363..076a1fc2 100644
--- a/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/src/it/mcompiler-21_class-remove/verify.groovy b/src/it/mcompiler-21_class-remove/verify.groovy
index 306622da..3e4f8d17 100644
--- a/src/it/mcompiler-21_class-remove/verify.groovy
+++ b/src/it/mcompiler-21_class-remove/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
index aa6a35ee..c53e6bd6 100644
--- a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
+++ b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@
*/
public class BeanA {
- private int i,y;
+ private int i, y;
public int getI() {
return i;
diff --git a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
index 42731363..076a1fc2 100644
--- a/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
+++ b/src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/src/it/mcompiler-21_methodname-change/verify.groovy b/src/it/mcompiler-21_methodname-change/verify.groovy
index 306622da..3e4f8d17 100644
--- a/src/it/mcompiler-21_methodname-change/verify.groovy
+++ b/src/it/mcompiler-21_methodname-change/verify.groovy
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/base/Base.java b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/base/Base.java
index 513f9099..19ec7d8f 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/base/Base.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/base/Base.java
@@ -1,5 +1,3 @@
-package base;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package base;
public class Base {
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/A.java b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/A.java
index 6c2eb86b..0e48eee6 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
import base.Base;
-public class A implements I
-{
+public class A implements I {
public static String getString() {
return Base.get() + " -> 8";
}
-
+
@Override
public Class> introducedClass() {
return java.time.LocalDateTime.class;
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/I.java b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/I.java
index f9858cfc..a0523266 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/I.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/I.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
-public interface I
-{
+public interface I {
Class> introducedClass();
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-base/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/multimodule/multirelease-base/src/test/java/mr/ATest.java
index cca71135..c5ba719e 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-base/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-base/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,37 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
+package mr;
import org.junit.Ignore;
import org.junit.Test;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- public void testGet8() throws Exception
- {
-// assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
+ public void testGet8() throws Exception {
+ // assumeThat( javaVersion, is( "8" ) );
+
+ assertThat(A.getString(), is("BASE -> 8"));
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- @Ignore( "Maven module only creates Java 8 classes" )
- public void testGet9() throws Exception
- {
- assumeThat( javaVersion, is( "9" ) );
+ @Ignore("Maven module only creates Java 8 classes")
+ public void testGet9() throws Exception {
+ assumeThat(javaVersion, is("9"));
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.java b/src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.java
index e2b9598e..5083e1ce 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import base.Base;
+package mr;
import java.util.Optional;
-public class A implements I
-{
+import base.Base;
+
+public class A implements I {
public static String getString() {
- return Base.get() + " -> " + Optional.of( "9" ).get();
+ return Base.get() + " -> " + Optional.of("9").get();
}
-
+
@Override
public Class> introducedClass() {
return Module.class;
diff --git a/src/it/multirelease-patterns/multimodule/multirelease-nine/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/multimodule/multirelease-nine/src/test/java/mr/ATest.java
index ef26fe6d..c86fc468 100644
--- a/src/it/multirelease-patterns/multimodule/multirelease-nine/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/multimodule/multirelease-nine/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,37 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
+package mr;
import org.junit.Ignore;
import org.junit.Test;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- @Ignore( "Maven module only creates Java 9 classes" )
- public void testGet8() throws Exception
- {
- assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
-
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ @Ignore("Maven module only creates Java 9 classes")
+ public void testGet8() throws Exception {
+ assumeThat(javaVersion, is("8"));
+
+ assertThat(A.getString(), is("BASE -> 8"));
+
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- public void testGet9() throws Exception
- {
-// assumeThat( javaVersion, is( "9" ) );
+ public void testGet9() throws Exception {
+ // assumeThat( javaVersion, is( "9" ) );
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/base/Base.java b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/base/Base.java
index 513f9099..19ec7d8f 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/base/Base.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/base/Base.java
@@ -1,5 +1,3 @@
-package base;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package base;
public class Base {
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/A.java b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/A.java
index 6c2eb86b..0e48eee6 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
import base.Base;
-public class A implements I
-{
+public class A implements I {
public static String getString() {
return Base.get() + " -> 8";
}
-
+
@Override
public Class> introducedClass() {
return java.time.LocalDateTime.class;
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/I.java b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/I.java
index f9858cfc..a0523266 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/I.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/I.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
-public interface I
-{
+public interface I {
Class> introducedClass();
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-base/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/multiproject/multirelease-base/src/test/java/mr/ATest.java
index cca71135..c5ba719e 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-base/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-base/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,37 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
+package mr;
import org.junit.Ignore;
import org.junit.Test;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- public void testGet8() throws Exception
- {
-// assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
+ public void testGet8() throws Exception {
+ // assumeThat( javaVersion, is( "8" ) );
+
+ assertThat(A.getString(), is("BASE -> 8"));
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- @Ignore( "Maven module only creates Java 8 classes" )
- public void testGet9() throws Exception
- {
- assumeThat( javaVersion, is( "9" ) );
+ @Ignore("Maven module only creates Java 8 classes")
+ public void testGet9() throws Exception {
+ assumeThat(javaVersion, is("9"));
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-nine/src/main/java/mr/A.java b/src/it/multirelease-patterns/multiproject/multirelease-nine/src/main/java/mr/A.java
index e2b9598e..5083e1ce 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-nine/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-nine/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import base.Base;
+package mr;
import java.util.Optional;
-public class A implements I
-{
+import base.Base;
+
+public class A implements I {
public static String getString() {
- return Base.get() + " -> " + Optional.of( "9" ).get();
+ return Base.get() + " -> " + Optional.of("9").get();
}
-
+
@Override
public Class> introducedClass() {
return Module.class;
diff --git a/src/it/multirelease-patterns/multiproject/multirelease-nine/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/multiproject/multirelease-nine/src/test/java/mr/ATest.java
index ef26fe6d..c86fc468 100644
--- a/src/it/multirelease-patterns/multiproject/multirelease-nine/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/multiproject/multirelease-nine/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,37 +16,35 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
+package mr;
import org.junit.Ignore;
import org.junit.Test;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- @Ignore( "Maven module only creates Java 9 classes" )
- public void testGet8() throws Exception
- {
- assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
-
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ @Ignore("Maven module only creates Java 9 classes")
+ public void testGet8() throws Exception {
+ assumeThat(javaVersion, is("8"));
+
+ assertThat(A.getString(), is("BASE -> 8"));
+
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- public void testGet9() throws Exception
- {
-// assumeThat( javaVersion, is( "9" ) );
+ public void testGet9() throws Exception {
+ // assumeThat( javaVersion, is( "9" ) );
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/module-info.java b/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/module-info.java
index 2407e6b1..36f00e07 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/module-info.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/module-info.java
@@ -16,8 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-module example.mrjar
-{
- exports base;
- exports mr;
+module example.mrjar {
+ exports base;
+ exports mr;
}
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/mr/A.java b/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/mr/A.java
index e2b9598e..5083e1ce 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/mr/A.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/main/java-mr/9/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import base.Base;
+package mr;
import java.util.Optional;
-public class A implements I
-{
+import base.Base;
+
+public class A implements I {
public static String getString() {
- return Base.get() + " -> " + Optional.of( "9" ).get();
+ return Base.get() + " -> " + Optional.of("9").get();
}
-
+
@Override
public Class> introducedClass() {
return Module.class;
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/main/java/base/Base.java b/src/it/multirelease-patterns/packaging-plugin/src/main/java/base/Base.java
index 513f9099..19ec7d8f 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/main/java/base/Base.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/main/java/base/Base.java
@@ -1,5 +1,3 @@
-package base;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package base;
public class Base {
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/A.java b/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/A.java
index 6c2eb86b..0e48eee6 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
import base.Base;
-public class A implements I
-{
+public class A implements I {
public static String getString() {
return Base.get() + " -> 8";
}
-
+
@Override
public Class> introducedClass() {
return java.time.LocalDateTime.class;
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/I.java b/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/I.java
index f9858cfc..a0523266 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/I.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/main/java/mr/I.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
-public interface I
-{
+public interface I {
Class> introducedClass();
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/packaging-plugin/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/packaging-plugin/src/test/java/mr/ATest.java
index 07a207ca..510fb1c4 100644
--- a/src/it/multirelease-patterns/packaging-plugin/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/packaging-plugin/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,35 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
-
-import org.junit.Test;
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- public void testGet8() throws Exception
- {
- assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
+ public void testGet8() throws Exception {
+ assumeThat(javaVersion, is("8"));
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ assertThat(A.getString(), is("BASE -> 8"));
+
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- public void testGet9() throws Exception
- {
- assumeThat( javaVersion, is( "9" ) );
+ public void testGet9() throws Exception {
+ assumeThat(javaVersion, is("9"));
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/base/Base.java b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/base/Base.java
index 513f9099..19ec7d8f 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/base/Base.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/base/Base.java
@@ -1,5 +1,3 @@
-package base;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package base;
public class Base {
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/A.java b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/A.java
index 6c2eb86b..0e48eee6 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
import base.Base;
-public class A implements I
-{
+public class A implements I {
public static String getString() {
return Base.get() + " -> 8";
}
-
+
@Override
public Class> introducedClass() {
return java.time.LocalDateTime.class;
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/I.java b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/I.java
index f9858cfc..a0523266 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/I.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/I.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
-public interface I
-{
+public interface I {
Class> introducedClass();
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/module-info.java b/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/module-info.java
index 2407e6b1..36f00e07 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/module-info.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/module-info.java
@@ -16,8 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-module example.mrjar
-{
- exports base;
- exports mr;
+module example.mrjar {
+ exports base;
+ exports mr;
}
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/mr/A.java b/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/mr/A.java
index e2b9598e..5083e1ce 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/mr/A.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/main/java9/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import base.Base;
+package mr;
import java.util.Optional;
-public class A implements I
-{
+import base.Base;
+
+public class A implements I {
public static String getString() {
- return Base.get() + " -> " + Optional.of( "9" ).get();
+ return Base.get() + " -> " + Optional.of("9").get();
}
-
+
@Override
public Class> introducedClass() {
return Module.class;
diff --git a/src/it/multirelease-patterns/singleproject-runtime/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/singleproject-runtime/src/test/java/mr/ATest.java
index 07a207ca..510fb1c4 100644
--- a/src/it/multirelease-patterns/singleproject-runtime/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/singleproject-runtime/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,35 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
-
-import org.junit.Test;
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- public void testGet8() throws Exception
- {
- assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
+ public void testGet8() throws Exception {
+ assumeThat(javaVersion, is("8"));
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ assertThat(A.getString(), is("BASE -> 8"));
+
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- public void testGet9() throws Exception
- {
- assumeThat( javaVersion, is( "9" ) );
+ public void testGet9() throws Exception {
+ assumeThat(javaVersion, is("9"));
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/base/Base.java b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/base/Base.java
index 513f9099..19ec7d8f 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/base/Base.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/base/Base.java
@@ -1,5 +1,3 @@
-package base;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package base;
public class Base {
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/A.java b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/A.java
index 6c2eb86b..0e48eee6 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/A.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,15 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
import base.Base;
-public class A implements I
-{
+public class A implements I {
public static String getString() {
return Base.get() + " -> 8";
}
-
+
@Override
public Class> introducedClass() {
return java.time.LocalDateTime.class;
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/I.java b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/I.java
index f9858cfc..a0523266 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/I.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/I.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
-public interface I
-{
+public interface I {
Class> introducedClass();
-}
\ No newline at end of file
+}
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/module-info.java b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/module-info.java
index 2407e6b1..36f00e07 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/module-info.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/module-info.java
@@ -16,8 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-module example.mrjar
-{
- exports base;
- exports mr;
+module example.mrjar {
+ exports base;
+ exports mr;
}
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/mr/A.java b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/mr/A.java
index e2b9598e..5083e1ce 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/mr/A.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/mr/A.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,17 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import base.Base;
+package mr;
import java.util.Optional;
-public class A implements I
-{
+import base.Base;
+
+public class A implements I {
public static String getString() {
- return Base.get() + " -> " + Optional.of( "9" ).get();
+ return Base.get() + " -> " + Optional.of("9").get();
}
-
+
@Override
public Class> introducedClass() {
return Module.class;
diff --git a/src/it/multirelease-patterns/singleproject-toolchains/src/test/java/mr/ATest.java b/src/it/multirelease-patterns/singleproject-toolchains/src/test/java/mr/ATest.java
index 07a207ca..510fb1c4 100644
--- a/src/it/multirelease-patterns/singleproject-toolchains/src/test/java/mr/ATest.java
+++ b/src/it/multirelease-patterns/singleproject-toolchains/src/test/java/mr/ATest.java
@@ -1,5 +1,3 @@
-package mr;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,35 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
+package mr;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeThat;
-import static org.hamcrest.CoreMatchers.is;
-
-import org.junit.Test;
public class ATest {
-
- private static final String javaVersion = System.getProperty( "java.version" );
-
+
+ private static final String javaVersion = System.getProperty("java.version");
+
@Test
- public void testGet8() throws Exception
- {
- assumeThat( javaVersion, is( "8" ) );
-
- assertThat( A.getString(), is( "BASE -> 8" ) );
+ public void testGet8() throws Exception {
+ assumeThat(javaVersion, is("8"));
- assertThat( new A().introducedClass().getName(), is( "java.time.LocalDateTime" ) );
+ assertThat(A.getString(), is("BASE -> 8"));
+
+ assertThat(new A().introducedClass().getName(), is("java.time.LocalDateTime"));
}
-
+
@Test
- public void testGet9() throws Exception
- {
- assumeThat( javaVersion, is( "9" ) );
+ public void testGet9() throws Exception {
+ assumeThat(javaVersion, is("9"));
- assertThat( A.getString(), is( "BASE -> 9" ) );
+ assertThat(A.getString(), is("BASE -> 9"));
- assertThat( new A().introducedClass().getName(), is( "java.lang.Module" ) );
+ assertThat(new A().introducedClass().getName(), is("java.lang.Module"));
}
-
-}
\ No newline at end of file
+}
diff --git a/src/it/non-english-warnings/src/main/java/MyClass.java b/src/it/non-english-warnings/src/main/java/MyClass.java
index 62c02eea..16ecae3e 100644
--- a/src/it/non-english-warnings/src/main/java/MyClass.java
+++ b/src/it/non-english-warnings/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,13 +18,10 @@
*/
package foo;
-public class MyClass
-{
+public class MyClass {
- public static void main( String[] args )
- {
+ public static void main(String[] args) {
// the date constructor is deprecated and will cause a warning
- System.out.println( new java.util.Date( 2010, 8, 29 ) );
+ System.out.println(new java.util.Date(2010, 8, 29));
}
-
}
diff --git a/src/it/non-english-warnings/src/test/java/MyTest.java b/src/it/non-english-warnings/src/test/java/MyTest.java
index a51de2bb..b9427e90 100644
--- a/src/it/non-english-warnings/src/test/java/MyTest.java
+++ b/src/it/non-english-warnings/src/test/java/MyTest.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,13 +18,10 @@
*/
package foo;
-public class MyTest
-{
+public class MyTest {
- public static void main( String[] args )
- {
+ public static void main(String[] args) {
// the date constructor is deprecated and will cause a warning
- System.out.println( new java.util.Date( 2010, 8, 29 ) );
+ System.out.println(new java.util.Date(2010, 8, 29));
}
-
}
diff --git a/src/it/non-english-warnings/verify.bsh b/src/it/non-english-warnings/verify.bsh
index 919db9da..db162700 100644
--- a/src/it/non-english-warnings/verify.bsh
+++ b/src/it/non-english-warnings/verify.bsh
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package foo;
import java.io.*;
import java.util.*;
diff --git a/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java b/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
index 668809a8..46b7d2b6 100644
--- a/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
+++ b/src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.java
@@ -1,4 +1,3 @@
-package org.apache.maven.plugins.compiler.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -17,25 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugins.compiler.it;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.List;
-import java.util.StringJoiner;
import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
-@Mojo( name = "read-source", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES )
-public class SourcePathReadGoal
- extends AbstractMojo
-{
+@Mojo(name = "read-source", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES)
+public class SourcePathReadGoal extends AbstractMojo {
@Parameter
protected String sourceClass;
@@ -43,62 +40,49 @@ public class SourcePathReadGoal
@Parameter
protected String testSourceClass;
- @Parameter( defaultValue = "${project}" )
+ @Parameter(defaultValue = "${project}")
protected MavenProject project;
- @SuppressWarnings( "unchecked" )
- public void execute()
- throws MojoExecutionException, MojoFailureException
- {
- if ( sourceClass != null )
- {
- getLog().info( "Checking compile source roots for: '" + sourceClass + "'" );
- assertGeneratedSourceFileFor( sourceClass, project.getCompileSourceRoots() );
+ @SuppressWarnings("unchecked")
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ if (sourceClass != null) {
+ getLog().info("Checking compile source roots for: '" + sourceClass + "'");
+ assertGeneratedSourceFileFor(sourceClass, project.getCompileSourceRoots());
}
- if ( testSourceClass != null )
- {
- getLog().info( "Checking test-compile source roots for: '" + testSourceClass + "'" );
- assertGeneratedSourceFileFor( testSourceClass, project.getTestCompileSourceRoots() );
+ if (testSourceClass != null) {
+ getLog().info("Checking test-compile source roots for: '" + testSourceClass + "'");
+ assertGeneratedSourceFileFor(testSourceClass, project.getTestCompileSourceRoots());
}
}
- private void assertGeneratedSourceFileFor( String sourceClass, List sourceRoots )
- throws MojoFailureException, MojoExecutionException
- {
- String sourceFile = sourceClass.replace( '.', '/' )
- .concat( ".txt" );
+ private void assertGeneratedSourceFileFor(String sourceClass, List sourceRoots)
+ throws MojoFailureException, MojoExecutionException {
+ String sourceFile = sourceClass.replace('.', '/').concat(".txt");
boolean found = false;
- for ( String root : sourceRoots )
- {
- File f = new File( root, sourceFile );
- getLog().info( "Looking for: " + f );
- if ( f.exists() )
- {
- try
- {
- String[] nameParts = sourceClass.split( "\\." );
- String content = new String( Files.readAllBytes( f.toPath() ) );
- if ( !nameParts[nameParts.length-1].equals( content ) )
- {
- throw new MojoFailureException( "Non-matching content in: " + f + "\n expected: '"
- + sourceClass + "'\n found: '" + content + "'" );
+ for (String root : sourceRoots) {
+ File f = new File(root, sourceFile);
+ getLog().info("Looking for: " + f);
+ if (f.exists()) {
+ try {
+ String[] nameParts = sourceClass.split("\\.");
+ String content = new String(Files.readAllBytes(f.toPath()));
+ if (!nameParts[nameParts.length - 1].equals(content)) {
+ throw new MojoFailureException("Non-matching content in: " + f + "\n expected: '" + sourceClass
+ + "'\n found: '" + content + "'");
}
found = true;
break;
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Cannot read contents of: " + f, e );
+ } catch (IOException e) {
+ throw new MojoExecutionException("Cannot read contents of: " + f, e);
}
}
}
- if ( !found )
- {
- throw new MojoFailureException( "Cannot find generated source file: " + sourceFile + " in:\n "
- + String.join( "\n ", sourceRoots ) );
+ if (!found) {
+ throw new MojoFailureException(
+ "Cannot find generated source file: " + sourceFile + " in:\n " + String.join("\n ", sourceRoots));
}
}
}
diff --git a/src/it/setup_jar_automodule/src/main/java/com/ta3/MyClass.java b/src/it/setup_jar_automodule/src/main/java/com/ta3/MyClass.java
index e6cbd8bd..728c244a 100644
--- a/src/it/setup_jar_automodule/src/main/java/com/ta3/MyClass.java
+++ b/src/it/setup_jar_automodule/src/main/java/com/ta3/MyClass.java
@@ -1,25 +1,21 @@
-package com.ta3;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.ta3;
+
+public class MyClass {}
diff --git a/src/it/setup_jar_module/src/main/java/com/ta2/MyClass.java b/src/it/setup_jar_module/src/main/java/com/ta2/MyClass.java
index 4309cae8..5d1cc1fa 100644
--- a/src/it/setup_jar_module/src/main/java/com/ta2/MyClass.java
+++ b/src/it/setup_jar_module/src/main/java/com/ta2/MyClass.java
@@ -1,25 +1,21 @@
-package com.ta2;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.ta2;
+
+public class MyClass {}
diff --git a/src/it/setup_jar_module/src/main/java/module-info.java b/src/it/setup_jar_module/src/main/java/module-info.java
index 85677180..11a00624 100644
--- a/src/it/setup_jar_module/src/main/java/module-info.java
+++ b/src/it/setup_jar_module/src/main/java/module-info.java
@@ -1,24 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module ta2 {
-
- exports com.ta2;
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module ta2 {
+ exports com.ta2;
+}
diff --git a/src/it/setup_x/setup_jar_classic/src/main/java/com/ta2/MyClass.java b/src/it/setup_x/setup_jar_classic/src/main/java/com/ta2/MyClass.java
index 4309cae8..5d1cc1fa 100644
--- a/src/it/setup_x/setup_jar_classic/src/main/java/com/ta2/MyClass.java
+++ b/src/it/setup_x/setup_jar_classic/src/main/java/com/ta2/MyClass.java
@@ -1,25 +1,21 @@
-package com.ta2;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.ta2;
+
+public class MyClass {}
diff --git a/src/it/setup_x/setup_module-transitive/src/main/java/com/ta2/plus/MyClass.java b/src/it/setup_x/setup_module-transitive/src/main/java/com/ta2/plus/MyClass.java
index ce9abfee..2ec4f195 100644
--- a/src/it/setup_x/setup_module-transitive/src/main/java/com/ta2/plus/MyClass.java
+++ b/src/it/setup_x/setup_module-transitive/src/main/java/com/ta2/plus/MyClass.java
@@ -1,25 +1,21 @@
-package com.ta2.plus;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-public class MyClass
-{
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.ta2.plus;
+
+public class MyClass {}
diff --git a/src/it/setup_x/setup_module-transitive/src/main/java/module-info.java b/src/it/setup_x/setup_module-transitive/src/main/java/module-info.java
index 642a635d..bf7ff9d6 100644
--- a/src/it/setup_x/setup_module-transitive/src/main/java/module-info.java
+++ b/src/it/setup_x/setup_module-transitive/src/main/java/module-info.java
@@ -1,24 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module ta2.plus {
-
- exports com.ta2.plus;
-
-}
\ No newline at end of file
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+module ta2.plus {
+ exports com.ta2.plus;
+}
diff --git a/src/it/test1/src/main/java/MyClass.java b/src/it/test1/src/main/java/MyClass.java
index 90a93702..d4132bb2 100644
--- a/src/it/test1/src/main/java/MyClass.java
+++ b/src/it/test1/src/main/java/MyClass.java
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,7 +18,4 @@
*/
package foo;
-public class MyClass
-{
-
-}
+public class MyClass {}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 03cd6af1..b199e24d 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler;
import java.io.File;
import java.io.IOException;
@@ -98,10 +97,8 @@
* @author Trygve Laugstøl
* @since 2.0
*/
-public abstract class AbstractCompilerMojo
- extends AbstractMojo
-{
- protected static final String PS = System.getProperty( "path.separator" );
+public abstract class AbstractCompilerMojo extends AbstractMojo {
+ protected static final String PS = System.getProperty("path.separator");
private static final String INPUT_FILES_LST_FILENAME = "inputFiles.lst";
@@ -111,7 +108,7 @@ public abstract class AbstractCompilerMojo
// Used to compare with older targets
static final String MODULE_INFO_TARGET = "1.9";
-
+
// ----------------------------------------------------------------------
// Configurables
// ----------------------------------------------------------------------
@@ -121,48 +118,47 @@ public abstract class AbstractCompilerMojo
*
* @since 2.0.2
*/
- @Parameter( property = "maven.compiler.failOnError", defaultValue = "true" )
+ @Parameter(property = "maven.compiler.failOnError", defaultValue = "true")
private boolean failOnError = true;
-
+
/**
* Indicates whether the build will continue even if there are compilation warnings.
*
* @since 3.6
*/
- @Parameter( property = "maven.compiler.failOnWarning", defaultValue = "false" )
- private boolean failOnWarning;
+ @Parameter(property = "maven.compiler.failOnWarning", defaultValue = "false")
+ private boolean failOnWarning;
/**
* Set to true to include debugging information in the compiled class files.
*/
- @Parameter( property = "maven.compiler.debug", defaultValue = "true" )
+ @Parameter(property = "maven.compiler.debug", defaultValue = "true")
private boolean debug = true;
/**
* Set to true to generate metadata for reflection on method parameters.
* @since 3.6.2
*/
- @Parameter( property = "maven.compiler.parameters", defaultValue = "false" )
+ @Parameter(property = "maven.compiler.parameters", defaultValue = "false")
private boolean parameters;
-
/**
* Set to true to Enable preview language features of the java compiler
* @since 3.10.1
*/
- @Parameter( property = "maven.compiler.enablePreview", defaultValue = "false" )
+ @Parameter(property = "maven.compiler.enablePreview", defaultValue = "false")
private boolean enablePreview;
/**
* Set to true to show messages about what the compiler is doing.
*/
- @Parameter( property = "maven.compiler.verbose", defaultValue = "false" )
+ @Parameter(property = "maven.compiler.verbose", defaultValue = "false")
private boolean verbose;
/**
* Sets whether to show source locations where deprecated APIs are used.
*/
- @Parameter( property = "maven.compiler.showDeprecation", defaultValue = "false" )
+ @Parameter(property = "maven.compiler.showDeprecation", defaultValue = "false")
private boolean showDeprecation;
/**
@@ -170,13 +166,13 @@ public abstract class AbstractCompilerMojo
* @deprecated This property is a no-op in {@code javac}.
*/
@Deprecated
- @Parameter( property = "maven.compiler.optimize", defaultValue = "false" )
+ @Parameter(property = "maven.compiler.optimize", defaultValue = "false")
private boolean optimize;
/**
* Set to false to disable warnings during compilation.
*/
- @Parameter( property = "maven.compiler.showWarnings", defaultValue = "true" )
+ @Parameter(property = "maven.compiler.showWarnings", defaultValue = "true")
private boolean showWarnings;
/**
@@ -187,7 +183,7 @@ public abstract class AbstractCompilerMojo
*
Since 3.9.0 the default value has changed from 1.6 to 1.7
*
Since 3.11.0 the default value has changed from 1.7 to 1.8
* <configuration>
* <jdkToolchain>
@@ -451,7 +447,7 @@ public abstract class AbstractCompilerMojo
* </configuration>
*
* note: requires at least Maven 3.3.1
- *
+ *
* @since 3.6
*/
@Parameter
@@ -464,13 +460,13 @@ public abstract class AbstractCompilerMojo
/**
* The directory to run the compiler from if fork is true.
*/
- @Parameter( defaultValue = "${basedir}", required = true, readonly = true )
+ @Parameter(defaultValue = "${basedir}", required = true, readonly = true)
private File basedir;
/**
* The target directory of the compiler if fork is true.
*/
- @Parameter( defaultValue = "${project.build.directory}", required = true, readonly = true )
+ @Parameter(defaultValue = "${project.build.directory}", required = true, readonly = true)
private File buildDirectory;
/**
@@ -482,14 +478,14 @@ public abstract class AbstractCompilerMojo
/**
* The current build session instance. This is used for toolchain manager API calls.
*/
- @Parameter( defaultValue = "${session}", readonly = true, required = true )
+ @Parameter(defaultValue = "${session}", readonly = true, required = true)
private MavenSession session;
/**
* The current project instance. This is used for propagating generated-sources paths as compile/testCompile source
* roots.
*/
- @Parameter( defaultValue = "${project}", readonly = true, required = true )
+ @Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
/**
@@ -505,13 +501,13 @@ public abstract class AbstractCompilerMojo
*
* @since 2.5
*/
- @Parameter( defaultValue = "${reuseCreated}", property = "maven.compiler.compilerReuseStrategy" )
+ @Parameter(defaultValue = "${reuseCreated}", property = "maven.compiler.compilerReuseStrategy")
private String compilerReuseStrategy = "reuseCreated";
/**
* @since 2.5
*/
- @Parameter( defaultValue = "false", property = "maven.compiler.skipMultiThreadWarning" )
+ @Parameter(defaultValue = "false", property = "maven.compiler.skipMultiThreadWarning")
private boolean skipMultiThreadWarning;
/**
@@ -520,13 +516,13 @@ public abstract class AbstractCompilerMojo
*
* @since 3.0
*/
- @Parameter( defaultValue = "false", property = "maven.compiler.forceJavacCompilerUse" )
+ @Parameter(defaultValue = "false", property = "maven.compiler.forceJavacCompilerUse")
private boolean forceJavacCompilerUse;
/**
* @since 3.0 needed for storing the status for the incremental build support.
*/
- @Parameter( defaultValue = "${mojoExecution}", readonly = true, required = true )
+ @Parameter(defaultValue = "${mojoExecution}", readonly = true, required = true)
private MojoExecution mojoExecution;
/**
@@ -554,7 +550,7 @@ public abstract class AbstractCompilerMojo
*
* @since 3.1
*/
- @Parameter( defaultValue = "true", property = "maven.compiler.useIncrementalCompilation" )
+ @Parameter(defaultValue = "true", property = "maven.compiler.useIncrementalCompilation")
private boolean useIncrementalCompilation = true;
/**
@@ -566,10 +562,10 @@ public abstract class AbstractCompilerMojo
*
* @since 3.10
*/
- @Parameter( defaultValue = "true", property = "maven.compiler.createMissingPackageInfoClass" )
+ @Parameter(defaultValue = "true", property = "maven.compiler.createMissingPackageInfoClass")
private boolean createMissingPackageInfoClass = true;
- @Parameter( defaultValue = "false", property = "maven.compiler.showCompilationChanges" )
+ @Parameter(defaultValue = "false", property = "maven.compiler.showCompilationChanges")
private boolean showCompilationChanges = false;
/**
* Resolves the artifacts needed.
@@ -583,9 +579,9 @@ public abstract class AbstractCompilerMojo
@Component
private ArtifactHandlerManager artifactHandlerManager;
- protected abstract SourceInclusionScanner getSourceInclusionScanner( int staleMillis );
+ protected abstract SourceInclusionScanner getSourceInclusionScanner(int staleMillis);
- protected abstract SourceInclusionScanner getSourceInclusionScanner( String inputFileEnding );
+ protected abstract SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding);
protected abstract List getClasspathElements();
@@ -594,8 +590,8 @@ public abstract class AbstractCompilerMojo
protected abstract Map getPathElements();
protected abstract List getCompileSourceRoots();
-
- protected abstract void preparePaths( Set sourceFiles );
+
+ protected abstract void preparePaths(Set sourceFiles);
protected abstract File getOutputDirectory();
@@ -613,17 +609,14 @@ public abstract class AbstractCompilerMojo
protected abstract String getDebugFileName();
- protected final MavenProject getProject()
- {
+ protected final MavenProject getProject() {
return project;
}
private boolean targetOrReleaseSet;
@Override
- public void execute()
- throws MojoExecutionException, CompilationFailureException
- {
+ public void execute() throws MojoExecutionException, CompilationFailureException {
// ----------------------------------------------------------------------
// Look up the compiler. This is done before other code than can
// cause the mojo to return before the lookup is done possibly resulting
@@ -632,57 +625,50 @@ public void execute()
Compiler compiler;
- getLog().debug( "Using compiler '" + compilerId + "'." );
+ getLog().debug("Using compiler '" + compilerId + "'.");
- try
- {
- compiler = compilerManager.getCompiler( compilerId );
- }
- catch ( NoSuchCompilerException e )
- {
- throw new MojoExecutionException( "No such compiler '" + e.getCompilerId() + "'." );
+ try {
+ compiler = compilerManager.getCompiler(compilerId);
+ } catch (NoSuchCompilerException e) {
+ throw new MojoExecutionException("No such compiler '" + e.getCompilerId() + "'.");
}
- //-----------toolchains start here ----------------------------------
- //use the compilerId as identifier for toolchains as well.
+ // -----------toolchains start here ----------------------------------
+ // use the compilerId as identifier for toolchains as well.
Toolchain tc = getToolchain();
- if ( tc != null )
- {
- getLog().info( "Toolchain in maven-compiler-plugin: " + tc );
- if ( executable != null )
- {
- getLog().warn( "Toolchains are ignored, 'executable' parameter is set to " + executable );
- }
- else
- {
+ if (tc != null) {
+ getLog().info("Toolchain in maven-compiler-plugin: " + tc);
+ if (executable != null) {
+ getLog().warn("Toolchains are ignored, 'executable' parameter is set to " + executable);
+ } else {
fork = true;
- //TODO somehow shaky dependency between compilerId and tool executable.
- executable = tc.findTool( compilerId );
+ // TODO somehow shaky dependency between compilerId and tool executable.
+ executable = tc.findTool(compilerId);
}
}
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
- List compileSourceRoots = removeEmptyCompileSourceRoots( getCompileSourceRoots() );
+ List compileSourceRoots = removeEmptyCompileSourceRoots(getCompileSourceRoots());
- if ( compileSourceRoots.isEmpty() )
- {
- getLog().info( "No sources to compile" );
+ if (compileSourceRoots.isEmpty()) {
+ getLog().info("No sources to compile");
return;
}
// Verify that target or release is set
- if ( !targetOrReleaseSet )
- {
- MessageBuilder mb = MessageUtils.buffer().a( "No explicit value set for target or release! " )
- .a( "To ensure the same result even after upgrading this plugin, please add " ).newline()
- .newline();
+ if (!targetOrReleaseSet) {
+ MessageBuilder mb = MessageUtils.buffer()
+ .a("No explicit value set for target or release! ")
+ .a("To ensure the same result even after upgrading this plugin, please add ")
+ .newline()
+ .newline();
- writePlugin( mb );
+ writePlugin(mb);
- getLog().warn( mb.toString() );
+ getLog().warn(mb.toString());
}
// ----------------------------------------------------------------------
@@ -691,721 +677,575 @@ public void execute()
CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
- compilerConfiguration.setOutputLocation( getOutputDirectory().getAbsolutePath() );
+ compilerConfiguration.setOutputLocation(getOutputDirectory().getAbsolutePath());
- compilerConfiguration.setOptimize( optimize );
+ compilerConfiguration.setOptimize(optimize);
- compilerConfiguration.setDebug( debug );
+ compilerConfiguration.setDebug(debug);
- compilerConfiguration.setDebugFileName( getDebugFileName() );
+ compilerConfiguration.setDebugFileName(getDebugFileName());
- compilerConfiguration.setImplicitOption( implicit );
+ compilerConfiguration.setImplicitOption(implicit);
- if ( debug && StringUtils.isNotEmpty( debuglevel ) )
- {
- String[] split = StringUtils.split( debuglevel, "," );
- for ( String aSplit : split )
- {
- if ( !( aSplit.equalsIgnoreCase( "none" ) || aSplit.equalsIgnoreCase( "lines" )
- || aSplit.equalsIgnoreCase( "vars" ) || aSplit.equalsIgnoreCase( "source" ) ) )
- {
- throw new IllegalArgumentException( "The specified debug level: '" + aSplit + "' is unsupported. "
- + "Legal values are 'none', 'lines', 'vars', and 'source'." );
+ if (debug && StringUtils.isNotEmpty(debuglevel)) {
+ String[] split = StringUtils.split(debuglevel, ",");
+ for (String aSplit : split) {
+ if (!(aSplit.equalsIgnoreCase("none")
+ || aSplit.equalsIgnoreCase("lines")
+ || aSplit.equalsIgnoreCase("vars")
+ || aSplit.equalsIgnoreCase("source"))) {
+ throw new IllegalArgumentException("The specified debug level: '" + aSplit + "' is unsupported. "
+ + "Legal values are 'none', 'lines', 'vars', and 'source'.");
}
}
- compilerConfiguration.setDebugLevel( debuglevel );
+ compilerConfiguration.setDebugLevel(debuglevel);
}
- compilerConfiguration.setParameters( parameters );
+ compilerConfiguration.setParameters(parameters);
- compilerConfiguration.setEnablePreview( enablePreview );
+ compilerConfiguration.setEnablePreview(enablePreview);
- compilerConfiguration.setVerbose( verbose );
+ compilerConfiguration.setVerbose(verbose);
- compilerConfiguration.setShowWarnings( showWarnings );
+ compilerConfiguration.setShowWarnings(showWarnings);
- compilerConfiguration.setFailOnWarning( failOnWarning );
+ compilerConfiguration.setFailOnWarning(failOnWarning);
- if ( failOnWarning && !showWarnings )
- {
- getLog().warn( "The property failOnWarning is set to true, but showWarnings is set to false." );
- getLog().warn( "With compiler's warnings silenced the failOnWarning has no effect." );
+ if (failOnWarning && !showWarnings) {
+ getLog().warn("The property failOnWarning is set to true, but showWarnings is set to false.");
+ getLog().warn("With compiler's warnings silenced the failOnWarning has no effect.");
}
- compilerConfiguration.setShowDeprecation( showDeprecation );
+ compilerConfiguration.setShowDeprecation(showDeprecation);
- compilerConfiguration.setSourceVersion( getSource() );
+ compilerConfiguration.setSourceVersion(getSource());
- compilerConfiguration.setTargetVersion( getTarget() );
-
- compilerConfiguration.setReleaseVersion( getRelease() );
+ compilerConfiguration.setTargetVersion(getTarget());
- compilerConfiguration.setProc( proc );
+ compilerConfiguration.setReleaseVersion(getRelease());
+
+ compilerConfiguration.setProc(proc);
File generatedSourcesDirectory = getGeneratedSourcesDirectory();
- compilerConfiguration.setGeneratedSourcesDirectory( generatedSourcesDirectory != null
- ? generatedSourcesDirectory.getAbsoluteFile() : null );
+ compilerConfiguration.setGeneratedSourcesDirectory(
+ generatedSourcesDirectory != null ? generatedSourcesDirectory.getAbsoluteFile() : null);
- if ( generatedSourcesDirectory != null )
- {
- if ( !generatedSourcesDirectory.exists() )
- {
+ if (generatedSourcesDirectory != null) {
+ if (!generatedSourcesDirectory.exists()) {
generatedSourcesDirectory.mkdirs();
}
String generatedSourcesPath = generatedSourcesDirectory.getAbsolutePath();
- compileSourceRoots.add( generatedSourcesPath );
+ compileSourceRoots.add(generatedSourcesPath);
- if ( isTestCompile() )
- {
- getLog().debug( "Adding " + generatedSourcesPath + " to test-compile source roots:\n "
- + StringUtils.join( project.getTestCompileSourceRoots()
- .iterator(), "\n " ) );
+ if (isTestCompile()) {
+ getLog().debug("Adding " + generatedSourcesPath + " to test-compile source roots:\n "
+ + StringUtils.join(project.getTestCompileSourceRoots().iterator(), "\n "));
- project.addTestCompileSourceRoot( generatedSourcesPath );
+ project.addTestCompileSourceRoot(generatedSourcesPath);
- getLog().debug( "New test-compile source roots:\n "
- + StringUtils.join( project.getTestCompileSourceRoots()
- .iterator(), "\n " ) );
- }
- else
- {
- getLog().debug( "Adding " + generatedSourcesPath + " to compile source roots:\n "
- + StringUtils.join( project.getCompileSourceRoots()
- .iterator(), "\n " ) );
+ getLog().debug("New test-compile source roots:\n "
+ + StringUtils.join(project.getTestCompileSourceRoots().iterator(), "\n "));
+ } else {
+ getLog().debug("Adding " + generatedSourcesPath + " to compile source roots:\n "
+ + StringUtils.join(project.getCompileSourceRoots().iterator(), "\n "));
- project.addCompileSourceRoot( generatedSourcesPath );
+ project.addCompileSourceRoot(generatedSourcesPath);
- getLog().debug( "New compile source roots:\n " + StringUtils.join( project.getCompileSourceRoots()
- .iterator(), "\n " ) );
+ getLog().debug("New compile source roots:\n "
+ + StringUtils.join(project.getCompileSourceRoots().iterator(), "\n "));
}
}
- compilerConfiguration.setSourceLocations( compileSourceRoots );
+ compilerConfiguration.setSourceLocations(compileSourceRoots);
- compilerConfiguration.setAnnotationProcessors( annotationProcessors );
+ compilerConfiguration.setAnnotationProcessors(annotationProcessors);
- compilerConfiguration.setProcessorPathEntries( resolveProcessorPathEntries() );
+ compilerConfiguration.setProcessorPathEntries(resolveProcessorPathEntries());
- compilerConfiguration.setSourceEncoding( encoding );
+ compilerConfiguration.setSourceEncoding(encoding);
- compilerConfiguration.setFork( fork );
+ compilerConfiguration.setFork(fork);
- if ( fork )
- {
- if ( !StringUtils.isEmpty( meminitial ) )
- {
- String value = getMemoryValue( meminitial );
+ if (fork) {
+ if (!StringUtils.isEmpty(meminitial)) {
+ String value = getMemoryValue(meminitial);
- if ( value != null )
- {
- compilerConfiguration.setMeminitial( value );
- }
- else
- {
- getLog().info( "Invalid value for meminitial '" + meminitial + "'. Ignoring this option." );
+ if (value != null) {
+ compilerConfiguration.setMeminitial(value);
+ } else {
+ getLog().info("Invalid value for meminitial '" + meminitial + "'. Ignoring this option.");
}
}
- if ( !StringUtils.isEmpty( maxmem ) )
- {
- String value = getMemoryValue( maxmem );
+ if (!StringUtils.isEmpty(maxmem)) {
+ String value = getMemoryValue(maxmem);
- if ( value != null )
- {
- compilerConfiguration.setMaxmem( value );
- }
- else
- {
- getLog().info( "Invalid value for maxmem '" + maxmem + "'. Ignoring this option." );
+ if (value != null) {
+ compilerConfiguration.setMaxmem(value);
+ } else {
+ getLog().info("Invalid value for maxmem '" + maxmem + "'. Ignoring this option.");
}
}
}
- compilerConfiguration.setExecutable( executable );
+ compilerConfiguration.setExecutable(executable);
- compilerConfiguration.setWorkingDirectory( basedir );
+ compilerConfiguration.setWorkingDirectory(basedir);
- compilerConfiguration.setCompilerVersion( compilerVersion );
+ compilerConfiguration.setCompilerVersion(compilerVersion);
- compilerConfiguration.setBuildDirectory( buildDirectory );
+ compilerConfiguration.setBuildDirectory(buildDirectory);
- compilerConfiguration.setOutputFileName( outputFileName );
+ compilerConfiguration.setOutputFileName(outputFileName);
- if ( CompilerConfiguration.CompilerReuseStrategy.AlwaysNew.getStrategy().equals( this.compilerReuseStrategy ) )
- {
- compilerConfiguration.setCompilerReuseStrategy( CompilerConfiguration.CompilerReuseStrategy.AlwaysNew );
- }
- else if ( CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy().equals(
- this.compilerReuseStrategy ) )
- {
- if ( getRequestThreadCount() > 1 )
- {
- if ( !skipMultiThreadWarning )
- {
- getLog().warn( "You are in a multi-thread build and compilerReuseStrategy is set to reuseSame."
- + " This can cause issues in some environments (os/jdk)!"
- + " Consider using reuseCreated strategy."
- + System.getProperty( "line.separator" )
- + "If your env is fine with reuseSame, you can skip this warning with the "
- + "configuration field skipMultiThreadWarning "
- + "or -Dmaven.compiler.skipMultiThreadWarning=true" );
+ if (CompilerConfiguration.CompilerReuseStrategy.AlwaysNew.getStrategy().equals(this.compilerReuseStrategy)) {
+ compilerConfiguration.setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy.AlwaysNew);
+ } else if (CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy()
+ .equals(this.compilerReuseStrategy)) {
+ if (getRequestThreadCount() > 1) {
+ if (!skipMultiThreadWarning) {
+ getLog().warn("You are in a multi-thread build and compilerReuseStrategy is set to reuseSame."
+ + " This can cause issues in some environments (os/jdk)!"
+ + " Consider using reuseCreated strategy."
+ + System.getProperty("line.separator")
+ + "If your env is fine with reuseSame, you can skip this warning with the "
+ + "configuration field skipMultiThreadWarning "
+ + "or -Dmaven.compiler.skipMultiThreadWarning=true");
}
}
- compilerConfiguration.setCompilerReuseStrategy( CompilerConfiguration.CompilerReuseStrategy.ReuseSame );
- }
- else
- {
+ compilerConfiguration.setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy.ReuseSame);
+ } else {
- compilerConfiguration.setCompilerReuseStrategy( CompilerConfiguration.CompilerReuseStrategy.ReuseCreated );
+ compilerConfiguration.setCompilerReuseStrategy(CompilerConfiguration.CompilerReuseStrategy.ReuseCreated);
}
- getLog().debug( "CompilerReuseStrategy: " + compilerConfiguration.getCompilerReuseStrategy().getStrategy() );
+ getLog().debug("CompilerReuseStrategy: "
+ + compilerConfiguration.getCompilerReuseStrategy().getStrategy());
- compilerConfiguration.setForceJavacCompilerUse( forceJavacCompilerUse );
+ compilerConfiguration.setForceJavacCompilerUse(forceJavacCompilerUse);
boolean canUpdateTarget;
- IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper( mojoExecution, session );
+ IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper(mojoExecution, session);
final Set sources;
IncrementalBuildHelperRequest incrementalBuildHelperRequest = null;
- if ( useIncrementalCompilation )
- {
- getLog().debug( "useIncrementalCompilation enabled" );
- try
- {
- canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration );
+ if (useIncrementalCompilation) {
+ getLog().debug("useIncrementalCompilation enabled");
+ try {
+ canUpdateTarget = compiler.canUpdateTarget(compilerConfiguration);
- sources = getCompileSources( compiler, compilerConfiguration );
-
- preparePaths( sources );
+ sources = getCompileSources(compiler, compilerConfiguration);
- incrementalBuildHelperRequest = new IncrementalBuildHelperRequest().inputFiles( sources );
+ preparePaths(sources);
- DirectoryScanResult dsr = computeInputFileTreeChanges( incrementalBuildHelper, sources );
+ incrementalBuildHelperRequest = new IncrementalBuildHelperRequest().inputFiles(sources);
+
+ DirectoryScanResult dsr = computeInputFileTreeChanges(incrementalBuildHelper, sources);
boolean idk = compiler.getCompilerOutputStyle()
- .equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget;
+ .equals(CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES)
+ && !canUpdateTarget;
boolean dependencyChanged = isDependencyChanged();
- boolean sourceChanged = isSourceChanged( compilerConfiguration, compiler );
- boolean inputFileTreeChanged = hasInputFileTreeChanged( dsr );
+ boolean sourceChanged = isSourceChanged(compilerConfiguration, compiler);
+ boolean inputFileTreeChanged = hasInputFileTreeChanged(dsr);
// CHECKSTYLE_OFF: LineLength
- if ( idk
- || dependencyChanged
- || sourceChanged
- || inputFileTreeChanged )
- // CHECKSTYLE_ON: LineLength
+ if (idk || dependencyChanged || sourceChanged || inputFileTreeChanged)
+ // CHECKSTYLE_ON: LineLength
{
- String cause = idk ? "idk" : ( dependencyChanged ? "dependency"
- : ( sourceChanged ? "source" : "input tree" ) );
- getLog().info( "Changes detected - recompiling the module! :" + cause );
- if ( showCompilationChanges )
- {
- for ( String fileAdded : dsr.getFilesAdded() )
- {
- getLog().info( "\t+ " + fileAdded );
+ String cause = idk
+ ? "idk"
+ : (dependencyChanged ? "dependency" : (sourceChanged ? "source" : "input tree"));
+ getLog().info("Changes detected - recompiling the module! :" + cause);
+ if (showCompilationChanges) {
+ for (String fileAdded : dsr.getFilesAdded()) {
+ getLog().info("\t+ " + fileAdded);
}
- for ( String fileRemoved : dsr.getFilesRemoved() )
- {
- getLog().info( "\t- " + fileRemoved );
+ for (String fileRemoved : dsr.getFilesRemoved()) {
+ getLog().info("\t- " + fileRemoved);
}
}
- compilerConfiguration.setSourceFiles( sources );
- }
- else
- {
- getLog().info( "Nothing to compile - all classes are up to date" );
+ compilerConfiguration.setSourceFiles(sources);
+ } else {
+ getLog().info("Nothing to compile - all classes are up to date");
return;
}
+ } catch (CompilerException e) {
+ throw new MojoExecutionException("Error while computing stale sources.", e);
}
- catch ( CompilerException e )
- {
- throw new MojoExecutionException( "Error while computing stale sources.", e );
- }
- }
- else
- {
- getLog().debug( "useIncrementalCompilation disabled" );
-
+ } else {
+ getLog().debug("useIncrementalCompilation disabled");
+
Set staleSources;
- try
- {
+ try {
staleSources =
- computeStaleSources( compilerConfiguration, compiler, getSourceInclusionScanner( staleMillis ) );
+ computeStaleSources(compilerConfiguration, compiler, getSourceInclusionScanner(staleMillis));
- canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration );
+ canUpdateTarget = compiler.canUpdateTarget(compilerConfiguration);
- if ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES )
- && !canUpdateTarget )
- {
- getLog().info( "RESCANNING!" );
+ if (compiler.getCompilerOutputStyle().equals(CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES)
+ && !canUpdateTarget) {
+ getLog().info("RESCANNING!");
// TODO: This second scan for source files is sub-optimal
- String inputFileEnding = compiler.getInputFileEnding( compilerConfiguration );
+ String inputFileEnding = compiler.getInputFileEnding(compilerConfiguration);
- staleSources = computeStaleSources( compilerConfiguration, compiler,
- getSourceInclusionScanner( inputFileEnding ) );
+ staleSources = computeStaleSources(
+ compilerConfiguration, compiler, getSourceInclusionScanner(inputFileEnding));
}
-
- }
- catch ( CompilerException e )
- {
- throw new MojoExecutionException( "Error while computing stale sources.", e );
+
+ } catch (CompilerException e) {
+ throw new MojoExecutionException("Error while computing stale sources.", e);
}
- if ( staleSources.isEmpty() )
- {
- getLog().info( "Nothing to compile - all classes are up to date" );
+ if (staleSources.isEmpty()) {
+ getLog().info("Nothing to compile - all classes are up to date");
return;
}
- compilerConfiguration.setSourceFiles( staleSources );
-
- try
- {
+ compilerConfiguration.setSourceFiles(staleSources);
+
+ try {
// MCOMPILER-366: if sources contain the module-descriptor it must be used to define the modulepath
- sources = getCompileSources( compiler, compilerConfiguration );
+ sources = getCompileSources(compiler, compilerConfiguration);
- if ( getLog().isDebugEnabled() )
- {
- getLog().debug( "#sources: " + sources.size() );
- for ( File file : sources )
- {
- getLog().debug( file.getPath() );
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("#sources: " + sources.size());
+ for (File file : sources) {
+ getLog().debug(file.getPath());
}
}
- preparePaths( sources );
- }
- catch ( CompilerException e )
- {
- throw new MojoExecutionException( "Error while computing stale sources.", e );
+ preparePaths(sources);
+ } catch (CompilerException e) {
+ throw new MojoExecutionException("Error while computing stale sources.", e);
}
}
-
+
// Dividing pathElements of classPath and modulePath is based on sourceFiles
- compilerConfiguration.setClasspathEntries( getClasspathElements() );
+ compilerConfiguration.setClasspathEntries(getClasspathElements());
+
+ compilerConfiguration.setModulepathEntries(getModulepathElements());
- compilerConfiguration.setModulepathEntries( getModulepathElements() );
-
- compilerConfiguration.setIncludes( getIncludes() );
+ compilerConfiguration.setIncludes(getIncludes());
- compilerConfiguration.setExcludes( getExcludes() );
+ compilerConfiguration.setExcludes(getExcludes());
Map effectiveCompilerArguments = getCompilerArguments();
String effectiveCompilerArgument = getCompilerArgument();
- if ( ( effectiveCompilerArguments != null ) || ( effectiveCompilerArgument != null )
- || ( compilerArgs != null ) )
- {
- if ( effectiveCompilerArguments != null )
- {
- for ( Map.Entry me : effectiveCompilerArguments.entrySet() )
- {
+ if ((effectiveCompilerArguments != null) || (effectiveCompilerArgument != null) || (compilerArgs != null)) {
+ if (effectiveCompilerArguments != null) {
+ for (Map.Entry me : effectiveCompilerArguments.entrySet()) {
String key = me.getKey();
String value = me.getValue();
- if ( !key.startsWith( "-" ) )
- {
+ if (!key.startsWith("-")) {
key = "-" + key;
}
- if ( key.startsWith( "-A" ) && StringUtils.isNotEmpty( value ) )
- {
- compilerConfiguration.addCompilerCustomArgument( key + "=" + value, null );
- }
- else
- {
- compilerConfiguration.addCompilerCustomArgument( key, value );
+ if (key.startsWith("-A") && StringUtils.isNotEmpty(value)) {
+ compilerConfiguration.addCompilerCustomArgument(key + "=" + value, null);
+ } else {
+ compilerConfiguration.addCompilerCustomArgument(key, value);
}
}
}
- if ( !StringUtils.isEmpty( effectiveCompilerArgument ) )
- {
- compilerConfiguration.addCompilerCustomArgument( effectiveCompilerArgument, null );
+ if (!StringUtils.isEmpty(effectiveCompilerArgument)) {
+ compilerConfiguration.addCompilerCustomArgument(effectiveCompilerArgument, null);
}
- if ( compilerArgs != null )
- {
- for ( String arg : compilerArgs )
- {
- compilerConfiguration.addCompilerCustomArgument( arg, null );
+ if (compilerArgs != null) {
+ for (String arg : compilerArgs) {
+ compilerConfiguration.addCompilerCustomArgument(arg, null);
}
}
}
-
+
// ----------------------------------------------------------------------
// Dump configuration
// ----------------------------------------------------------------------
- if ( getLog().isDebugEnabled() )
- {
- getLog().debug( "Classpath:" );
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("Classpath:");
- for ( String s : getClasspathElements() )
- {
- getLog().debug( " " + s );
+ for (String s : getClasspathElements()) {
+ getLog().debug(" " + s);
}
- if ( !getModulepathElements().isEmpty() )
- {
- getLog().debug( "Modulepath:" );
- for ( String s : getModulepathElements() )
- {
- getLog().debug( " " + s );
+ if (!getModulepathElements().isEmpty()) {
+ getLog().debug("Modulepath:");
+ for (String s : getModulepathElements()) {
+ getLog().debug(" " + s);
}
}
- getLog().debug( "Source roots:" );
+ getLog().debug("Source roots:");
- for ( String root : getCompileSourceRoots() )
- {
- getLog().debug( " " + root );
+ for (String root : getCompileSourceRoots()) {
+ getLog().debug(" " + root);
}
- try
- {
- if ( fork )
- {
- if ( compilerConfiguration.getExecutable() != null )
- {
- getLog().debug( "Excutable: " );
- getLog().debug( " " + compilerConfiguration.getExecutable() );
+ try {
+ if (fork) {
+ if (compilerConfiguration.getExecutable() != null) {
+ getLog().debug("Excutable: ");
+ getLog().debug(" " + compilerConfiguration.getExecutable());
}
}
- String[] cl = compiler.createCommandLine( compilerConfiguration );
- if ( cl != null && cl.length > 0 )
- {
+ String[] cl = compiler.createCommandLine(compilerConfiguration);
+ if (cl != null && cl.length > 0) {
StringBuilder sb = new StringBuilder();
- sb.append( cl[0] );
- for ( int i = 1; i < cl.length; i++ )
- {
- sb.append( " " );
- sb.append( cl[i] );
+ sb.append(cl[0]);
+ for (int i = 1; i < cl.length; i++) {
+ sb.append(" ");
+ sb.append(cl[i]);
}
- getLog().debug( "Command line options:" );
- getLog().debug( sb );
+ getLog().debug("Command line options:");
+ getLog().debug(sb);
}
- }
- catch ( CompilerException ce )
- {
- getLog().debug( ce );
+ } catch (CompilerException ce) {
+ getLog().debug(ce);
}
}
-
List jpmsLines = new ArrayList<>();
-
+
// See http://openjdk.java.net/jeps/261
- final List runtimeArgs = Arrays.asList( "--upgrade-module-path",
- "--add-exports",
- "--add-reads",
- "--add-modules",
- "--limit-modules" );
-
+ final List runtimeArgs = Arrays.asList(
+ "--upgrade-module-path", "--add-exports", "--add-reads", "--add-modules", "--limit-modules");
+
// Custom arguments are all added as keys to an ordered Map
Iterator> entryIter =
- compilerConfiguration.getCustomCompilerArgumentsEntries().iterator();
- while ( entryIter.hasNext() )
- {
+ compilerConfiguration.getCustomCompilerArgumentsEntries().iterator();
+ while (entryIter.hasNext()) {
Map.Entry entry = entryIter.next();
-
- if ( runtimeArgs.contains( entry.getKey() ) )
- {
- jpmsLines.add( entry.getKey() );
-
+
+ if (runtimeArgs.contains(entry.getKey())) {
+ jpmsLines.add(entry.getKey());
+
String value = entry.getValue();
- if ( value == null )
- {
+ if (value == null) {
entry = entryIter.next();
value = entry.getKey();
}
- jpmsLines.add( value );
- }
- else if ( "--patch-module".equals( entry.getKey() ) )
- {
+ jpmsLines.add(value);
+ } else if ("--patch-module".equals(entry.getKey())) {
String value = entry.getValue();
- if ( value == null )
- {
+ if (value == null) {
entry = entryIter.next();
value = entry.getKey();
}
-
- String[] values = value.split( "=" );
- StringBuilder patchModule = new StringBuilder( values[0] );
- patchModule.append( '=' );
+ String[] values = value.split("=");
+
+ StringBuilder patchModule = new StringBuilder(values[0]);
+ patchModule.append('=');
Set patchModules = new LinkedHashSet<>();
- Set sourceRoots = new HashSet<>( getCompileSourceRoots().size() );
- for ( String sourceRoot : getCompileSourceRoots() )
- {
- sourceRoots.add( Paths.get( sourceRoot ) );
+ Set sourceRoots = new HashSet<>(getCompileSourceRoots().size());
+ for (String sourceRoot : getCompileSourceRoots()) {
+ sourceRoots.add(Paths.get(sourceRoot));
}
- String[] files = values[1].split( PS );
+ String[] files = values[1].split(PS);
- for ( String file : files )
- {
- Path filePath = Paths.get( file );
- if ( getOutputDirectory().toPath().equals( filePath ) )
- {
- patchModules.add( "_" ); // this jar
- }
- else if ( getOutputDirectory().toPath().startsWith( filePath ) )
- {
+ for (String file : files) {
+ Path filePath = Paths.get(file);
+ if (getOutputDirectory().toPath().equals(filePath)) {
+ patchModules.add("_"); // this jar
+ } else if (getOutputDirectory().toPath().startsWith(filePath)) {
// multirelease, can be ignored
continue;
- }
- else if ( sourceRoots.contains( filePath ) )
- {
- patchModules.add( "_" ); // this jar
- }
- else
- {
- JavaModuleDescriptor descriptor = getPathElements().get( file );
-
- if ( descriptor == null )
- {
- if ( Files.isDirectory( filePath ) )
- {
- patchModules.add( file );
+ } else if (sourceRoots.contains(filePath)) {
+ patchModules.add("_"); // this jar
+ } else {
+ JavaModuleDescriptor descriptor = getPathElements().get(file);
+
+ if (descriptor == null) {
+ if (Files.isDirectory(filePath)) {
+ patchModules.add(file);
+ } else {
+ getLog().warn("Can't locate " + file);
}
- else
- {
- getLog().warn( "Can't locate " + file );
- }
- }
- else if ( !values[0].equals( descriptor.name() ) )
- {
- patchModules.add( descriptor.name() );
+ } else if (!values[0].equals(descriptor.name())) {
+ patchModules.add(descriptor.name());
}
}
}
StringBuilder sb = new StringBuilder();
-
- if ( !patchModules.isEmpty() )
- {
- for ( String mod : patchModules )
- {
- if ( sb.length() > 0 )
- {
- sb.append( ", " );
+
+ if (!patchModules.isEmpty()) {
+ for (String mod : patchModules) {
+ if (sb.length() > 0) {
+ sb.append(", ");
}
// use 'invalid' separator to ensure values are transformed
- sb.append( mod );
+ sb.append(mod);
}
- jpmsLines.add( "--patch-module" );
- jpmsLines.add( patchModule + sb.toString() );
+ jpmsLines.add("--patch-module");
+ jpmsLines.add(patchModule + sb.toString());
}
-
}
}
-
- if ( !jpmsLines.isEmpty() )
- {
- Path jpmsArgs = Paths.get( getOutputDirectory().getAbsolutePath(), "META-INF/jpms.args" );
- try
- {
- Files.createDirectories( jpmsArgs.getParent() );
-
- Files.write( jpmsArgs, jpmsLines, Charset.defaultCharset() );
- }
- catch ( IOException e )
- {
- getLog().warn( e.getMessage() );
+
+ if (!jpmsLines.isEmpty()) {
+ Path jpmsArgs = Paths.get(getOutputDirectory().getAbsolutePath(), "META-INF/jpms.args");
+ try {
+ Files.createDirectories(jpmsArgs.getParent());
+
+ Files.write(jpmsArgs, jpmsLines, Charset.defaultCharset());
+ } catch (IOException e) {
+ getLog().warn(e.getMessage());
}
}
-
// ----------------------------------------------------------------------
// Compile!
// ----------------------------------------------------------------------
- if ( StringUtils.isEmpty( compilerConfiguration.getSourceEncoding() ) )
- {
- getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
- + ", i.e. build is platform dependent!" );
+ if (StringUtils.isEmpty(compilerConfiguration.getSourceEncoding())) {
+ getLog().warn("File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
+ + ", i.e. build is platform dependent!");
}
CompilerResult compilerResult;
+ if (useIncrementalCompilation) {
+ incrementalBuildHelperRequest.outputDirectory(getOutputDirectory());
- if ( useIncrementalCompilation )
- {
- incrementalBuildHelperRequest.outputDirectory( getOutputDirectory() );
-
- incrementalBuildHelper.beforeRebuildExecution( incrementalBuildHelperRequest );
+ incrementalBuildHelper.beforeRebuildExecution(incrementalBuildHelperRequest);
- getLog().debug( "incrementalBuildHelper#beforeRebuildExecution" );
+ getLog().debug("incrementalBuildHelper#beforeRebuildExecution");
}
- try
- {
- compilerResult = compiler.performCompile( compilerConfiguration );
- }
- catch ( Exception e )
- {
+ try {
+ compilerResult = compiler.performCompile(compilerConfiguration);
+ } catch (Exception e) {
// TODO: don't catch Exception
- throw new MojoExecutionException( "Fatal error compiling", e );
+ throw new MojoExecutionException("Fatal error compiling", e);
}
- if ( createMissingPackageInfoClass && compilerResult.isSuccess()
- && compiler.getCompilerOutputStyle() == CompilerOutputStyle.ONE_OUTPUT_FILE_PER_INPUT_FILE )
- {
- try
- {
- SourceMapping sourceMapping = getSourceMapping( compilerConfiguration, compiler );
- createMissingPackageInfoClasses( compilerConfiguration, sourceMapping, sources );
- }
- catch ( Exception e )
- {
- getLog().warn( "Error creating missing package info classes", e );
-
+ if (createMissingPackageInfoClass
+ && compilerResult.isSuccess()
+ && compiler.getCompilerOutputStyle() == CompilerOutputStyle.ONE_OUTPUT_FILE_PER_INPUT_FILE) {
+ try {
+ SourceMapping sourceMapping = getSourceMapping(compilerConfiguration, compiler);
+ createMissingPackageInfoClasses(compilerConfiguration, sourceMapping, sources);
+ } catch (Exception e) {
+ getLog().warn("Error creating missing package info classes", e);
}
}
- if ( useIncrementalCompilation )
- {
- if ( incrementalBuildHelperRequest.getOutputDirectory().exists() )
- {
- getLog().debug( "incrementalBuildHelper#afterRebuildExecution" );
+ if (useIncrementalCompilation) {
+ if (incrementalBuildHelperRequest.getOutputDirectory().exists()) {
+ getLog().debug("incrementalBuildHelper#afterRebuildExecution");
// now scan the same directory again and create a diff
- incrementalBuildHelper.afterRebuildExecution( incrementalBuildHelperRequest );
- }
- else
- {
+ incrementalBuildHelper.afterRebuildExecution(incrementalBuildHelperRequest);
+ } else {
getLog().debug(
- "skip incrementalBuildHelper#afterRebuildExecution as the output directory doesn't exist" );
+ "skip incrementalBuildHelper#afterRebuildExecution as the output directory doesn't exist");
}
}
List warnings = new ArrayList<>();
List errors = new ArrayList<>();
List others = new ArrayList<>();
- for ( CompilerMessage message : compilerResult.getCompilerMessages() )
- {
- if ( message.getKind() == CompilerMessage.Kind.ERROR )
- {
- errors.add( message );
- }
- else if ( message.getKind() == CompilerMessage.Kind.WARNING
- || message.getKind() == CompilerMessage.Kind.MANDATORY_WARNING )
- {
- warnings.add( message );
- }
- else
- {
- others.add( message );
+ for (CompilerMessage message : compilerResult.getCompilerMessages()) {
+ if (message.getKind() == CompilerMessage.Kind.ERROR) {
+ errors.add(message);
+ } else if (message.getKind() == CompilerMessage.Kind.WARNING
+ || message.getKind() == CompilerMessage.Kind.MANDATORY_WARNING) {
+ warnings.add(message);
+ } else {
+ others.add(message);
}
}
- if ( failOnError && !compilerResult.isSuccess() )
- {
- for ( CompilerMessage message : others )
- {
+ if (failOnError && !compilerResult.isSuccess()) {
+ for (CompilerMessage message : others) {
assert message.getKind() != CompilerMessage.Kind.ERROR
- && message.getKind() != CompilerMessage.Kind.WARNING
- && message.getKind() != CompilerMessage.Kind.MANDATORY_WARNING;
- getLog().info( message.toString() );
+ && message.getKind() != CompilerMessage.Kind.WARNING
+ && message.getKind() != CompilerMessage.Kind.MANDATORY_WARNING;
+ getLog().info(message.toString());
}
- if ( !warnings.isEmpty() )
- {
- getLog().info( "-------------------------------------------------------------" );
- getLog().warn( "COMPILATION WARNING : " );
- getLog().info( "-------------------------------------------------------------" );
- for ( CompilerMessage warning : warnings )
- {
- getLog().warn( warning.toString() );
+ if (!warnings.isEmpty()) {
+ getLog().info("-------------------------------------------------------------");
+ getLog().warn("COMPILATION WARNING : ");
+ getLog().info("-------------------------------------------------------------");
+ for (CompilerMessage warning : warnings) {
+ getLog().warn(warning.toString());
}
- getLog().info( warnings.size() + ( ( warnings.size() > 1 ) ? " warnings " : " warning" ) );
- getLog().info( "-------------------------------------------------------------" );
+ getLog().info(warnings.size() + ((warnings.size() > 1) ? " warnings " : " warning"));
+ getLog().info("-------------------------------------------------------------");
}
- if ( !errors.isEmpty() )
- {
- getLog().info( "-------------------------------------------------------------" );
- getLog().error( "COMPILATION ERROR : " );
- getLog().info( "-------------------------------------------------------------" );
- for ( CompilerMessage error : errors )
- {
- getLog().error( error.toString() );
+ if (!errors.isEmpty()) {
+ getLog().info("-------------------------------------------------------------");
+ getLog().error("COMPILATION ERROR : ");
+ getLog().info("-------------------------------------------------------------");
+ for (CompilerMessage error : errors) {
+ getLog().error(error.toString());
}
- getLog().info( errors.size() + ( ( errors.size() > 1 ) ? " errors " : " error" ) );
- getLog().info( "-------------------------------------------------------------" );
+ getLog().info(errors.size() + ((errors.size() > 1) ? " errors " : " error"));
+ getLog().info("-------------------------------------------------------------");
}
- if ( !errors.isEmpty() )
- {
- throw new CompilationFailureException( errors );
- }
- else
- {
- throw new CompilationFailureException( warnings );
+ if (!errors.isEmpty()) {
+ throw new CompilationFailureException(errors);
+ } else {
+ throw new CompilationFailureException(warnings);
}
- }
- else
- {
- for ( CompilerMessage message : compilerResult.getCompilerMessages() )
- {
- switch ( message.getKind() )
- {
+ } else {
+ for (CompilerMessage message : compilerResult.getCompilerMessages()) {
+ switch (message.getKind()) {
case NOTE:
case OTHER:
- getLog().info( message.toString() );
+ getLog().info(message.toString());
break;
case ERROR:
- getLog().error( message.toString() );
+ getLog().error(message.toString());
break;
case MANDATORY_WARNING:
case WARNING:
default:
- getLog().warn( message.toString() );
+ getLog().warn(message.toString());
break;
}
}
}
}
- private void createMissingPackageInfoClasses( CompilerConfiguration compilerConfiguration,
- SourceMapping sourceMapping,
- Set sources )
- throws InclusionScanException, IOException
- {
- for ( File source : sources )
- {
+ private void createMissingPackageInfoClasses(
+ CompilerConfiguration compilerConfiguration, SourceMapping sourceMapping, Set sources)
+ throws InclusionScanException, IOException {
+ for (File source : sources) {
String path = source.toString();
- if ( path.endsWith( File.separator + "package-info.java" ) )
- {
- for ( String root : getCompileSourceRoots() )
- {
+ if (path.endsWith(File.separator + "package-info.java")) {
+ for (String root : getCompileSourceRoots()) {
root = root + File.separator;
- if ( path.startsWith( root ) )
- {
- String rel = path.substring( root.length() );
- Set files = sourceMapping.getTargetFiles( getOutputDirectory(), rel );
- for ( File file : files )
- {
- if ( !file.exists() )
- {
+ if (path.startsWith(root)) {
+ String rel = path.substring(root.length());
+ Set files = sourceMapping.getTargetFiles(getOutputDirectory(), rel);
+ for (File file : files) {
+ if (!file.exists()) {
File parentFile = file.getParentFile();
-
- if ( !parentFile.exists() )
- {
- Files.createDirectories( parentFile.toPath() );
+
+ if (!parentFile.exists()) {
+ Files.createDirectories(parentFile.toPath());
}
-
- byte[] bytes = generatePackage( compilerConfiguration, rel );
- Files.write( file.toPath(), bytes );
+
+ byte[] bytes = generatePackage(compilerConfiguration, rel);
+ Files.write(file.toPath(), bytes);
}
}
}
@@ -1414,89 +1254,78 @@ private void createMissingPackageInfoClasses( CompilerConfiguration compilerConf
}
}
- private byte[] generatePackage( CompilerConfiguration compilerConfiguration, String javaFile )
- {
- int version = getOpcode( compilerConfiguration );
- String internalPackageName = javaFile.substring( 0, javaFile.length() - ".java".length() );
- if ( File.separatorChar != '/' )
- {
- internalPackageName = internalPackageName.replace( File.separatorChar, '/' );
+ private byte[] generatePackage(CompilerConfiguration compilerConfiguration, String javaFile) {
+ int version = getOpcode(compilerConfiguration);
+ String internalPackageName = javaFile.substring(0, javaFile.length() - ".java".length());
+ if (File.separatorChar != '/') {
+ internalPackageName = internalPackageName.replace(File.separatorChar, '/');
}
- ClassWriter cw = new ClassWriter( 0 );
- cw.visit( version,
+ ClassWriter cw = new ClassWriter(0);
+ cw.visit(
+ version,
Opcodes.ACC_SYNTHETIC | Opcodes.ACC_ABSTRACT | Opcodes.ACC_INTERFACE,
- internalPackageName, null, "java/lang/Object", null );
- cw.visitSource( "package-info.java", null );
+ internalPackageName,
+ null,
+ "java/lang/Object",
+ null);
+ cw.visitSource("package-info.java", null);
return cw.toByteArray();
}
- private int getOpcode( CompilerConfiguration compilerConfiguration )
- {
+ private int getOpcode(CompilerConfiguration compilerConfiguration) {
String version = compilerConfiguration.getReleaseVersion();
- if ( version == null )
- {
+ if (version == null) {
version = compilerConfiguration.getTargetVersion();
- if ( version == null )
- {
+ if (version == null) {
version = "1.5";
}
}
- if ( version.startsWith( "1." ) )
- {
- version = version.substring( 2 );
+ if (version.startsWith("1.")) {
+ version = version.substring(2);
}
- int iVersion = Integer.parseInt( version );
- if ( iVersion < 2 )
- {
- throw new IllegalArgumentException( "Unsupported java version '" + version + "'" );
+ int iVersion = Integer.parseInt(version);
+ if (iVersion < 2) {
+ throw new IllegalArgumentException("Unsupported java version '" + version + "'");
}
return iVersion - 2 + Opcodes.V1_2;
}
- protected boolean isTestCompile()
- {
+ protected boolean isTestCompile() {
return false;
}
/**
* @return all source files for the compiler
*/
- private Set getCompileSources( Compiler compiler, CompilerConfiguration compilerConfiguration )
- throws MojoExecutionException, CompilerException
- {
- String inputFileEnding = compiler.getInputFileEnding( compilerConfiguration );
- if ( StringUtils.isEmpty( inputFileEnding ) )
- {
+ private Set getCompileSources(Compiler compiler, CompilerConfiguration compilerConfiguration)
+ throws MojoExecutionException, CompilerException {
+ String inputFileEnding = compiler.getInputFileEnding(compilerConfiguration);
+ if (StringUtils.isEmpty(inputFileEnding)) {
// see MCOMPILER-199 GroovyEclipseCompiler doesn't set inputFileEnding
// so we can presume it's all files from the source directory
inputFileEnding = ".*";
}
- SourceInclusionScanner scanner = getSourceInclusionScanner( inputFileEnding );
+ SourceInclusionScanner scanner = getSourceInclusionScanner(inputFileEnding);
- SourceMapping mapping = getSourceMapping( compilerConfiguration, compiler );
+ SourceMapping mapping = getSourceMapping(compilerConfiguration, compiler);
- scanner.addSourceMapping( mapping );
+ scanner.addSourceMapping(mapping);
Set compileSources = new HashSet<>();
- for ( String sourceRoot : getCompileSourceRoots() )
- {
- File rootFile = new File( sourceRoot );
+ for (String sourceRoot : getCompileSourceRoots()) {
+ File rootFile = new File(sourceRoot);
- if ( !rootFile.isDirectory()
- || rootFile.getAbsoluteFile().equals( compilerConfiguration.getGeneratedSourcesDirectory() ) )
- {
+ if (!rootFile.isDirectory()
+ || rootFile.getAbsoluteFile().equals(compilerConfiguration.getGeneratedSourcesDirectory())) {
continue;
}
- try
- {
- compileSources.addAll( scanner.getIncludedSources( rootFile, null ) );
- }
- catch ( InclusionScanException e )
- {
+ try {
+ compileSources.addAll(scanner.getIncludedSources(rootFile, null));
+ } catch (InclusionScanException e) {
throw new MojoExecutionException(
- "Error scanning source root: '" + sourceRoot + "' for stale files to recompile.", e );
+ "Error scanning source root: '" + sourceRoot + "' for stale files to recompile.", e);
}
}
@@ -1512,181 +1341,145 @@ private Set getCompileSources( Compiler compiler, CompilerConfiguration co
* @param compiler
* @return true if at least a single source file is newer than it's class file
*/
- private boolean isSourceChanged( CompilerConfiguration compilerConfiguration, Compiler compiler )
- throws CompilerException, MojoExecutionException
- {
+ private boolean isSourceChanged(CompilerConfiguration compilerConfiguration, Compiler compiler)
+ throws CompilerException, MojoExecutionException {
Set staleSources =
- computeStaleSources( compilerConfiguration, compiler, getSourceInclusionScanner( staleMillis ) );
-
- if ( getLog().isDebugEnabled() || showCompilationChanges )
- {
- for ( File f : staleSources )
- {
- if ( showCompilationChanges )
- {
- getLog().info( "Stale source detected: " + f.getAbsolutePath() );
- }
- else
- {
- getLog().debug( "Stale source detected: " + f.getAbsolutePath() );
+ computeStaleSources(compilerConfiguration, compiler, getSourceInclusionScanner(staleMillis));
+
+ if (getLog().isDebugEnabled() || showCompilationChanges) {
+ for (File f : staleSources) {
+ if (showCompilationChanges) {
+ getLog().info("Stale source detected: " + f.getAbsolutePath());
+ } else {
+ getLog().debug("Stale source detected: " + f.getAbsolutePath());
}
}
}
return !staleSources.isEmpty();
}
-
/**
* try to get thread count if a Maven 3 build, using reflection as the plugin must not be maven3 api dependent
*
* @return number of thread for this build or 1 if not multi-thread build
*/
- protected int getRequestThreadCount()
- {
+ protected int getRequestThreadCount() {
return session.getRequest().getDegreeOfConcurrency();
}
- protected Date getBuildStartTime()
- {
+ protected Date getBuildStartTime() {
MavenExecutionRequest request = session.getRequest();
Date buildStartTime = request == null ? new Date() : request.getStartTime();
return buildStartTime == null ? new Date() : buildStartTime;
}
-
- private String getMemoryValue( String setting )
- {
+ private String getMemoryValue(String setting) {
String value = null;
// Allow '128' or '128m'
- if ( isDigits( setting ) )
- {
+ if (isDigits(setting)) {
value = setting + "m";
- }
- else if ( ( isDigits( setting.substring( 0, setting.length() - 1 ) ) )
- && ( setting.toLowerCase().endsWith( "m" ) ) )
- {
+ } else if ((isDigits(setting.substring(0, setting.length() - 1)))
+ && (setting.toLowerCase().endsWith("m"))) {
value = setting;
}
return value;
}
- //TODO remove the part with ToolchainManager lookup once we depend on
- //3.0.9 (have it as prerequisite). Define as regular component field then.
- protected final Toolchain getToolchain()
- {
+ // TODO remove the part with ToolchainManager lookup once we depend on
+ // 3.0.9 (have it as prerequisite). Define as regular component field then.
+ protected final Toolchain getToolchain() {
Toolchain tc = null;
-
- if ( jdkToolchain != null )
- {
+
+ if (jdkToolchain != null) {
// Maven 3.3.1 has plugin execution scoped Toolchain Support
- try
- {
- Method getToolchainsMethod =
- toolchainManager.getClass().getMethod( "getToolchains", MavenSession.class, String.class,
- Map.class );
+ try {
+ Method getToolchainsMethod = toolchainManager
+ .getClass()
+ .getMethod("getToolchains", MavenSession.class, String.class, Map.class);
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
List tcs =
- (List) getToolchainsMethod.invoke( toolchainManager, session, "jdk",
- jdkToolchain );
+ (List) getToolchainsMethod.invoke(toolchainManager, session, "jdk", jdkToolchain);
- if ( tcs != null && !tcs.isEmpty() )
- {
- tc = tcs.get( 0 );
+ if (tcs != null && !tcs.isEmpty()) {
+ tc = tcs.get(0);
}
- }
- catch ( NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
- | InvocationTargetException e )
- {
+ } catch (NoSuchMethodException
+ | SecurityException
+ | IllegalAccessException
+ | IllegalArgumentException
+ | InvocationTargetException e) {
// ignore
}
}
-
- if ( tc == null )
- {
- tc = toolchainManager.getToolchainFromBuildContext( "jdk", session );
+
+ if (tc == null) {
+ tc = toolchainManager.getToolchainFromBuildContext("jdk", session);
}
-
+
return tc;
}
- private boolean isDigits( String string )
- {
- for ( int i = 0; i < string.length(); i++ )
- {
- if ( !Character.isDigit( string.charAt( i ) ) )
- {
+ private boolean isDigits(String string) {
+ for (int i = 0; i < string.length(); i++) {
+ if (!Character.isDigit(string.charAt(i))) {
return false;
}
}
return true;
}
- private Set computeStaleSources( CompilerConfiguration compilerConfiguration, Compiler compiler,
- SourceInclusionScanner scanner )
- throws MojoExecutionException, CompilerException
- {
- SourceMapping mapping = getSourceMapping( compilerConfiguration, compiler );
+ private Set computeStaleSources(
+ CompilerConfiguration compilerConfiguration, Compiler compiler, SourceInclusionScanner scanner)
+ throws MojoExecutionException, CompilerException {
+ SourceMapping mapping = getSourceMapping(compilerConfiguration, compiler);
File outputDirectory;
CompilerOutputStyle outputStyle = compiler.getCompilerOutputStyle();
- if ( outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES )
- {
+ if (outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES) {
outputDirectory = buildDirectory;
- }
- else
- {
+ } else {
outputDirectory = getOutputDirectory();
}
- scanner.addSourceMapping( mapping );
+ scanner.addSourceMapping(mapping);
Set staleSources = new HashSet<>();
- for ( String sourceRoot : getCompileSourceRoots() )
- {
- File rootFile = new File( sourceRoot );
+ for (String sourceRoot : getCompileSourceRoots()) {
+ File rootFile = new File(sourceRoot);
- if ( !rootFile.isDirectory() )
- {
+ if (!rootFile.isDirectory()) {
continue;
}
- try
- {
- staleSources.addAll( scanner.getIncludedSources( rootFile, outputDirectory ) );
- }
- catch ( InclusionScanException e )
- {
+ try {
+ staleSources.addAll(scanner.getIncludedSources(rootFile, outputDirectory));
+ } catch (InclusionScanException e) {
throw new MojoExecutionException(
- "Error scanning source root: \'" + sourceRoot + "\' for stale files to recompile.", e );
+ "Error scanning source root: \'" + sourceRoot + "\' for stale files to recompile.", e);
}
}
return staleSources;
}
- private SourceMapping getSourceMapping( CompilerConfiguration compilerConfiguration, Compiler compiler )
- throws CompilerException, MojoExecutionException
- {
+ private SourceMapping getSourceMapping(CompilerConfiguration compilerConfiguration, Compiler compiler)
+ throws CompilerException, MojoExecutionException {
CompilerOutputStyle outputStyle = compiler.getCompilerOutputStyle();
SourceMapping mapping;
- if ( outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_PER_INPUT_FILE )
- {
- mapping = new SuffixMapping( compiler.getInputFileEnding( compilerConfiguration ),
- compiler.getOutputFileEnding( compilerConfiguration ) );
- }
- else if ( outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES )
- {
- mapping = new SingleTargetSourceMapping( compiler.getInputFileEnding( compilerConfiguration ),
- compiler.getOutputFile( compilerConfiguration ) );
+ if (outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_PER_INPUT_FILE) {
+ mapping = new SuffixMapping(
+ compiler.getInputFileEnding(compilerConfiguration),
+ compiler.getOutputFileEnding(compilerConfiguration));
+ } else if (outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES) {
+ mapping = new SingleTargetSourceMapping(
+ compiler.getInputFileEnding(compilerConfiguration), compiler.getOutputFile(compilerConfiguration));
- }
- else
- {
- throw new MojoExecutionException( "Unknown compiler output style: '" + outputStyle + "'." );
+ } else {
+ throw new MojoExecutionException("Unknown compiler output style: '" + outputStyle + "'.");
}
return mapping;
}
@@ -1695,17 +1488,13 @@ else if ( outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES
* @todo also in ant plugin. This should be resolved at some point so that it does not need to
* be calculated continuously - or should the plugins accept empty source roots as is?
*/
- private static List removeEmptyCompileSourceRoots( List compileSourceRootsList )
- {
+ private static List removeEmptyCompileSourceRoots(List compileSourceRootsList) {
List newCompileSourceRootsList = new ArrayList<>();
- if ( compileSourceRootsList != null )
- {
+ if (compileSourceRootsList != null) {
// copy as I may be modifying it
- for ( String srcDir : compileSourceRootsList )
- {
- if ( !newCompileSourceRootsList.contains( srcDir ) && new File( srcDir ).exists() )
- {
- newCompileSourceRootsList.add( srcDir );
+ for (String srcDir : compileSourceRootsList) {
+ if (!newCompileSourceRootsList.contains(srcDir) && new File(srcDir).exists()) {
+ newCompileSourceRootsList.add(srcDir);
}
}
}
@@ -1719,40 +1508,31 @@ private static List removeEmptyCompileSourceRoots( List compileS
*
* @return true if at least one single dependency has changed.
*/
- protected boolean isDependencyChanged()
- {
- if ( session == null )
- {
+ protected boolean isDependencyChanged() {
+ if (session == null) {
// we just cannot determine it, so don't do anything beside logging
- getLog().info( "Cannot determine build start date, skipping incremental build detection." );
+ getLog().info("Cannot determine build start date, skipping incremental build detection.");
return false;
}
- if ( fileExtensions == null || fileExtensions.isEmpty() )
- {
- fileExtensions = Collections.unmodifiableList( Arrays.asList( "class", "jar" ) );
+ if (fileExtensions == null || fileExtensions.isEmpty()) {
+ fileExtensions = Collections.unmodifiableList(Arrays.asList("class", "jar"));
}
Date buildStartTime = getBuildStartTime();
List pathElements = new ArrayList<>();
- pathElements.addAll( getClasspathElements() );
- pathElements.addAll( getModulepathElements() );
-
- for ( String pathElement : pathElements )
- {
- File artifactPath = new File( pathElement );
- if ( artifactPath.isDirectory() || artifactPath.isFile() )
- {
- if ( hasNewFile( artifactPath, buildStartTime ) )
- {
- if ( showCompilationChanges )
- {
- getLog().info( "New dependency detected: " + artifactPath.getAbsolutePath() );
- }
- else
- {
- getLog().debug( "New dependency detected: " + artifactPath.getAbsolutePath() );
+ pathElements.addAll(getClasspathElements());
+ pathElements.addAll(getModulepathElements());
+
+ for (String pathElement : pathElements) {
+ File artifactPath = new File(pathElement);
+ if (artifactPath.isDirectory() || artifactPath.isFile()) {
+ if (hasNewFile(artifactPath, buildStartTime)) {
+ if (showCompilationChanges) {
+ getLog().info("New dependency detected: " + artifactPath.getAbsolutePath());
+ } else {
+ getLog().debug("New dependency detected: " + artifactPath.getAbsolutePath());
}
return true;
}
@@ -1768,25 +1548,20 @@ protected boolean isDependencyChanged()
* @param buildStartTime time build start
* @return if any changes occurred
*/
- private boolean hasNewFile( File classPathEntry, Date buildStartTime )
- {
- if ( !classPathEntry.exists() )
- {
+ private boolean hasNewFile(File classPathEntry, Date buildStartTime) {
+ if (!classPathEntry.exists()) {
return false;
}
- if ( classPathEntry.isFile() )
- {
+ if (classPathEntry.isFile()) {
return classPathEntry.lastModified() >= buildStartTime.getTime()
- && fileExtensions.contains( FileUtils.getExtension( classPathEntry.getName() ) );
+ && fileExtensions.contains(FileUtils.getExtension(classPathEntry.getName()));
}
File[] children = classPathEntry.listFiles();
- for ( File child : children )
- {
- if ( hasNewFile( child, buildStartTime ) )
- {
+ for (File child : children) {
+ if (hasNewFile(child, buildStartTime)) {
return true;
}
}
@@ -1794,168 +1569,134 @@ private boolean hasNewFile( File classPathEntry, Date buildStartTime )
return false;
}
- private List resolveProcessorPathEntries()
- throws MojoExecutionException
- {
- if ( annotationProcessorPaths == null || annotationProcessorPaths.isEmpty() )
- {
+ private List resolveProcessorPathEntries() throws MojoExecutionException {
+ if (annotationProcessorPaths == null || annotationProcessorPaths.isEmpty()) {
return null;
}
Set elements = new LinkedHashSet<>();
- try
- {
- List dependencies = convertToDependencies( annotationProcessorPaths );
- CollectRequest collectRequest = new CollectRequest( dependencies, Collections.emptyList(),
- project.getRemoteProjectRepositories() );
+ try {
+ List dependencies = convertToDependencies(annotationProcessorPaths);
+ CollectRequest collectRequest =
+ new CollectRequest(dependencies, Collections.emptyList(), project.getRemoteProjectRepositories());
DependencyRequest dependencyRequest = new DependencyRequest();
- dependencyRequest.setCollectRequest( collectRequest );
- DependencyResult dependencyResult = repositorySystem.resolveDependencies(
- session.getRepositorySession(), dependencyRequest );
+ dependencyRequest.setCollectRequest(collectRequest);
+ DependencyResult dependencyResult =
+ repositorySystem.resolveDependencies(session.getRepositorySession(), dependencyRequest);
- for ( ArtifactResult resolved : dependencyResult.getArtifactResults() )
- {
- elements.add( resolved.getArtifact().getFile().getAbsolutePath() );
+ for (ArtifactResult resolved : dependencyResult.getArtifactResults()) {
+ elements.add(resolved.getArtifact().getFile().getAbsolutePath());
}
- return new ArrayList<>( elements );
- }
- catch ( Exception e )
- {
- throw new MojoExecutionException( "Resolution of annotationProcessorPath dependencies failed: "
- + e.getLocalizedMessage(), e );
+ return new ArrayList<>(elements);
+ } catch (Exception e) {
+ throw new MojoExecutionException(
+ "Resolution of annotationProcessorPath dependencies failed: " + e.getLocalizedMessage(), e);
}
}
- private List convertToDependencies( List annotationProcessorPaths )
- {
+ private List convertToDependencies(List annotationProcessorPaths) {
List dependencies = new ArrayList<>();
- for ( DependencyCoordinate annotationProcessorPath : annotationProcessorPaths )
- {
- ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( annotationProcessorPath.getType() );
+ for (DependencyCoordinate annotationProcessorPath : annotationProcessorPaths) {
+ ArtifactHandler handler = artifactHandlerManager.getArtifactHandler(annotationProcessorPath.getType());
Artifact artifact = new DefaultArtifact(
annotationProcessorPath.getGroupId(),
annotationProcessorPath.getArtifactId(),
annotationProcessorPath.getClassifier(),
handler.getExtension(),
- annotationProcessorPath.getVersion() );
- dependencies.add( new Dependency( artifact, JavaScopes.RUNTIME ) );
+ annotationProcessorPath.getVersion());
+ dependencies.add(new Dependency(artifact, JavaScopes.RUNTIME));
}
return dependencies;
}
- private void writePlugin( MessageBuilder mb )
- {
- mb.a( " " ).newline();
- mb.a( " org.apache.maven.plugins" ).newline();
- mb.a( " maven-compiler-plugin" ).newline();
-
+ private void writePlugin(MessageBuilder mb) {
+ mb.a(" ").newline();
+ mb.a(" org.apache.maven.plugins").newline();
+ mb.a(" maven-compiler-plugin").newline();
+
String version = getMavenCompilerPluginVersion();
- if ( version != null )
- {
- mb.a( " " ).a( version ).a( "" ).newline();
+ if (version != null) {
+ mb.a(" ").a(version).a("").newline();
}
- writeConfig( mb );
-
- mb.a( " " ).newline();
+ writeConfig(mb);
+
+ mb.a(" ").newline();
}
- private void writeConfig( MessageBuilder mb )
- {
- mb.a( " " ).newline();
+ private void writeConfig(MessageBuilder mb) {
+ mb.a(" ").newline();
- if ( release != null )
- {
- mb.a( " " ).a( release ).a( "" ).newline();
- }
- else if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
- {
- String rls = target.replaceAll( ".\\.", "" );
+ if (release != null) {
+ mb.a(" ").a(release).a("").newline();
+ } else if (JavaVersion.JAVA_VERSION.isAtLeast("9")) {
+ String rls = target.replaceAll(".\\.", "");
// when using Java9+, motivate to use release instead of source/target
- mb.a( " " ).a( rls ).a( "" ).newline();
- }
- else
- {
- mb.a( " " ).a( source ).a( "" ).newline();
- mb.a( " " ).a( target ).a( "" ).newline();
+ mb.a(" ").a(rls).a("").newline();
+ } else {
+ mb.a(" ").a(source).a("").newline();
+ mb.a(" ").a(target).a("").newline();
}
- mb.a( " " ).newline();
+ mb.a(" ").newline();
}
- private String getMavenCompilerPluginVersion()
- {
+ private String getMavenCompilerPluginVersion() {
Properties pomProperties = new Properties();
- try ( InputStream is = AbstractCompilerMojo.class
- .getResourceAsStream( "/META-INF/maven/org.apache.maven.plugins/maven-compiler-plugin/pom.properties" ) )
- {
- if ( is != null )
- {
- pomProperties.load( is );
+ try (InputStream is = AbstractCompilerMojo.class.getResourceAsStream(
+ "/META-INF/maven/org.apache.maven.plugins/maven-compiler-plugin/pom.properties")) {
+ if (is != null) {
+ pomProperties.load(is);
}
- }
- catch ( IOException e )
- {
+ } catch (IOException e) {
// noop
}
- return pomProperties.getProperty( "version" );
+ return pomProperties.getProperty("version");
}
- private DirectoryScanResult computeInputFileTreeChanges( IncrementalBuildHelper ibh, Set inputFiles )
- throws MojoExecutionException
- {
+ private DirectoryScanResult computeInputFileTreeChanges(IncrementalBuildHelper ibh, Set inputFiles)
+ throws MojoExecutionException {
File mojoConfigBase = ibh.getMojoStatusDirectory();
- File mojoConfigFile = new File( mojoConfigBase, INPUT_FILES_LST_FILENAME );
+ File mojoConfigFile = new File(mojoConfigBase, INPUT_FILES_LST_FILENAME);
String[] oldInputFiles = new String[0];
- if ( mojoConfigFile.exists() )
- {
- try
- {
- oldInputFiles = FileUtils.fileReadArray( mojoConfigFile );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error reading old mojo status " + mojoConfigFile, e );
+ if (mojoConfigFile.exists()) {
+ try {
+ oldInputFiles = FileUtils.fileReadArray(mojoConfigFile);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Error reading old mojo status " + mojoConfigFile, e);
}
}
- String[] inputFileNames = inputFiles.stream().map( File::getAbsolutePath ).toArray( String[]::new );
+ String[] inputFileNames = inputFiles.stream().map(File::getAbsolutePath).toArray(String[]::new);
- DirectoryScanResult dsr = DirectoryScanner.diffFiles( oldInputFiles, inputFileNames );
+ DirectoryScanResult dsr = DirectoryScanner.diffFiles(oldInputFiles, inputFileNames);
- try
- {
- FileUtils.fileWriteArray( mojoConfigFile, inputFileNames );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error while storing the mojo status", e );
+ try {
+ FileUtils.fileWriteArray(mojoConfigFile, inputFileNames);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Error while storing the mojo status", e);
}
return dsr;
}
- private boolean hasInputFileTreeChanged( DirectoryScanResult dsr )
- {
- return ( dsr.getFilesAdded().length > 0 || dsr.getFilesRemoved().length > 0 );
+ private boolean hasInputFileTreeChanged(DirectoryScanResult dsr) {
+ return (dsr.getFilesAdded().length > 0 || dsr.getFilesRemoved().length > 0);
}
- public void setTarget( String target )
- {
+ public void setTarget(String target) {
this.target = target;
targetOrReleaseSet = true;
}
- public void setRelease( String release )
- {
+ public void setRelease(String release) {
this.release = release;
targetOrReleaseSet = true;
}
- final String getImplicit()
- {
+ final String getImplicit() {
return implicit;
}
}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java b/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
index 4d624540..fa55b16e 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,21 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler;
+
+import java.util.List;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.compiler.CompilerMessage;
-import java.util.List;
-
/**
* @author Jason van Zyl
* @since 2.0
*/
-@SuppressWarnings( "serial" )
-public class CompilationFailureException
- extends MojoFailureException
-{
- private static final String LS = System.getProperty( "line.separator" );
+@SuppressWarnings("serial")
+public class CompilationFailureException extends MojoFailureException {
+ private static final String LS = System.getProperty("line.separator");
/**
* Wrap error messages from the compiler
@@ -40,9 +37,8 @@ public class CompilationFailureException
* @param messages the messages, not null
* @since 2.0
*/
- public CompilationFailureException( List messages )
- {
- super( null, shortMessage( messages ), longMessage( messages ) );
+ public CompilationFailureException(List messages) {
+ super(null, shortMessage(messages), longMessage(messages));
}
/**
@@ -52,13 +48,11 @@ public CompilationFailureException( List messages )
* @return the long error message
* @since 2.0
*/
- public static String longMessage( List messages )
- {
+ public static String longMessage(List messages) {
StringBuilder sb = new StringBuilder();
- for ( CompilerMessage compilerError : messages )
- {
- sb.append( compilerError ).append( LS );
+ for (CompilerMessage compilerError : messages) {
+ sb.append(compilerError).append(LS);
}
return sb.toString();
@@ -71,13 +65,11 @@ public static String longMessage( List messages )
* @return the short error message
* @since 2.0.2
*/
- public static String shortMessage( List messages )
- {
- StringBuilder sb = new StringBuilder( "Compilation failure" );
+ public static String shortMessage(List messages) {
+ StringBuilder sb = new StringBuilder("Compilation failure");
- if ( messages.size() == 1 )
- {
- sb.append( LS ).append( messages.get( 0 ) ).append( LS );
+ if (messages.size() == 1) {
+ sb.append(LS).append(messages.get(0)).append(LS);
}
return sb.toString();
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index e7efa7f1..228643e4 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler;
import java.io.File;
import java.io.IOException;
@@ -28,8 +27,8 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.Map.Entry;
+import java.util.Set;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
@@ -57,21 +56,22 @@
* @author Jason van Zyl
* @since 2.0
*/
-@Mojo( name = "compile", defaultPhase = LifecyclePhase.COMPILE, threadSafe = true,
- requiresDependencyResolution = ResolutionScope.COMPILE )
-public class CompilerMojo
- extends AbstractCompilerMojo
-{
+@Mojo(
+ name = "compile",
+ defaultPhase = LifecyclePhase.COMPILE,
+ threadSafe = true,
+ requiresDependencyResolution = ResolutionScope.COMPILE)
+public class CompilerMojo extends AbstractCompilerMojo {
/**
* The source directories containing the sources to be compiled.
*/
- @Parameter( defaultValue = "${project.compileSourceRoots}", readonly = false, required = true )
+ @Parameter(defaultValue = "${project.compileSourceRoots}", readonly = false, required = true)
private List compileSourceRoots;
/**
* The directory for compiled classes.
*/
- @Parameter( defaultValue = "${project.build.outputDirectory}", required = true, readonly = true )
+ @Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = true)
private File outputDirectory;
/**
@@ -79,7 +79,7 @@ public class CompilerMojo
*
* @todo this is an export variable, really
*/
- @Parameter( defaultValue = "${project.artifact}", readonly = true, required = true )
+ @Parameter(defaultValue = "${project.artifact}", readonly = true, required = true)
private Artifact projectArtifact;
/**
@@ -108,17 +108,17 @@ public class CompilerMojo
*
* @since 2.2
*/
- @Parameter( defaultValue = "${project.build.directory}/generated-sources/annotations" )
+ @Parameter(defaultValue = "${project.build.directory}/generated-sources/annotations")
private File generatedSourcesDirectory;
/**
* Set this to 'true' to bypass compilation of main sources. Its use is NOT RECOMMENDED, but quite convenient on
* occasion.
*/
- @Parameter( property = "maven.main.skip" )
+ @Parameter(property = "maven.main.skip")
private boolean skipMain;
- @Parameter( defaultValue = "${project.compileClasspathElements}", readonly = true, required = true )
+ @Parameter(defaultValue = "${project.compileClasspathElements}", readonly = true, required = true)
private List compilePath;
/**
@@ -130,7 +130,7 @@ public class CompilerMojo
* Multi-Release: true. You need to set this by configuring the maven-jar-plugin.
* This implies that you cannot test a multirelease jar using the outputDirectory.
- *
+ *
* @since 3.7.1
*/
@Parameter
@@ -140,7 +140,7 @@ public class CompilerMojo
* when forking and debug activated the commandline used will be dumped in this file
* @since 3.10.0
*/
- @Parameter( defaultValue = "javac" )
+ @Parameter(defaultValue = "javac")
private String debugFileName;
final LocationManager locationManager = new LocationManager();
@@ -148,326 +148,266 @@ public class CompilerMojo
private List classpathElements;
private List modulepathElements;
-
+
private Map pathElements;
- protected List getCompileSourceRoots()
- {
+ protected List getCompileSourceRoots() {
return compileSourceRoots;
}
@Override
- protected List getClasspathElements()
- {
+ protected List getClasspathElements() {
return classpathElements;
}
@Override
- protected List getModulepathElements()
- {
+ protected List getModulepathElements() {
return modulepathElements;
}
@Override
- protected Map getPathElements()
- {
+ protected Map getPathElements() {
return pathElements;
}
-
- protected File getOutputDirectory()
- {
+
+ protected File getOutputDirectory() {
File dir;
- if ( !multiReleaseOutput )
- {
+ if (!multiReleaseOutput) {
dir = outputDirectory;
- }
- else
- {
- dir = new File( outputDirectory, "META-INF/versions/" + release );
+ } else {
+ dir = new File(outputDirectory, "META-INF/versions/" + release);
}
return dir;
}
- public void execute()
- throws MojoExecutionException, CompilationFailureException
- {
- if ( skipMain )
- {
- getLog().info( "Not compiling main sources" );
+ public void execute() throws MojoExecutionException, CompilationFailureException {
+ if (skipMain) {
+ getLog().info("Not compiling main sources");
return;
}
-
- if ( multiReleaseOutput && release == null )
- {
- throw new MojoExecutionException( "When using 'multiReleaseOutput' the release must be set" );
+
+ if (multiReleaseOutput && release == null) {
+ throw new MojoExecutionException("When using 'multiReleaseOutput' the release must be set");
}
super.execute();
- if ( outputDirectory.isDirectory() )
- {
- projectArtifact.setFile( outputDirectory );
+ if (outputDirectory.isDirectory()) {
+ projectArtifact.setFile(outputDirectory);
}
}
@Override
- protected Set getIncludes()
- {
+ protected Set getIncludes() {
return includes;
}
@Override
- protected Set getExcludes()
- {
+ protected Set getExcludes() {
return excludes;
}
@Override
- protected void preparePaths( Set sourceFiles )
- {
- //assert compilePath != null;
+ protected void preparePaths(Set sourceFiles) {
+ // assert compilePath != null;
File moduleDescriptorPath = null;
boolean hasModuleDescriptor = false;
- for ( File sourceFile : sourceFiles )
- {
- if ( "module-info.java".equals( sourceFile.getName() ) )
- {
+ for (File sourceFile : sourceFiles) {
+ if ("module-info.java".equals(sourceFile.getName())) {
moduleDescriptorPath = sourceFile;
hasModuleDescriptor = true;
break;
}
}
- if ( hasModuleDescriptor )
- {
+ if (hasModuleDescriptor) {
// For now only allow named modules. Once we can create a graph with ASM we can specify exactly the modules
// and we can detect if auto modules are used. In that case, MavenProject.setFile() should not be used, so
// you cannot depend on this project and so it won't be distributed.
- modulepathElements = new ArrayList<>( compilePath.size() );
- classpathElements = new ArrayList<>( compilePath.size() );
- pathElements = new LinkedHashMap<>( compilePath.size() );
+ modulepathElements = new ArrayList<>(compilePath.size());
+ classpathElements = new ArrayList<>(compilePath.size());
+ pathElements = new LinkedHashMap<>(compilePath.size());
ResolvePathsResult resolvePathsResult;
- try
- {
- Collection dependencyArtifacts = getCompileClasspathElements( getProject() );
-
- ResolvePathsRequest request =
- ResolvePathsRequest.ofFiles( dependencyArtifacts )
- .setIncludeStatic( true )
- .setMainModuleDescriptor( moduleDescriptorPath );
-
+ try {
+ Collection dependencyArtifacts = getCompileClasspathElements(getProject());
+
+ ResolvePathsRequest request = ResolvePathsRequest.ofFiles(dependencyArtifacts)
+ .setIncludeStatic(true)
+ .setMainModuleDescriptor(moduleDescriptorPath);
+
Toolchain toolchain = getToolchain();
- if ( toolchain instanceof DefaultJavaToolChain )
- {
- request.setJdkHome( new File( ( (DefaultJavaToolChain) toolchain ).getJavaHome() ) );
+ if (toolchain instanceof DefaultJavaToolChain) {
+ request.setJdkHome(new File(((DefaultJavaToolChain) toolchain).getJavaHome()));
}
- resolvePathsResult = locationManager.resolvePaths( request );
-
- for ( Entry pathException : resolvePathsResult.getPathExceptions().entrySet() )
- {
+ resolvePathsResult = locationManager.resolvePaths(request);
+
+ for (Entry pathException :
+ resolvePathsResult.getPathExceptions().entrySet()) {
Throwable cause = pathException.getValue();
- while ( cause.getCause() != null )
- {
+ while (cause.getCause() != null) {
cause = cause.getCause();
}
String fileName = pathException.getKey().getName();
- getLog().warn( "Can't extract module name from " + fileName + ": " + cause.getMessage() );
+ getLog().warn("Can't extract module name from " + fileName + ": " + cause.getMessage());
}
-
+
JavaModuleDescriptor moduleDescriptor = resolvePathsResult.getMainModuleDescriptor();
- detectFilenameBasedAutomodules( resolvePathsResult, moduleDescriptor );
-
- for ( Map.Entry entry : resolvePathsResult.getPathElements().entrySet() )
- {
- pathElements.put( entry.getKey().getPath(), entry.getValue() );
+ detectFilenameBasedAutomodules(resolvePathsResult, moduleDescriptor);
+
+ for (Map.Entry entry :
+ resolvePathsResult.getPathElements().entrySet()) {
+ pathElements.put(entry.getKey().getPath(), entry.getValue());
}
- if ( compilerArgs == null )
- {
+ if (compilerArgs == null) {
compilerArgs = new ArrayList<>();
}
- for ( File file : resolvePathsResult.getClasspathElements() )
- {
- classpathElements.add( file.getPath() );
-
- if ( multiReleaseOutput )
- {
- if ( getOutputDirectory().toPath().startsWith( file.getPath() ) )
- {
- compilerArgs.add( "--patch-module" );
- compilerArgs.add( String.format( "%s=%s", moduleDescriptor.name(), file.getPath() ) );
+ for (File file : resolvePathsResult.getClasspathElements()) {
+ classpathElements.add(file.getPath());
+
+ if (multiReleaseOutput) {
+ if (getOutputDirectory().toPath().startsWith(file.getPath())) {
+ compilerArgs.add("--patch-module");
+ compilerArgs.add(String.format("%s=%s", moduleDescriptor.name(), file.getPath()));
}
}
}
-
- for ( File file : resolvePathsResult.getModulepathElements().keySet() )
- {
- modulepathElements.add( file.getPath() );
+
+ for (File file : resolvePathsResult.getModulepathElements().keySet()) {
+ modulepathElements.add(file.getPath());
}
-
- compilerArgs.add( "--module-version" );
- compilerArgs.add( getProject().getVersion() );
-
- }
- catch ( IOException e )
- {
- getLog().warn( e.getMessage() );
+
+ compilerArgs.add("--module-version");
+ compilerArgs.add(getProject().getVersion());
+
+ } catch (IOException e) {
+ getLog().warn(e.getMessage());
}
- }
- else
- {
+ } else {
classpathElements = new ArrayList<>();
- for ( File element : getCompileClasspathElements( getProject() ) )
- {
- classpathElements.add( element.getPath() );
+ for (File element : getCompileClasspathElements(getProject())) {
+ classpathElements.add(element.getPath());
}
modulepathElements = Collections.emptyList();
}
}
- private void detectFilenameBasedAutomodules( final ResolvePathsResult resolvePathsResult,
- final JavaModuleDescriptor moduleDescriptor )
- {
+ private void detectFilenameBasedAutomodules(
+ final ResolvePathsResult resolvePathsResult, final JavaModuleDescriptor moduleDescriptor) {
List automodulesDetected = new ArrayList<>();
- for ( Entry entry : resolvePathsResult.getModulepathElements().entrySet() )
- {
- if ( ModuleNameSource.FILENAME.equals( entry.getValue() ) )
- {
- automodulesDetected.add( entry.getKey().getName() );
+ for (Entry entry :
+ resolvePathsResult.getModulepathElements().entrySet()) {
+ if (ModuleNameSource.FILENAME.equals(entry.getValue())) {
+ automodulesDetected.add(entry.getKey().getName());
}
}
- if ( !automodulesDetected.isEmpty() )
- {
+ if (!automodulesDetected.isEmpty()) {
final String message = "Required filename-based automodules detected: "
- + automodulesDetected + ". "
+ + automodulesDetected + ". "
+ "Please don't publish this project to a public artifact repository!";
- if ( moduleDescriptor.exports().isEmpty() )
- {
+ if (moduleDescriptor.exports().isEmpty()) {
// application
- getLog().info( message );
- }
- else
- {
+ getLog().info(message);
+ } else {
// library
- writeBoxedWarning( message );
+ writeBoxedWarning(message);
}
}
}
-
- private List getCompileClasspathElements( MavenProject project )
- {
- // 3 is outputFolder + 2 preserved for multirelease
- List list = new ArrayList<>( project.getArtifacts().size() + 3 );
-
- if ( multiReleaseOutput )
- {
- File versionsFolder = new File( project.getBuild().getOutputDirectory(), "META-INF/versions" );
-
+
+ private List getCompileClasspathElements(MavenProject project) {
+ // 3 is outputFolder + 2 preserved for multirelease
+ List list = new ArrayList<>(project.getArtifacts().size() + 3);
+
+ if (multiReleaseOutput) {
+ File versionsFolder = new File(project.getBuild().getOutputDirectory(), "META-INF/versions");
+
// in reverse order
- for ( int version = Integer.parseInt( getRelease() ) - 1; version >= 9 ; version-- )
- {
- File versionSubFolder = new File( versionsFolder, String.valueOf( version ) );
- if ( versionSubFolder.exists() )
- {
- list.add( versionSubFolder );
+ for (int version = Integer.parseInt(getRelease()) - 1; version >= 9; version--) {
+ File versionSubFolder = new File(versionsFolder, String.valueOf(version));
+ if (versionSubFolder.exists()) {
+ list.add(versionSubFolder);
}
}
}
- list.add( new File( project.getBuild().getOutputDirectory() ) );
+ list.add(new File(project.getBuild().getOutputDirectory()));
- for ( Artifact a : project.getArtifacts() )
- {
- list.add( a.getFile() );
+ for (Artifact a : project.getArtifacts()) {
+ list.add(a.getFile());
}
return list;
}
-
- protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
- {
- if ( includes.isEmpty() && excludes.isEmpty() && incrementalExcludes.isEmpty() )
- {
- return new StaleSourceScanner( staleMillis );
+
+ protected SourceInclusionScanner getSourceInclusionScanner(int staleMillis) {
+ if (includes.isEmpty() && excludes.isEmpty() && incrementalExcludes.isEmpty()) {
+ return new StaleSourceScanner(staleMillis);
}
- if ( includes.isEmpty() )
- {
- includes.add( "**/*.java" );
+ if (includes.isEmpty()) {
+ includes.add("**/*.java");
}
- Set excludesIncr = new HashSet<>( excludes );
- excludesIncr.addAll( this.incrementalExcludes );
- return new StaleSourceScanner( staleMillis, includes, excludesIncr );
+ Set excludesIncr = new HashSet<>(excludes);
+ excludesIncr.addAll(this.incrementalExcludes);
+ return new StaleSourceScanner(staleMillis, includes, excludesIncr);
}
- protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEnding )
- {
+ protected SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding) {
// it's not defined if we get the ending with or without the dot '.'
- String defaultIncludePattern = "**/*" + ( inputFileEnding.startsWith( "." ) ? "" : "." ) + inputFileEnding;
+ String defaultIncludePattern = "**/*" + (inputFileEnding.startsWith(".") ? "" : ".") + inputFileEnding;
- if ( includes.isEmpty() )
- {
- includes.add( defaultIncludePattern );
+ if (includes.isEmpty()) {
+ includes.add(defaultIncludePattern);
}
- Set excludesIncr = new HashSet<>( excludes );
- excludesIncr.addAll( excludesIncr );
- return new SimpleSourceInclusionScanner( includes, excludesIncr );
+ Set excludesIncr = new HashSet<>(excludes);
+ excludesIncr.addAll(excludesIncr);
+ return new SimpleSourceInclusionScanner(includes, excludesIncr);
}
- protected String getSource()
- {
+ protected String getSource() {
return source;
}
- protected String getTarget()
- {
+ protected String getTarget() {
return target;
}
@Override
- protected String getRelease()
- {
+ protected String getRelease() {
return release;
}
- protected String getCompilerArgument()
- {
+ protected String getCompilerArgument() {
return compilerArgument;
}
- protected Map getCompilerArguments()
- {
+ protected Map getCompilerArguments() {
return compilerArguments;
}
- protected File getGeneratedSourcesDirectory()
- {
+ protected File getGeneratedSourcesDirectory() {
return generatedSourcesDirectory;
}
@Override
- protected String getDebugFileName()
- {
+ protected String getDebugFileName() {
return debugFileName;
}
- private void writeBoxedWarning( String message )
- {
- String line = StringUtils.repeat( "*", message.length() + 4 );
- getLog().warn( line );
- getLog().warn( "* " + MessageUtils.buffer().strong( message ) + " *" );
- getLog().warn( line );
+ private void writeBoxedWarning(String message) {
+ String line = StringUtils.repeat("*", message.length() + 4);
+ getLog().warn(line);
+ getLog().warn("* " + MessageUtils.buffer().strong(message) + " *");
+ getLog().warn(line);
}
-
-
-
}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
index 71f0ce8d..593ca5ef 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
@@ -1,183 +1,145 @@
-package org.apache.maven.plugin.compiler;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Simple representation of Maven-coordinates of a dependency.
- *
- * @author Andreas Gudian
- * @since 3.4
- */
-public class DependencyCoordinate
-{
- private String groupId;
-
- private String artifactId;
-
- private String version;
-
- private String classifier;
-
- private String type = "jar";
-
- public String getGroupId()
- {
- return groupId;
- }
-
- public void setGroupId( String groupId )
- {
- this.groupId = groupId;
- }
-
- public String getArtifactId()
- {
- return artifactId;
- }
-
- public void setArtifactId( String artifactId )
- {
- this.artifactId = artifactId;
- }
-
- public String getVersion()
- {
- return version;
- }
-
- public void setVersion( String version )
- {
- this.version = version;
- }
-
- public String getClassifier()
- {
- return classifier;
- }
-
- public void setClassifier( String classifier )
- {
- this.classifier = classifier;
- }
-
- public String getType()
- {
- return type;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ( ( artifactId == null ) ? 0 : artifactId.hashCode() );
- result = prime * result + ( ( classifier == null ) ? 0 : classifier.hashCode() );
- result = prime * result + ( ( groupId == null ) ? 0 : groupId.hashCode() );
- result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
- result = prime * result + ( ( version == null ) ? 0 : version.hashCode() );
- return result;
- }
-
- @Override
- public boolean equals( Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass() != obj.getClass() )
- {
- return false;
- }
- DependencyCoordinate other = (DependencyCoordinate) obj;
- if ( artifactId == null )
- {
- if ( other.artifactId != null )
- {
- return false;
- }
- }
- else if ( !artifactId.equals( other.artifactId ) )
- {
- return false;
- }
- if ( classifier == null )
- {
- if ( other.classifier != null )
- {
- return false;
- }
- }
- else if ( !classifier.equals( other.classifier ) )
- {
- return false;
- }
- if ( groupId == null )
- {
- if ( other.groupId != null )
- {
- return false;
- }
- }
- else if ( !groupId.equals( other.groupId ) )
- {
- return false;
- }
- if ( type == null )
- {
- if ( other.type != null )
- {
- return false;
- }
- }
- else if ( !type.equals( other.type ) )
- {
- return false;
- }
- if ( version == null )
- {
- if ( other.version != null )
- {
- return false;
- }
- }
- else if ( !version.equals( other.version ) )
- {
- return false;
- }
- return true;
- }
-
- @Override
- public String toString()
- {
- return groupId + ":" + artifactId + ( version != null ? ":" + version : "" )
- + ( classifier != null ? ":" + classifier : "" ) + ( type != null ? "." + type : "" );
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugin.compiler;
+
+/**
+ * Simple representation of Maven-coordinates of a dependency.
+ *
+ * @author Andreas Gudian
+ * @since 3.4
+ */
+public class DependencyCoordinate {
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String classifier;
+
+ private String type = "jar";
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getClassifier() {
+ return classifier;
+ }
+
+ public void setClassifier(String classifier) {
+ this.classifier = classifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((artifactId == null) ? 0 : artifactId.hashCode());
+ result = prime * result + ((classifier == null) ? 0 : classifier.hashCode());
+ result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ DependencyCoordinate other = (DependencyCoordinate) obj;
+ if (artifactId == null) {
+ if (other.artifactId != null) {
+ return false;
+ }
+ } else if (!artifactId.equals(other.artifactId)) {
+ return false;
+ }
+ if (classifier == null) {
+ if (other.classifier != null) {
+ return false;
+ }
+ } else if (!classifier.equals(other.classifier)) {
+ return false;
+ }
+ if (groupId == null) {
+ if (other.groupId != null) {
+ return false;
+ }
+ } else if (!groupId.equals(other.groupId)) {
+ return false;
+ }
+ if (type == null) {
+ if (other.type != null) {
+ return false;
+ }
+ } else if (!type.equals(other.type)) {
+ return false;
+ }
+ if (version == null) {
+ if (other.version != null) {
+ return false;
+ }
+ } else if (!version.equals(other.version)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return groupId + ":" + artifactId + (version != null ? ":" + version : "")
+ + (classifier != null ? ":" + classifier : "") + (type != null ? "." + type : "");
+ }
+}
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index 1c854fa6..4bbdc7e0 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler;
import java.io.File;
import java.io.IOException;
@@ -55,28 +54,29 @@
* @author Jason van Zyl
* @since 2.0
*/
-@Mojo( name = "testCompile", defaultPhase = LifecyclePhase.TEST_COMPILE, threadSafe = true,
- requiresDependencyResolution = ResolutionScope.TEST )
-public class TestCompilerMojo
- extends AbstractCompilerMojo
-{
+@Mojo(
+ name = "testCompile",
+ defaultPhase = LifecyclePhase.TEST_COMPILE,
+ threadSafe = true,
+ requiresDependencyResolution = ResolutionScope.TEST)
+public class TestCompilerMojo extends AbstractCompilerMojo {
/**
* Set this to 'true' to bypass compilation of test sources.
* Its use is NOT RECOMMENDED, but quite convenient on occasion.
*/
- @Parameter ( property = "maven.test.skip" )
+ @Parameter(property = "maven.test.skip")
private boolean skip;
/**
* The source directories containing the test-source to be compiled.
*/
- @Parameter ( defaultValue = "${project.testCompileSourceRoots}", readonly = true, required = true )
+ @Parameter(defaultValue = "${project.testCompileSourceRoots}", readonly = true, required = true)
private List compileSourceRoots;
/**
* The directory where compiled test classes go.
*/
- @Parameter ( defaultValue = "${project.build.testOutputDirectory}", required = true, readonly = true )
+ @Parameter(defaultValue = "${project.build.testOutputDirectory}", required = true, readonly = true)
private File outputDirectory;
/**
@@ -103,7 +103,7 @@ public class TestCompilerMojo
*
* @since 2.1
*/
- @Parameter ( property = "maven.compiler.testSource" )
+ @Parameter(property = "maven.compiler.testSource")
private String testSource;
/**
@@ -111,15 +111,15 @@ public class TestCompilerMojo
*
* @since 2.1
*/
- @Parameter ( property = "maven.compiler.testTarget" )
+ @Parameter(property = "maven.compiler.testTarget")
private String testTarget;
/**
* the -release argument for the test Java compiler
- *
+ *
* @since 3.6
*/
- @Parameter ( property = "maven.compiler.testRelease" )
+ @Parameter(property = "maven.compiler.testRelease")
private String testRelease;
/**
@@ -158,367 +158,299 @@ public class TestCompilerMojo
*
* @since 2.2
*/
- @Parameter ( defaultValue = "${project.build.directory}/generated-test-sources/test-annotations" )
+ @Parameter(defaultValue = "${project.build.directory}/generated-test-sources/test-annotations")
private File generatedTestSourcesDirectory;
- @Parameter( defaultValue = "${project.testClasspathElements}", readonly = true )
+ @Parameter(defaultValue = "${project.testClasspathElements}", readonly = true)
private List testPath;
-
/**
* when forking and debug activated the commandline used will be dumped in this file
* @since 3.10.0
*/
- @Parameter( defaultValue = "javac-test" )
+ @Parameter(defaultValue = "javac-test")
private String debugFileName;
final LocationManager locationManager = new LocationManager();
private Map pathElements;
-
+
private Collection classpathElements;
private Collection modulepathElements;
- public void execute()
- throws MojoExecutionException, CompilationFailureException
- {
- if ( skip )
- {
- getLog().info( "Not compiling test sources" );
+ public void execute() throws MojoExecutionException, CompilationFailureException {
+ if (skip) {
+ getLog().info("Not compiling test sources");
return;
}
super.execute();
}
- protected List getCompileSourceRoots()
- {
+ protected List getCompileSourceRoots() {
return compileSourceRoots;
}
@Override
- protected Map getPathElements()
- {
+ protected Map getPathElements() {
return pathElements;
}
- protected List getClasspathElements()
- {
- return new ArrayList<>( classpathElements );
+ protected List getClasspathElements() {
+ return new ArrayList<>(classpathElements);
}
@Override
- protected List getModulepathElements()
- {
- return new ArrayList<>( modulepathElements );
+ protected List getModulepathElements() {
+ return new ArrayList<>(modulepathElements);
}
- protected File getOutputDirectory()
- {
+ protected File getOutputDirectory() {
return outputDirectory;
}
@Override
- protected void preparePaths( Set sourceFiles )
- {
- File mainOutputDirectory = new File( getProject().getBuild().getOutputDirectory() );
+ protected void preparePaths(Set sourceFiles) {
+ File mainOutputDirectory = new File(getProject().getBuild().getOutputDirectory());
- File mainModuleDescriptorClassFile = new File( mainOutputDirectory, "module-info.class" );
+ File mainModuleDescriptorClassFile = new File(mainOutputDirectory, "module-info.class");
JavaModuleDescriptor mainModuleDescriptor = null;
- File testModuleDescriptorJavaFile = new File( "module-info.java" );
+ File testModuleDescriptorJavaFile = new File("module-info.java");
JavaModuleDescriptor testModuleDescriptor = null;
// Go through the source files to respect includes/excludes
- for ( File sourceFile : sourceFiles )
- {
+ for (File sourceFile : sourceFiles) {
// @todo verify if it is the root of a sourcedirectory?
- if ( "module-info.java".equals( sourceFile.getName() ) )
- {
+ if ("module-info.java".equals(sourceFile.getName())) {
testModuleDescriptorJavaFile = sourceFile;
break;
}
}
// Get additional information from the main module descriptor, if available
- if ( mainModuleDescriptorClassFile.exists() )
- {
+ if (mainModuleDescriptorClassFile.exists()) {
ResolvePathsResult result;
- try
- {
- ResolvePathsRequest request =
- ResolvePathsRequest.ofStrings( testPath )
- .setIncludeStatic( true )
- .setMainModuleDescriptor( mainModuleDescriptorClassFile.getAbsolutePath() );
+ try {
+ ResolvePathsRequest request = ResolvePathsRequest.ofStrings(testPath)
+ .setIncludeStatic(true)
+ .setMainModuleDescriptor(mainModuleDescriptorClassFile.getAbsolutePath());
Toolchain toolchain = getToolchain();
- if ( toolchain instanceof DefaultJavaToolChain )
- {
- request.setJdkHome( ( (DefaultJavaToolChain) toolchain ).getJavaHome() );
+ if (toolchain instanceof DefaultJavaToolChain) {
+ request.setJdkHome(((DefaultJavaToolChain) toolchain).getJavaHome());
}
- result = locationManager.resolvePaths( request );
-
- for ( Entry pathException : result.getPathExceptions().entrySet() )
- {
+ result = locationManager.resolvePaths(request);
+
+ for (Entry pathException :
+ result.getPathExceptions().entrySet()) {
Throwable cause = pathException.getValue();
- while ( cause.getCause() != null )
- {
+ while (cause.getCause() != null) {
cause = cause.getCause();
}
- String fileName = Paths.get( pathException.getKey() ).getFileName().toString();
- getLog().warn( "Can't extract module name from " + fileName + ": " + cause.getMessage() );
+ String fileName =
+ Paths.get(pathException.getKey()).getFileName().toString();
+ getLog().warn("Can't extract module name from " + fileName + ": " + cause.getMessage());
}
- }
- catch ( IOException e )
- {
- throw new RuntimeException( e );
+ } catch (IOException e) {
+ throw new RuntimeException(e);
}
mainModuleDescriptor = result.getMainModuleDescriptor();
- pathElements = new LinkedHashMap<>( result.getPathElements().size() );
- pathElements.putAll( result.getPathElements() );
+ pathElements = new LinkedHashMap<>(result.getPathElements().size());
+ pathElements.putAll(result.getPathElements());
modulepathElements = result.getModulepathElements().keySet();
classpathElements = result.getClasspathElements();
}
// Get additional information from the test module descriptor, if available
- if ( testModuleDescriptorJavaFile.exists() )
- {
+ if (testModuleDescriptorJavaFile.exists()) {
ResolvePathsResult result;
- try
- {
- ResolvePathsRequest request =
- ResolvePathsRequest.ofStrings( testPath )
- .setMainModuleDescriptor( testModuleDescriptorJavaFile.getAbsolutePath() );
+ try {
+ ResolvePathsRequest request = ResolvePathsRequest.ofStrings(testPath)
+ .setMainModuleDescriptor(testModuleDescriptorJavaFile.getAbsolutePath());
Toolchain toolchain = getToolchain();
- if ( toolchain instanceof DefaultJavaToolChain )
- {
- request.setJdkHome( ( (DefaultJavaToolChain) toolchain ).getJavaHome() );
+ if (toolchain instanceof DefaultJavaToolChain) {
+ request.setJdkHome(((DefaultJavaToolChain) toolchain).getJavaHome());
}
- result = locationManager.resolvePaths( request );
- }
- catch ( IOException e )
- {
- throw new RuntimeException( e );
+ result = locationManager.resolvePaths(request);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
}
testModuleDescriptor = result.getMainModuleDescriptor();
}
- if ( StringUtils.isNotEmpty( getRelease() ) )
- {
- if ( Integer.parseInt( getRelease() ) < 9 )
- {
+ if (StringUtils.isNotEmpty(getRelease())) {
+ if (Integer.parseInt(getRelease()) < 9) {
pathElements = Collections.emptyMap();
modulepathElements = Collections.emptyList();
classpathElements = testPath;
return;
}
- }
- else if ( Double.parseDouble( getTarget() ) < Double.parseDouble( MODULE_INFO_TARGET ) )
- {
+ } else if (Double.parseDouble(getTarget()) < Double.parseDouble(MODULE_INFO_TARGET)) {
pathElements = Collections.emptyMap();
modulepathElements = Collections.emptyList();
classpathElements = testPath;
return;
}
-
- if ( testModuleDescriptor != null )
- {
+
+ if (testModuleDescriptor != null) {
modulepathElements = testPath;
classpathElements = Collections.emptyList();
- if ( mainModuleDescriptor != null )
- {
- if ( getLog().isDebugEnabled() )
- {
- getLog().debug( "Main and test module descriptors exist:" );
- getLog().debug( " main module = " + mainModuleDescriptor.name() );
- getLog().debug( " test module = " + testModuleDescriptor.name() );
+ if (mainModuleDescriptor != null) {
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("Main and test module descriptors exist:");
+ getLog().debug(" main module = " + mainModuleDescriptor.name());
+ getLog().debug(" test module = " + testModuleDescriptor.name());
}
- if ( testModuleDescriptor.name().equals( mainModuleDescriptor.name() ) )
- {
- if ( compilerArgs == null )
- {
+ if (testModuleDescriptor.name().equals(mainModuleDescriptor.name())) {
+ if (compilerArgs == null) {
compilerArgs = new ArrayList<>();
}
- compilerArgs.add( "--patch-module" );
+ compilerArgs.add("--patch-module");
StringBuilder patchModuleValue = new StringBuilder();
- patchModuleValue.append( testModuleDescriptor.name() );
- patchModuleValue.append( '=' );
-
- for ( String root : getProject().getCompileSourceRoots() )
- {
- if ( Files.exists( Paths.get( root ) ) )
- {
- patchModuleValue.append( root ).append( PS );
+ patchModuleValue.append(testModuleDescriptor.name());
+ patchModuleValue.append('=');
+
+ for (String root : getProject().getCompileSourceRoots()) {
+ if (Files.exists(Paths.get(root))) {
+ patchModuleValue.append(root).append(PS);
}
}
- compilerArgs.add( patchModuleValue.toString() );
+ compilerArgs.add(patchModuleValue.toString());
+ } else {
+ getLog().debug("Black-box testing - all is ready to compile");
}
- else
- {
- getLog().debug( "Black-box testing - all is ready to compile" );
- }
- }
- else
- {
+ } else {
// No main binaries available? Means we're a test-only project.
- if ( !mainOutputDirectory.exists() )
- {
+ if (!mainOutputDirectory.exists()) {
return;
}
// very odd
// Means that main sources must be compiled with -modulesource and -Xmodule:
- // However, this has a huge impact since you can't simply use it as a classpathEntry
+ // However, this has a huge impact since you can't simply use it as a classpathEntry
// due to extra folder in between
- throw new UnsupportedOperationException( "Can't compile test sources "
- + "when main sources are missing a module descriptor" );
+ throw new UnsupportedOperationException(
+ "Can't compile test sources " + "when main sources are missing a module descriptor");
}
- }
- else
- {
- if ( mainModuleDescriptor != null )
- {
- if ( compilerArgs == null )
- {
+ } else {
+ if (mainModuleDescriptor != null) {
+ if (compilerArgs == null) {
compilerArgs = new ArrayList<>();
}
- compilerArgs.add( "--patch-module" );
-
- StringBuilder patchModuleValue = new StringBuilder( mainModuleDescriptor.name() )
- .append( '=' )
- .append( mainOutputDirectory )
- .append( PS );
- for ( String root : compileSourceRoots )
- {
- patchModuleValue.append( root ).append( PS );
+ compilerArgs.add("--patch-module");
+
+ StringBuilder patchModuleValue = new StringBuilder(mainModuleDescriptor.name())
+ .append('=')
+ .append(mainOutputDirectory)
+ .append(PS);
+ for (String root : compileSourceRoots) {
+ patchModuleValue.append(root).append(PS);
}
-
- compilerArgs.add( patchModuleValue.toString() );
-
- compilerArgs.add( "--add-reads" );
- compilerArgs.add( mainModuleDescriptor.name() + "=ALL-UNNAMED" );
- }
- else
- {
+
+ compilerArgs.add(patchModuleValue.toString());
+
+ compilerArgs.add("--add-reads");
+ compilerArgs.add(mainModuleDescriptor.name() + "=ALL-UNNAMED");
+ } else {
modulepathElements = Collections.emptyList();
classpathElements = testPath;
}
}
}
- protected SourceInclusionScanner getSourceInclusionScanner( int staleMillis )
- {
+ protected SourceInclusionScanner getSourceInclusionScanner(int staleMillis) {
SourceInclusionScanner scanner;
- if ( testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty() )
- {
- scanner = new StaleSourceScanner( staleMillis );
- }
- else
- {
- if ( testIncludes.isEmpty() )
- {
- testIncludes.add( "**/*.java" );
+ if (testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty()) {
+ scanner = new StaleSourceScanner(staleMillis);
+ } else {
+ if (testIncludes.isEmpty()) {
+ testIncludes.add("**/*.java");
}
- Set excludesIncr = new HashSet<>( testExcludes );
- excludesIncr.addAll( this.testIncrementalExcludes );
- scanner = new StaleSourceScanner( staleMillis, testIncludes, excludesIncr );
+ Set excludesIncr = new HashSet<>(testExcludes);
+ excludesIncr.addAll(this.testIncrementalExcludes);
+ scanner = new StaleSourceScanner(staleMillis, testIncludes, excludesIncr);
}
return scanner;
}
- protected SourceInclusionScanner getSourceInclusionScanner( String inputFileEnding )
- {
+ protected SourceInclusionScanner getSourceInclusionScanner(String inputFileEnding) {
SourceInclusionScanner scanner;
// it's not defined if we get the ending with or without the dot '.'
- String defaultIncludePattern = "**/*" + ( inputFileEnding.startsWith( "." ) ? "" : "." ) + inputFileEnding;
-
- if ( testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty() )
- {
- testIncludes = Collections.singleton( defaultIncludePattern );
- scanner = new SimpleSourceInclusionScanner( testIncludes, Collections.emptySet() );
- }
- else
- {
- if ( testIncludes.isEmpty() )
- {
- testIncludes.add( defaultIncludePattern );
+ String defaultIncludePattern = "**/*" + (inputFileEnding.startsWith(".") ? "" : ".") + inputFileEnding;
+
+ if (testIncludes.isEmpty() && testExcludes.isEmpty() && testIncrementalExcludes.isEmpty()) {
+ testIncludes = Collections.singleton(defaultIncludePattern);
+ scanner = new SimpleSourceInclusionScanner(testIncludes, Collections.emptySet());
+ } else {
+ if (testIncludes.isEmpty()) {
+ testIncludes.add(defaultIncludePattern);
}
- Set excludesIncr = new HashSet<>( testExcludes );
- excludesIncr.addAll( this.testIncrementalExcludes );
- scanner = new SimpleSourceInclusionScanner( testIncludes, excludesIncr );
+ Set excludesIncr = new HashSet<>(testExcludes);
+ excludesIncr.addAll(this.testIncrementalExcludes);
+ scanner = new SimpleSourceInclusionScanner(testIncludes, excludesIncr);
}
return scanner;
}
- protected String getSource()
- {
+ protected String getSource() {
return testSource == null ? source : testSource;
}
- protected String getTarget()
- {
+ protected String getTarget() {
return testTarget == null ? target : testTarget;
}
-
+
@Override
- protected String getRelease()
- {
+ protected String getRelease() {
return testRelease == null ? release : testRelease;
}
- protected String getCompilerArgument()
- {
+ protected String getCompilerArgument() {
return testCompilerArgument == null ? compilerArgument : testCompilerArgument;
}
- protected Map getCompilerArguments()
- {
+ protected Map getCompilerArguments() {
return testCompilerArguments == null ? compilerArguments : testCompilerArguments;
}
- protected File getGeneratedSourcesDirectory()
- {
+ protected File getGeneratedSourcesDirectory() {
return generatedTestSourcesDirectory;
}
@Override
- protected String getDebugFileName()
- {
+ protected String getDebugFileName() {
return debugFileName;
}
@Override
- protected boolean isTestCompile()
- {
+ protected boolean isTestCompile() {
return true;
}
@Override
- protected Set getIncludes()
- {
+ protected Set getIncludes() {
return testIncludes;
}
@Override
- protected Set getExcludes()
- {
+ protected Set getExcludes() {
return testExcludes;
}
-
}
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index ae3e6708..a19ce747 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,12 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import static org.mockito.ArgumentMatchers.startsWith;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+package org.apache.maven.plugin.compiler;
import java.io.File;
import java.net.URI;
@@ -47,58 +40,60 @@
import org.apache.maven.plugin.testing.stubs.ArtifactStub;
import org.apache.maven.project.MavenProject;
-public class CompilerMojoTestCase
- extends AbstractMojoTestCase
-{
+import static org.mockito.ArgumentMatchers.startsWith;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class CompilerMojoTestCase extends AbstractMojoTestCase {
/**
* tests the ability of the plugin to compile a basic file
*
* @throws Exception
*/
- public void testCompilerBasic()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-basic-test/plugin-config.xml" );
-
- Log log = mock( Log.class );
-
- compileMojo.setLog( log );
-
+ public void testCompilerBasic() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-basic-test/plugin-config.xml");
+
+ Log log = mock(Log.class);
+
+ compileMojo.setLog(log);
+
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile0.class" );
+ File testClass = new File(compileMojo.getOutputDirectory(), "foo/TestCompile0.class");
- assertTrue( testClass.exists() );
+ assertTrue(testClass.exists());
TestCompilerMojo testCompileMojo =
- getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-basic-test/plugin-config.xml" );
+ getTestCompilerMojo(compileMojo, "target/test-classes/unit/compiler-basic-test/plugin-config.xml");
testCompileMojo.execute();
- Artifact projectArtifact = (Artifact) getVariableValueFromObject( compileMojo, "projectArtifact" );
- assertNotNull( "MCOMPILER-94: artifact file should only be null if there is nothing to compile",
- projectArtifact.getFile() );
+ Artifact projectArtifact = (Artifact) getVariableValueFromObject(compileMojo, "projectArtifact");
+ assertNotNull(
+ "MCOMPILER-94: artifact file should only be null if there is nothing to compile",
+ projectArtifact.getFile());
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile0Test.class" );
-
- verify( log ).warn( startsWith( "No explicit value set for target or release!" ) );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestCompile0Test.class");
- assertTrue( testClass.exists() );
+ verify(log).warn(startsWith("No explicit value set for target or release!"));
+
+ assertTrue(testClass.exists());
}
-
- public void testCompilerBasicSourceTarget()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-basic-sourcetarget/plugin-config.xml" );
-
- Log log = mock( Log.class );
-
- compileMojo.setLog( log );
-
+
+ public void testCompilerBasicSourceTarget() throws Exception {
+ CompilerMojo compileMojo =
+ getCompilerMojo("target/test-classes/unit/compiler-basic-sourcetarget/plugin-config.xml");
+
+ Log log = mock(Log.class);
+
+ compileMojo.setLog(log);
+
compileMojo.execute();
-
- verify( log, never() ).warn( startsWith( "No explicit value set for target or release!" ) );
+
+ verify(log, never()).warn(startsWith("No explicit value set for target or release!"));
}
/**
@@ -106,26 +101,24 @@ public void testCompilerBasicSourceTarget()
*
* @throws Exception
*/
- public void testCompilerEmptySource()
- throws Exception
- {
+ public void testCompilerEmptySource() throws Exception {
CompilerMojo compileMojo =
- getCompilerMojo( "target/test-classes/unit/compiler-empty-source-test/plugin-config.xml" );
+ getCompilerMojo("target/test-classes/unit/compiler-empty-source-test/plugin-config.xml");
compileMojo.execute();
- assertFalse( compileMojo.getOutputDirectory().exists() );
+ assertFalse(compileMojo.getOutputDirectory().exists());
- Artifact projectArtifact = (Artifact) getVariableValueFromObject( compileMojo, "projectArtifact" );
- assertNull( "MCOMPILER-94: artifact file should be null if there is nothing to compile",
- projectArtifact.getFile() );
+ Artifact projectArtifact = (Artifact) getVariableValueFromObject(compileMojo, "projectArtifact");
+ assertNull(
+ "MCOMPILER-94: artifact file should be null if there is nothing to compile", projectArtifact.getFile());
- TestCompilerMojo testCompileMojo =
- getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-empty-source-test/plugin-config.xml" );
+ TestCompilerMojo testCompileMojo = getTestCompilerMojo(
+ compileMojo, "target/test-classes/unit/compiler-empty-source-test/plugin-config.xml");
testCompileMojo.execute();
- assertFalse( testCompileMojo.getOutputDirectory().exists() );
+ assertFalse(testCompileMojo.getOutputDirectory().exists());
}
/**
@@ -133,48 +126,46 @@ public void testCompilerEmptySource()
*
* @throws Exception
*/
- public void testCompilerIncludesExcludes()
- throws Exception
- {
+ public void testCompilerIncludesExcludes() throws Exception {
CompilerMojo compileMojo =
- getCompilerMojo( "target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml" );
+ getCompilerMojo("target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml");
Set includes = new HashSet<>();
- includes.add( "**/TestCompile4*.java" );
- setVariableValueToObject( compileMojo, "includes", includes );
+ includes.add("**/TestCompile4*.java");
+ setVariableValueToObject(compileMojo, "includes", includes);
Set excludes = new HashSet<>();
- excludes.add( "**/TestCompile2*.java" );
- excludes.add( "**/TestCompile3*.java" );
- setVariableValueToObject( compileMojo, "excludes", excludes );
+ excludes.add("**/TestCompile2*.java");
+ excludes.add("**/TestCompile3*.java");
+ setVariableValueToObject(compileMojo, "excludes", excludes);
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile2.class" );
- assertFalse( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "foo/TestCompile2.class");
+ assertFalse(testClass.exists());
- testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile3.class" );
- assertFalse( testClass.exists() );
+ testClass = new File(compileMojo.getOutputDirectory(), "foo/TestCompile3.class");
+ assertFalse(testClass.exists());
- testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile4.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(compileMojo.getOutputDirectory(), "foo/TestCompile4.class");
+ assertTrue(testClass.exists());
- TestCompilerMojo testCompileMojo = getTestCompilerMojo( compileMojo,
- "target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml" );
+ TestCompilerMojo testCompileMojo = getTestCompilerMojo(
+ compileMojo, "target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml");
- setVariableValueToObject( testCompileMojo, "testIncludes", includes );
- setVariableValueToObject( testCompileMojo, "testExcludes", excludes );
+ setVariableValueToObject(testCompileMojo, "testIncludes", includes);
+ setVariableValueToObject(testCompileMojo, "testExcludes", excludes);
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile2TestCase.class" );
- assertFalse( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestCompile2TestCase.class");
+ assertFalse(testClass.exists());
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile3TestCase.class" );
- assertFalse( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestCompile3TestCase.class");
+ assertFalse(testClass.exists());
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile4TestCase.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestCompile4TestCase.class");
+ assertTrue(testClass.exists());
}
/**
@@ -182,304 +173,275 @@ public void testCompilerIncludesExcludes()
*
* @throws Exception
*/
- public void testCompilerFork()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-fork-test/plugin-config.xml" );
+ public void testCompilerFork() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-fork-test/plugin-config.xml");
// JAVA_HOME doesn't have to be on the PATH.
- setVariableValueToObject( compileMojo, "executable", new File( System.getenv( "JAVA_HOME" ), "bin/javac" ).getPath() );
+ setVariableValueToObject(
+ compileMojo, "executable", new File(System.getenv("JAVA_HOME"), "bin/javac").getPath());
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile1.class" );
- assertTrue( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "foo/TestCompile1.class");
+ assertTrue(testClass.exists());
TestCompilerMojo testCompileMojo =
- getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-fork-test/plugin-config.xml" );
+ getTestCompilerMojo(compileMojo, "target/test-classes/unit/compiler-fork-test/plugin-config.xml");
// JAVA_HOME doesn't have to be on the PATH.
- setVariableValueToObject( testCompileMojo, "executable", new File( System.getenv( "JAVA_HOME" ), "bin/javac" ).getPath() );
+ setVariableValueToObject(
+ testCompileMojo, "executable", new File(System.getenv("JAVA_HOME"), "bin/javac").getPath());
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile1TestCase.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestCompile1TestCase.class");
+ assertTrue(testClass.exists());
}
- public void testOneOutputFileForAllInput()
- throws Exception
- {
+ public void testOneOutputFileForAllInput() throws Exception {
CompilerMojo compileMojo =
- getCompilerMojo( "target/test-classes/unit/compiler-one-output-file-test/plugin-config.xml" );
+ getCompilerMojo("target/test-classes/unit/compiler-one-output-file-test/plugin-config.xml");
- setVariableValueToObject( compileMojo, "compilerManager", new CompilerManagerStub() );
+ setVariableValueToObject(compileMojo, "compilerManager", new CompilerManagerStub());
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "compiled.class" );
- assertTrue( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "compiled.class");
+ assertTrue(testClass.exists());
- TestCompilerMojo testCompileMojo = getTestCompilerMojo( compileMojo,
- "target/test-classes/unit/compiler-one-output-file-test/plugin-config.xml" );
+ TestCompilerMojo testCompileMojo = getTestCompilerMojo(
+ compileMojo, "target/test-classes/unit/compiler-one-output-file-test/plugin-config.xml");
- setVariableValueToObject( testCompileMojo, "compilerManager", new CompilerManagerStub() );
+ setVariableValueToObject(testCompileMojo, "compilerManager", new CompilerManagerStub());
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "compiled.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "compiled.class");
+ assertTrue(testClass.exists());
}
- public void testCompilerArgs()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-args-test/plugin-config.xml" );
+ public void testCompilerArgs() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-args-test/plugin-config.xml");
- setVariableValueToObject( compileMojo, "compilerManager", new CompilerManagerStub() );
+ setVariableValueToObject(compileMojo, "compilerManager", new CompilerManagerStub());
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "compiled.class" );
- assertTrue( testClass.exists() );
- assertEquals( Arrays.asList( "key1=value1","-Xlint","-my&special:param-with+chars/not>allowed_in_XML_element_names" ), compileMojo.compilerArgs );
+ File testClass = new File(compileMojo.getOutputDirectory(), "compiled.class");
+ assertTrue(testClass.exists());
+ assertEquals(
+ Arrays.asList("key1=value1", "-Xlint", "-my&special:param-with+chars/not>allowed_in_XML_element_names"),
+ compileMojo.compilerArgs);
}
- public void testImplicitFlagNone()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-implicit-test/plugin-config-none.xml" );
+ public void testImplicitFlagNone() throws Exception {
+ CompilerMojo compileMojo =
+ getCompilerMojo("target/test-classes/unit/compiler-implicit-test/plugin-config-none.xml");
- assertEquals( "none", compileMojo.getImplicit() );
+ assertEquals("none", compileMojo.getImplicit());
}
- public void testImplicitFlagNotSet()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-implicit-test/plugin-config-not-set.xml" );
+ public void testImplicitFlagNotSet() throws Exception {
+ CompilerMojo compileMojo =
+ getCompilerMojo("target/test-classes/unit/compiler-implicit-test/plugin-config-not-set.xml");
- assertNull( compileMojo.getImplicit() );
+ assertNull(compileMojo.getImplicit());
}
- public void testOneOutputFileForAllInput2()
- throws Exception
- {
+ public void testOneOutputFileForAllInput2() throws Exception {
CompilerMojo compileMojo =
- getCompilerMojo( "target/test-classes/unit/compiler-one-output-file-test2/plugin-config.xml" );
+ getCompilerMojo("target/test-classes/unit/compiler-one-output-file-test2/plugin-config.xml");
- setVariableValueToObject( compileMojo, "compilerManager", new CompilerManagerStub() );
+ setVariableValueToObject(compileMojo, "compilerManager", new CompilerManagerStub());
Set includes = new HashSet<>();
- includes.add( "**/TestCompile4*.java" );
- setVariableValueToObject( compileMojo, "includes", includes );
+ includes.add("**/TestCompile4*.java");
+ setVariableValueToObject(compileMojo, "includes", includes);
Set excludes = new HashSet<>();
- excludes.add( "**/TestCompile2*.java" );
- excludes.add( "**/TestCompile3*.java" );
- setVariableValueToObject( compileMojo, "excludes", excludes );
+ excludes.add("**/TestCompile2*.java");
+ excludes.add("**/TestCompile3*.java");
+ setVariableValueToObject(compileMojo, "excludes", excludes);
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "compiled.class" );
- assertTrue( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "compiled.class");
+ assertTrue(testClass.exists());
- TestCompilerMojo testCompileMojo = getTestCompilerMojo( compileMojo,
- "target/test-classes/unit/compiler-one-output-file-test2/plugin-config.xml" );
+ TestCompilerMojo testCompileMojo = getTestCompilerMojo(
+ compileMojo, "target/test-classes/unit/compiler-one-output-file-test2/plugin-config.xml");
- setVariableValueToObject( testCompileMojo, "compilerManager", new CompilerManagerStub() );
- setVariableValueToObject( testCompileMojo, "testIncludes", includes );
- setVariableValueToObject( testCompileMojo, "testExcludes", excludes );
+ setVariableValueToObject(testCompileMojo, "compilerManager", new CompilerManagerStub());
+ setVariableValueToObject(testCompileMojo, "testIncludes", includes);
+ setVariableValueToObject(testCompileMojo, "testExcludes", excludes);
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "compiled.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "compiled.class");
+ assertTrue(testClass.exists());
}
- public void testCompileFailure()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-fail-test/plugin-config.xml" );
+ public void testCompileFailure() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-fail-test/plugin-config.xml");
- setVariableValueToObject( compileMojo, "compilerManager", new CompilerManagerStub( true ) );
+ setVariableValueToObject(compileMojo, "compilerManager", new CompilerManagerStub(true));
- try
- {
+ try {
compileMojo.execute();
- fail( "Should throw an exception" );
- }
- catch ( CompilationFailureException e )
- {
- //expected
+ fail("Should throw an exception");
+ } catch (CompilationFailureException e) {
+ // expected
}
}
- public void testCompileFailOnError()
- throws Exception
- {
+ public void testCompileFailOnError() throws Exception {
CompilerMojo compileMojo =
- getCompilerMojo( "target/test-classes/unit/compiler-failonerror-test/plugin-config.xml" );
+ getCompilerMojo("target/test-classes/unit/compiler-failonerror-test/plugin-config.xml");
- setVariableValueToObject( compileMojo, "compilerManager", new CompilerManagerStub( true ) );
+ setVariableValueToObject(compileMojo, "compilerManager", new CompilerManagerStub(true));
- try
- {
+ try {
compileMojo.execute();
- assertTrue( true );
- }
- catch ( CompilationFailureException e )
- {
- fail( "The compilation error should have been consumed because failOnError = false" );
+ assertTrue(true);
+ } catch (CompilationFailureException e) {
+ fail("The compilation error should have been consumed because failOnError = false");
}
}
-
+
/**
* Tests that setting 'skipMain' to true skips compilation of the main Java source files, but that test Java source
* files are still compiled.
* @throws Exception
*/
- public void testCompileSkipMain()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
- setVariableValueToObject( compileMojo, "skipMain", true );
+ public void testCompileSkipMain() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-skip-main/plugin-config.xml");
+ setVariableValueToObject(compileMojo, "skipMain", true);
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0.class" );
- assertFalse( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0.class");
+ assertFalse(testClass.exists());
TestCompilerMojo testCompileMojo =
- getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
+ getTestCompilerMojo(compileMojo, "target/test-classes/unit/compiler-skip-main/plugin-config.xml");
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0Test.class" );
- assertTrue( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0Test.class");
+ assertTrue(testClass.exists());
}
-
+
/**
* Tests that setting 'skip' to true skips compilation of the test Java source files, but that main Java source
* files are still compiled.
* @throws Exception
*/
- public void testCompileSkipTest()
- throws Exception
- {
- CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
+ public void testCompileSkipTest() throws Exception {
+ CompilerMojo compileMojo = getCompilerMojo("target/test-classes/unit/compiler-skip-test/plugin-config.xml");
compileMojo.execute();
- File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0.class" );
- assertTrue( testClass.exists() );
+ File testClass = new File(compileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0.class");
+ assertTrue(testClass.exists());
TestCompilerMojo testCompileMojo =
- getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
- setVariableValueToObject( testCompileMojo, "skip", true );
+ getTestCompilerMojo(compileMojo, "target/test-classes/unit/compiler-skip-test/plugin-config.xml");
+ setVariableValueToObject(testCompileMojo, "skip", true);
testCompileMojo.execute();
- testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0Test.class" );
- assertFalse( testClass.exists() );
+ testClass = new File(testCompileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0Test.class");
+ assertFalse(testClass.exists());
}
- private CompilerMojo getCompilerMojo( String pomXml )
- throws Exception
- {
- File testPom = new File( getBasedir(), pomXml );
+ private CompilerMojo getCompilerMojo(String pomXml) throws Exception {
+ File testPom = new File(getBasedir(), pomXml);
- CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
+ CompilerMojo mojo = (CompilerMojo) lookupMojo("compile", testPom);
- setVariableValueToObject( mojo, "log", new DebugEnabledLog() );
- setVariableValueToObject( mojo, "projectArtifact", new ArtifactStub() );
- setVariableValueToObject( mojo, "compilePath", Collections.EMPTY_LIST );
- setVariableValueToObject( mojo, "session", getMockMavenSession() );
- setVariableValueToObject( mojo, "project", getMockMavenProject() );
- setVariableValueToObject( mojo, "mojoExecution", getMockMojoExecution() );
- setVariableValueToObject( mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE );
- setVariableValueToObject( mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET );
+ setVariableValueToObject(mojo, "log", new DebugEnabledLog());
+ setVariableValueToObject(mojo, "projectArtifact", new ArtifactStub());
+ setVariableValueToObject(mojo, "compilePath", Collections.EMPTY_LIST);
+ setVariableValueToObject(mojo, "session", getMockMavenSession());
+ setVariableValueToObject(mojo, "project", getMockMavenProject());
+ setVariableValueToObject(mojo, "mojoExecution", getMockMojoExecution());
+ setVariableValueToObject(mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE);
+ setVariableValueToObject(mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET);
return mojo;
}
- private TestCompilerMojo getTestCompilerMojo( CompilerMojo compilerMojo, String pomXml )
- throws Exception
- {
- File testPom = new File( getBasedir(), pomXml );
+ private TestCompilerMojo getTestCompilerMojo(CompilerMojo compilerMojo, String pomXml) throws Exception {
+ File testPom = new File(getBasedir(), pomXml);
- TestCompilerMojo mojo = (TestCompilerMojo) lookupMojo( "testCompile", testPom );
+ TestCompilerMojo mojo = (TestCompilerMojo) lookupMojo("testCompile", testPom);
- setVariableValueToObject( mojo, "log", new DebugEnabledLog() );
+ setVariableValueToObject(mojo, "log", new DebugEnabledLog());
- File buildDir = (File) getVariableValueFromObject( compilerMojo, "buildDirectory" );
- File testClassesDir = new File( buildDir, "test-classes" );
- setVariableValueToObject( mojo, "outputDirectory", testClassesDir );
+ File buildDir = (File) getVariableValueFromObject(compilerMojo, "buildDirectory");
+ File testClassesDir = new File(buildDir, "test-classes");
+ setVariableValueToObject(mojo, "outputDirectory", testClassesDir);
List testClasspathList = new ArrayList<>();
-
- Artifact junitArtifact = mock( Artifact.class );
- ArtifactHandler handler = mock( ArtifactHandler.class );
- when( handler.isAddedToClasspath() ).thenReturn( true );
- when( junitArtifact.getArtifactHandler() ).thenReturn( handler );
+
+ Artifact junitArtifact = mock(Artifact.class);
+ ArtifactHandler handler = mock(ArtifactHandler.class);
+ when(handler.isAddedToClasspath()).thenReturn(true);
+ when(junitArtifact.getArtifactHandler()).thenReturn(handler);
File artifactFile;
- String localRepository = System.getProperty( "localRepository" );
- if ( localRepository != null )
- {
- artifactFile = new File( localRepository, "junit/junit/3.8.1/junit-3.8.1.jar" );
- }
- else
- {
+ String localRepository = System.getProperty("localRepository");
+ if (localRepository != null) {
+ artifactFile = new File(localRepository, "junit/junit/3.8.1/junit-3.8.1.jar");
+ } else {
// for IDE
- String junitURI = org.junit.Test.class.getResource( "Test.class" ).toURI().toString();
- junitURI = junitURI.substring( "jar:".length(), junitURI.indexOf( '!' ) );
- artifactFile = new File( URI.create( junitURI ) );
+ String junitURI =
+ org.junit.Test.class.getResource("Test.class").toURI().toString();
+ junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
+ artifactFile = new File(URI.create(junitURI));
}
- when ( junitArtifact.getFile() ).thenReturn( artifactFile );
-
- testClasspathList.add( artifactFile.getAbsolutePath() );
- testClasspathList.add( compilerMojo.getOutputDirectory().getPath() );
+ when(junitArtifact.getFile()).thenReturn(artifactFile);
+
+ testClasspathList.add(artifactFile.getAbsolutePath());
+ testClasspathList.add(compilerMojo.getOutputDirectory().getPath());
String testSourceRoot = testPom.getParent() + "/src/test/java";
- setVariableValueToObject( mojo, "compileSourceRoots", Collections.singletonList( testSourceRoot ) );
+ setVariableValueToObject(mojo, "compileSourceRoots", Collections.singletonList(testSourceRoot));
MavenProject project = getMockMavenProject();
- project.setFile( testPom );
- project.addCompileSourceRoot("/src/main/java" );
- project.setArtifacts( Collections.singleton( junitArtifact ) );
- project.getBuild().setOutputDirectory( new File( buildDir, "classes" ).getAbsolutePath() );
- setVariableValueToObject( mojo, "project", project );
- setVariableValueToObject( mojo, "testPath", testClasspathList );
- setVariableValueToObject( mojo, "session", getMockMavenSession() );
- setVariableValueToObject( mojo, "mojoExecution", getMockMojoExecution() );
- setVariableValueToObject( mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE );
- setVariableValueToObject( mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET );
+ project.setFile(testPom);
+ project.addCompileSourceRoot("/src/main/java");
+ project.setArtifacts(Collections.singleton(junitArtifact));
+ project.getBuild().setOutputDirectory(new File(buildDir, "classes").getAbsolutePath());
+ setVariableValueToObject(mojo, "project", project);
+ setVariableValueToObject(mojo, "testPath", testClasspathList);
+ setVariableValueToObject(mojo, "session", getMockMavenSession());
+ setVariableValueToObject(mojo, "mojoExecution", getMockMojoExecution());
+ setVariableValueToObject(mojo, "source", AbstractCompilerMojo.DEFAULT_SOURCE);
+ setVariableValueToObject(mojo, "target", AbstractCompilerMojo.DEFAULT_TARGET);
return mojo;
}
-
- private MavenProject getMockMavenProject()
- {
+
+ private MavenProject getMockMavenProject() {
MavenProject mp = new MavenProject();
- mp.getBuild().setDirectory( "target" );
- mp.getBuild().setOutputDirectory( "target/classes" );
- mp.getBuild().setSourceDirectory( "src/main/java" );
- mp.getBuild().setTestOutputDirectory( "target/test-classes" );
+ mp.getBuild().setDirectory("target");
+ mp.getBuild().setOutputDirectory("target/classes");
+ mp.getBuild().setSourceDirectory("src/main/java");
+ mp.getBuild().setTestOutputDirectory("target/test-classes");
return mp;
}
- private MavenSession getMockMavenSession()
- {
- MavenSession session = mock( MavenSession.class );
+ private MavenSession getMockMavenSession() {
+ MavenSession session = mock(MavenSession.class);
// when( session.getPluginContext( isA(PluginDescriptor.class), isA(MavenProject.class) ) ).thenReturn(
// Collections.emptyMap() );
- when( session.getCurrentProject() ).thenReturn( getMockMavenProject() );
+ when(session.getCurrentProject()).thenReturn(getMockMavenProject());
return session;
}
- private MojoExecution getMockMojoExecution()
- {
+ private MojoExecution getMockMojoExecution() {
MojoDescriptor md = new MojoDescriptor();
- md.setGoal( "compile" );
+ md.setGoal("compile");
- MojoExecution me = new MojoExecution( md );
+ MojoExecution me = new MojoExecution(md);
PluginDescriptor pd = new PluginDescriptor();
- pd.setArtifactId( "maven-compiler-plugin" );
- md.setPluginDescriptor( pd );
+ pd.setArtifactId("maven-compiler-plugin");
+ md.setPluginDescriptor(pd);
return me;
}
diff --git a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerManagerStub.java b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerManagerStub.java
index eff1ce34..59f0a839 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerManagerStub.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerManagerStub.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler.stubs;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,29 +16,25 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler.stubs;
import org.codehaus.plexus.compiler.manager.CompilerManager;
/**
* @author Edwin Punzalan
*/
-public class CompilerManagerStub
- implements CompilerManager
-{
+public class CompilerManagerStub implements CompilerManager {
private boolean shouldFail;
- public CompilerManagerStub()
- {
- this( false );
+ public CompilerManagerStub() {
+ this(false);
}
- public CompilerManagerStub( boolean shouldFail )
- {
+ public CompilerManagerStub(boolean shouldFail) {
this.shouldFail = shouldFail;
}
- public org.codehaus.plexus.compiler.Compiler getCompiler( String compilerId )
- {
- return new CompilerStub( shouldFail );
+ public org.codehaus.plexus.compiler.Compiler getCompiler(String compilerId) {
+ return new CompilerStub(shouldFail);
}
}
diff --git a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
index 23eb392a..8131fa77 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler.stubs;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler.stubs;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
import org.codehaus.plexus.compiler.CompilerConfiguration;
import org.codehaus.plexus.compiler.CompilerException;
@@ -25,79 +28,59 @@
import org.codehaus.plexus.compiler.CompilerOutputStyle;
import org.codehaus.plexus.compiler.CompilerResult;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-
/**
* @author Edwin Punzalan
*/
-public class CompilerStub
- implements org.codehaus.plexus.compiler.Compiler
-{
+public class CompilerStub implements org.codehaus.plexus.compiler.Compiler {
private boolean shouldFail;
- public CompilerStub()
- {
- this( false );
+ public CompilerStub() {
+ this(false);
}
- public CompilerStub( boolean shouldFail )
- {
+ public CompilerStub(boolean shouldFail) {
this.shouldFail = shouldFail;
}
- public CompilerOutputStyle getCompilerOutputStyle()
- {
+ public CompilerOutputStyle getCompilerOutputStyle() {
return CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES;
}
- public String getInputFileEnding( CompilerConfiguration compilerConfiguration )
- {
+ public String getInputFileEnding(CompilerConfiguration compilerConfiguration) {
return "java";
}
- public String getOutputFileEnding( CompilerConfiguration compilerConfiguration )
- {
+ public String getOutputFileEnding(CompilerConfiguration compilerConfiguration) {
return "class";
}
- public String getOutputFile( CompilerConfiguration compilerConfiguration )
- {
+ public String getOutputFile(CompilerConfiguration compilerConfiguration) {
return "output-file";
}
- public boolean canUpdateTarget( CompilerConfiguration compilerConfiguration )
- {
+ public boolean canUpdateTarget(CompilerConfiguration compilerConfiguration) {
return false;
}
- public CompilerResult performCompile( CompilerConfiguration compilerConfiguration )
- throws CompilerException
- {
- File outputDir = new File( compilerConfiguration.getOutputLocation() );
+ public CompilerResult performCompile(CompilerConfiguration compilerConfiguration) throws CompilerException {
+ File outputDir = new File(compilerConfiguration.getOutputLocation());
- try
- {
+ try {
outputDir.mkdirs();
- File outputFile = new File( outputDir, "compiled.class" );
- if ( !outputFile.exists() && !outputFile.createNewFile() )
- {
- throw new CompilerException( "could not create output file: " + outputFile.getAbsolutePath() );
+ File outputFile = new File(outputDir, "compiled.class");
+ if (!outputFile.exists() && !outputFile.createNewFile()) {
+ throw new CompilerException("could not create output file: " + outputFile.getAbsolutePath());
}
+ } catch (IOException e) {
+ throw new CompilerException("An exception occurred while creating output file", e);
}
- catch ( IOException e )
- {
- throw new CompilerException( "An exception occurred while creating output file", e );
- }
-
- return new CompilerResult( !shouldFail,
- Collections.singletonList( new CompilerMessage( "message 1", CompilerMessage.Kind.OTHER ) ) );
+
+ return new CompilerResult(
+ !shouldFail, Collections.singletonList(new CompilerMessage("message 1", CompilerMessage.Kind.OTHER)));
}
- public String[] createCommandLine( CompilerConfiguration compilerConfiguration )
- {
+ public String[] createCommandLine(CompilerConfiguration compilerConfiguration) {
return new String[0];
}
}
diff --git a/src/test/java/org/apache/maven/plugin/compiler/stubs/DebugEnabledLog.java b/src/test/java/org/apache/maven/plugin/compiler/stubs/DebugEnabledLog.java
index 5655c67a..4663fa18 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/stubs/DebugEnabledLog.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/stubs/DebugEnabledLog.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugin.compiler.stubs;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,22 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.plugin.compiler.stubs;
import org.apache.maven.plugin.logging.SystemStreamLog;
/**
* @author Edwin Punzalan
*/
-public class DebugEnabledLog
- extends SystemStreamLog
-{
- public DebugEnabledLog()
- {
+public class DebugEnabledLog extends SystemStreamLog {
+ public DebugEnabledLog() {
super();
}
- public boolean isDebugEnabled()
- {
+ public boolean isDebugEnabled() {
return true;
}
}
diff --git a/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
index 959bdc77..1ccfd289 100644
--- a/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile0
-{
+public class TestCompile0 {
- public TestCompile0()
- {
+ public TestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
index e4a02f7d..837ab649 100644
--- a/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile0Test
- extends TestCase
-{
- public void testCompile0Test()
- {
+public class TestCompile0Test extends TestCase {
+ public void testCompile0Test() {
TestCompile0 test = new TestCompile0();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
index 959bdc77..1ccfd289 100644
--- a/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile0
-{
+public class TestCompile0 {
- public TestCompile0()
- {
+ public TestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
index 959bdc77..1ccfd289 100644
--- a/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile0
-{
+public class TestCompile0 {
- public TestCompile0()
- {
+ public TestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
index e4a02f7d..837ab649 100644
--- a/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-basic-test/src/test/java/TestCompile0Test.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile0Test
- extends TestCase
-{
- public void testCompile0Test()
- {
+public class TestCompile0Test extends TestCase {
+ public void testCompile0Test() {
TestCompile0 test = new TestCompile0();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
index 959bdc77..1ccfd289 100644
--- a/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile0
-{
+public class TestCompile0 {
- public TestCompile0()
- {
+ public TestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
index e4a02f7d..837ab649 100644
--- a/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile0Test
- extends TestCase
-{
- public void testCompile0Test()
- {
+public class TestCompile0Test extends TestCase {
+ public void testCompile0Test() {
TestCompile0 test = new TestCompile0();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java b/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
index 959bdc77..1ccfd289 100644
--- a/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
+++ b/src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile0
-{
+public class TestCompile0 {
- public TestCompile0()
- {
+ public TestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java b/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
index e4a02f7d..837ab649 100644
--- a/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
+++ b/src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile0Test
- extends TestCase
-{
- public void testCompile0Test()
- {
+public class TestCompile0Test extends TestCase {
+ public void testCompile0Test() {
TestCompile0 test = new TestCompile0();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java b/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
index c694c3fc..bbc5f788 100644
--- a/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
+++ b/src/test/resources/unit/compiler-fork-test/src/main/java/TestCompile1.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile1
-{
+public class TestCompile1 {
- public TestCompile1()
- {
+ public TestCompile1() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java b/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
index cf276f99..14288af1 100644
--- a/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
+++ b/src/test/resources/unit/compiler-fork-test/src/test/java/TestCompile1TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile1TestCase
- extends TestCase
-{
- public void testCompile1()
- {
+public class TestCompile1TestCase extends TestCase {
+ public void testCompile1() {
TestCompile1 test = new TestCompile1();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
index ff8fa234..6e2a6ec2 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile2.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile2
-{
+public class TestCompile2 {
- public TestCompile2()
- {
+ public TestCompile2() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
index e618ca9a..2f33e30e 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile3.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile3
-{
+public class TestCompile3 {
- public TestCompile3()
- {
+ public TestCompile3() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
index 779c8d0a..7e519324 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile4
-{
+public class TestCompile4 {
- public TestCompile4()
- {
+ public TestCompile4() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
index b0520395..ea864c36 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile2TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile2TestCase
- extends TestCase
-{
- public void testCompile2()
- {
+public class TestCompile2TestCase extends TestCase {
+ public void testCompile2() {
TestCompile2 test = new TestCompile2();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
index 9f77f435..4f1fe01c 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile3TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile3TestCase
- extends TestCase
-{
- public void testCompile3()
- {
+public class TestCompile3TestCase extends TestCase {
+ public void testCompile3() {
TestCompile3 test = new TestCompile3();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
index 2210fc13..c357cb87 100644
--- a/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-includes-excludes-test/src/test/java/TestCompile4TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile4TestCase
- extends TestCase
-{
- public void testCompile4()
- {
+public class TestCompile4TestCase extends TestCase {
+ public void testCompile4() {
TestCompile4 test = new TestCompile4();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
index ff8fa234..6e2a6ec2 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile2
-{
+public class TestCompile2 {
- public TestCompile2()
- {
+ public TestCompile2() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
index e618ca9a..2f33e30e 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile3
-{
+public class TestCompile3 {
- public TestCompile3()
- {
+ public TestCompile3() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
index 779c8d0a..7e519324 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile4
-{
+public class TestCompile4 {
- public TestCompile4()
- {
+ public TestCompile4() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
index b0520395..ea864c36 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile2TestCase
- extends TestCase
-{
- public void testCompile2()
- {
+public class TestCompile2TestCase extends TestCase {
+ public void testCompile2() {
TestCompile2 test = new TestCompile2();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
index 9f77f435..4f1fe01c 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile3TestCase
- extends TestCase
-{
- public void testCompile3()
- {
+public class TestCompile3TestCase extends TestCase {
+ public void testCompile3() {
TestCompile3 test = new TestCompile3();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
index 2210fc13..c357cb87 100644
--- a/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile4TestCase
- extends TestCase
-{
- public void testCompile4()
- {
+public class TestCompile4TestCase extends TestCase {
+ public void testCompile4() {
TestCompile4 test = new TestCompile4();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
index e187e0c4..6e2a6ec2 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile2.java
@@ -18,12 +18,10 @@
*/
package foo;
-public class TestCompile2
-{
+public class TestCompile2 {
- public TestCompile2()
- {
+ public TestCompile2() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
index e618ca9a..2f33e30e 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile3.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile3
-{
+public class TestCompile3 {
- public TestCompile3()
- {
+ public TestCompile3() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
index 779c8d0a..7e519324 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/main/java/TestCompile4.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestCompile4
-{
+public class TestCompile4 {
- public TestCompile4()
- {
+ public TestCompile4() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
index b0520395..ea864c36 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile2TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile2TestCase
- extends TestCase
-{
- public void testCompile2()
- {
+public class TestCompile2TestCase extends TestCase {
+ public void testCompile2() {
TestCompile2 test = new TestCompile2();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
index 9f77f435..4f1fe01c 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile3TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile3TestCase
- extends TestCase
-{
- public void testCompile3()
- {
+public class TestCompile3TestCase extends TestCase {
+ public void testCompile3() {
TestCompile3 test = new TestCompile3();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
index 2210fc13..c357cb87 100644
--- a/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
+++ b/src/test/resources/unit/compiler-one-output-file-test2/src/test/java/TestCompile4TestCase.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestCompile4TestCase
- extends TestCase
-{
- public void testCompile4()
- {
+public class TestCompile4TestCase extends TestCase {
+ public void testCompile4() {
TestCompile4 test = new TestCompile4();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java b/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
index a7805d70..2a118bf2 100644
--- a/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
+++ b/src/test/resources/unit/compiler-skip-main/src/main/java/TestSkipMainCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestSkipMainCompile0
-{
+public class TestSkipMainCompile0 {
- public TestSkipMainCompile0()
- {
+ public TestSkipMainCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java b/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
index d3d66b49..e6c7d965 100644
--- a/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
+++ b/src/test/resources/unit/compiler-skip-main/src/test/java/TestSkipMainCompile0Test.java
@@ -20,11 +20,6 @@
import junit.framework.TestCase;
-public class TestSkipMainCompile0Test
- extends TestCase
-{
- public void testSkipMainCompile0Test()
- {
-
- }
-}
\ No newline at end of file
+public class TestSkipMainCompile0Test extends TestCase {
+ public void testSkipMainCompile0Test() {}
+}
diff --git a/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java b/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
index 08911a95..ebb007e2 100644
--- a/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
+++ b/src/test/resources/unit/compiler-skip-test/src/main/java/TestSkipTestCompile0.java
@@ -18,13 +18,10 @@
*/
package foo;
-public class TestSkipTestCompile0
-{
+public class TestSkipTestCompile0 {
- public TestSkipTestCompile0()
- {
+ public TestSkipTestCompile0() {
- System.out.println( "Woo Hoo!" );
+ System.out.println("Woo Hoo!");
}
-
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java b/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
index 0c64e554..d316c10d 100644
--- a/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
+++ b/src/test/resources/unit/compiler-skip-test/src/test/java/TestSkipTestCompile0Test.java
@@ -20,11 +20,8 @@
import junit.framework.TestCase;
-public class TestSkipTestCompile0Test
- extends TestCase
-{
- public void testSkipTestCompile0Test()
- {
+public class TestSkipTestCompile0Test extends TestCase {
+ public void testSkipTestCompile0Test() {
TestSkipTestCompile0 test = new TestSkipTestCompile0();
}
-}
\ No newline at end of file
+}
From e304ceb91cb625399638f95be41e6c23ca0970d0 Mon Sep 17 00:00:00 2001
From: Guillaume Nodet
Date: Mon, 13 Feb 2023 09:20:30 +0100
Subject: [PATCH 58/64] [MCOMPILER-526] Ignore reformat commit for git blame
---
.git-blame-ignore-revs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 .git-blame-ignore-revs
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 00000000..25f76f2c
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Change maven code style
+f7a4613eaa2364dcaf10f96f04a6b1afb2feb7ed
From 86b9f5972bcb005305f8abb8fb1f3c0d89df2726 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0irok=C3=BD?=
Date: Mon, 13 Feb 2023 10:28:21 +0100
Subject: [PATCH 59/64] [MCOMPILER-395] Allow dependency exclusions for
'annotationProcessorPaths' (#173)
Co-authored-by: Guillaume Nodet
---
.../annotation-processor-dep/pom.xml | 34 +++++++
.../AnnotationProcessorDependency.java | 21 +++++
.../annotation-processor/pom.xml | 41 +++++++++
.../SimpleAnnotationProcessor.java | 85 +++++++++++++++++
.../annotation-user/pom.xml | 77 ++++++++++++++++
.../java/mcompiler395/SimpleAnnotation.java | 28 ++++++
.../main/java/mcompiler395/SimpleObject.java | 22 +++++
.../java/mcompiler395/SimpleTestObject.java | 22 +++++
.../invoker.properties | 18 ++++
.../pom.xml | 48 ++++++++++
.../plugin/compiler/AbstractCompilerMojo.java | 31 ++++++-
.../plugin/compiler/DependencyCoordinate.java | 64 ++++---------
.../plugin/compiler/DependencyExclusion.java | 92 +++++++++++++++++++
13 files changed, 537 insertions(+), 46 deletions(-)
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/pom.xml
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/src/main/java/mcompiler395/AnnotationProcessorDependency.java
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/pom.xml
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/src/main/java/mcompiler395/SimpleAnnotationProcessor.java
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/pom.xml
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleAnnotation.java
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleObject.java
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/test/java/mcompiler395/SimpleTestObject.java
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/invoker.properties
create mode 100644 src/it/MCOMPILER-395-processorpath-exclude-deps/pom.xml
create mode 100644 src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/pom.xml b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/pom.xml
new file mode 100644
index 00000000..0c6da32d
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/pom.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler395-annotation-processor-dep
+
+
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/src/main/java/mcompiler395/AnnotationProcessorDependency.java b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/src/main/java/mcompiler395/AnnotationProcessorDependency.java
new file mode 100644
index 00000000..001845b8
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/src/main/java/mcompiler395/AnnotationProcessorDependency.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mcompiler395;
+
+public class AnnotationProcessorDependency {}
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/pom.xml b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/pom.xml
new file mode 100644
index 00000000..b180db0c
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/pom.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler395-annotation-processor
+
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-annotation-processor-dep
+ 1.0.0-SNAPSHOT
+
+
+
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/src/main/java/mcompiler395/SimpleAnnotationProcessor.java b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/src/main/java/mcompiler395/SimpleAnnotationProcessor.java
new file mode 100644
index 00000000..9ee6229e
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/src/main/java/mcompiler395/SimpleAnnotationProcessor.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mcompiler395;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.tools.FileObject;
+import javax.tools.StandardLocation;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Set;
+
+@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedAnnotationTypes("mcompiler395.SimpleAnnotation")
+public class SimpleAnnotationProcessor extends AbstractProcessor {
+
+ @Override
+ public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ if (annotations.isEmpty()) {
+ return true;
+ }
+
+ // assert that mcompiler395-annotation-processor-dep is NOT on the processorpath, since it is excluded
+ // in the plugin configuration
+ try {
+ getClass().getClassLoader().loadClass("mcompiler395.AnnotationProcessorDependency");
+ throw new RuntimeException("Expected a ClassNotFoundException, because "
+ + "mcompiler395.AnnotationProcessorDependency is not supposed to be on the processorpath.");
+ } catch (ClassNotFoundException expected) {
+ // expected
+ }
+
+ Filer filer = processingEnv.getFiler();
+
+ Elements elementUtils = processingEnv.getElementUtils();
+
+ Set extends Element> elements =
+ roundEnv.getElementsAnnotatedWith(annotations.iterator().next());
+
+ for (Element element : elements) {
+ Name name = element.getSimpleName();
+
+ PackageElement packageElement = elementUtils.getPackageOf(element);
+
+ try {
+ Name packageName = packageElement.getQualifiedName();
+ FileObject resource =
+ filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + ".txt", element);
+
+ Writer writer = resource.openWriter();
+ writer.write(name.toString());
+ writer.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return !elements.isEmpty();
+ }
+}
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/pom.xml b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/pom.xml
new file mode 100644
index 00000000..b5e40524
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/pom.xml
@@ -0,0 +1,77 @@
+
+
+
+
+ 4.0.0
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-test
+ 1.0.0-SNAPSHOT
+
+
+ mcompiler395-annotation-user
+
+
+
+
+ maven-compiler-plugin
+
+
+ mcompiler395.SimpleAnnotationProcessor
+
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-annotation-processor
+ 1.0.0-SNAPSHOT
+
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-annotation-processor-dep
+
+
+
+
+
+
+
+ org.apache.maven.plugins.compiler.it
+ annotation-verify-plugin
+ 1.0.0-SNAPSHOT
+
+
+ verify-annotations
+ process-test-classes
+
+ read-source
+
+
+ mcompiler395.SimpleObject
+ mcompiler395.SimpleTestObject
+
+
+
+
+
+
+
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleAnnotation.java b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleAnnotation.java
new file mode 100644
index 00000000..361cfefa
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleAnnotation.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mcompiler395;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface SimpleAnnotation {}
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleObject.java b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleObject.java
new file mode 100644
index 00000000..60cee1ef
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleObject.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mcompiler395;
+
+@SimpleAnnotation
+public class SimpleObject {}
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/test/java/mcompiler395/SimpleTestObject.java b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/test/java/mcompiler395/SimpleTestObject.java
new file mode 100644
index 00000000..15d51903
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/test/java/mcompiler395/SimpleTestObject.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mcompiler395;
+
+@SimpleAnnotation
+public class SimpleTestObject {}
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/invoker.properties b/src/it/MCOMPILER-395-processorpath-exclude-deps/invoker.properties
new file mode 100644
index 00000000..a0a3964f
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals=process-test-classes
diff --git a/src/it/MCOMPILER-395-processorpath-exclude-deps/pom.xml b/src/it/MCOMPILER-395-processorpath-exclude-deps/pom.xml
new file mode 100644
index 00000000..cf9dec7b
--- /dev/null
+++ b/src/it/MCOMPILER-395-processorpath-exclude-deps/pom.xml
@@ -0,0 +1,48 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins.compiler.it
+ mcompiler395-test
+ 1.0.0-SNAPSHOT
+ pom
+
+
+ annotation-processor-dep
+ annotation-processor
+ annotation-user
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @project.version@
+
+
+
+
+
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index b199e24d..aff9059b 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -80,6 +80,7 @@
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.collection.CollectRequest;
import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.Exclusion;
import org.eclipse.aether.resolution.ArtifactResult;
import org.eclipse.aether.resolution.DependencyRequest;
import org.eclipse.aether.resolution.DependencyResult;
@@ -299,7 +300,7 @@ public abstract class AbstractCompilerMojo extends AbstractMojo {
*
*
* Each classpath element is specified using their Maven coordinates (groupId, artifactId, version, classifier,
- * type). Transitive dependencies are added automatically. Example:
+ * type). Transitive dependencies are added automatically. Exclusions are supported as well. Example:
*
*
+ * Note: Exclusions are supported from version 3.11.0.
+ *
* @since 3.5
*/
@Parameter
@@ -1604,11 +1614,28 @@ private List convertToDependencies(List annota
annotationProcessorPath.getClassifier(),
handler.getExtension(),
annotationProcessorPath.getVersion());
- dependencies.add(new Dependency(artifact, JavaScopes.RUNTIME));
+ Set exclusions = convertToAetherExclusions(annotationProcessorPath.getExclusions());
+ dependencies.add(new Dependency(artifact, JavaScopes.RUNTIME, false, exclusions));
}
return dependencies;
}
+ private Set convertToAetherExclusions(Set exclusions) {
+ if (exclusions == null || exclusions.isEmpty()) {
+ return Collections.emptySet();
+ }
+ Set aetherExclusions = new HashSet<>();
+ for (DependencyExclusion exclusion : exclusions) {
+ Exclusion aetherExclusion = new Exclusion(
+ exclusion.getGroupId(),
+ exclusion.getArtifactId(),
+ exclusion.getClassifier(),
+ exclusion.getExtension());
+ aetherExclusions.add(aetherExclusion);
+ }
+ return aetherExclusions;
+ }
+
private void writePlugin(MessageBuilder mb) {
mb.a(" ").newline();
mb.a(" org.apache.maven.plugins").newline();
diff --git a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
index 593ca5ef..19609499 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.java
@@ -18,6 +18,9 @@
*/
package org.apache.maven.plugin.compiler;
+import java.util.Objects;
+import java.util.Set;
+
/**
* Simple representation of Maven-coordinates of a dependency.
*
@@ -35,6 +38,8 @@ public class DependencyCoordinate {
private String type = "jar";
+ private Set exclusions;
+
public String getGroupId() {
return groupId;
}
@@ -75,16 +80,17 @@ public void setType(String type) {
this.type = type;
}
+ public Set getExclusions() {
+ return exclusions;
+ }
+
+ public void setExclusions(Set exclusions) {
+ this.exclusions = exclusions;
+ }
+
@Override
public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((artifactId == null) ? 0 : artifactId.hashCode());
- result = prime * result + ((classifier == null) ? 0 : classifier.hashCode());
- result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
+ return Objects.hash(groupId, artifactId, version, classifier, type, exclusions);
}
@Override
@@ -99,42 +105,12 @@ public boolean equals(Object obj) {
return false;
}
DependencyCoordinate other = (DependencyCoordinate) obj;
- if (artifactId == null) {
- if (other.artifactId != null) {
- return false;
- }
- } else if (!artifactId.equals(other.artifactId)) {
- return false;
- }
- if (classifier == null) {
- if (other.classifier != null) {
- return false;
- }
- } else if (!classifier.equals(other.classifier)) {
- return false;
- }
- if (groupId == null) {
- if (other.groupId != null) {
- return false;
- }
- } else if (!groupId.equals(other.groupId)) {
- return false;
- }
- if (type == null) {
- if (other.type != null) {
- return false;
- }
- } else if (!type.equals(other.type)) {
- return false;
- }
- if (version == null) {
- if (other.version != null) {
- return false;
- }
- } else if (!version.equals(other.version)) {
- return false;
- }
- return true;
+ return Objects.equals(groupId, other.groupId)
+ && Objects.equals(artifactId, other.artifactId)
+ && Objects.equals(version, other.version)
+ && Objects.equals(classifier, other.classifier)
+ && Objects.equals(type, other.type)
+ && Objects.equals(exclusions, other.exclusions);
}
@Override
diff --git a/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java b/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java
new file mode 100644
index 00000000..352f0e89
--- /dev/null
+++ b/src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugin.compiler;
+
+import java.util.Objects;
+
+/**
+ * Simple representation of a Maven dependency exclusion.
+ */
+public class DependencyExclusion {
+ private String groupId;
+
+ private String artifactId;
+
+ private String classifier;
+
+ private String extension = "jar";
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getClassifier() {
+ return classifier;
+ }
+
+ public void setClassifier(String classifier) {
+ this.classifier = classifier;
+ }
+
+ public String getExtension() {
+ return extension;
+ }
+
+ public void setExtension(String extension) {
+ this.extension = extension;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null || getClass() != obj.getClass()) {
+ return false;
+ }
+ DependencyExclusion other = (DependencyExclusion) obj;
+ return Objects.equals(groupId, other.groupId)
+ && Objects.equals(artifactId, other.artifactId)
+ && Objects.equals(classifier, other.classifier)
+ && Objects.equals(extension, other.extension);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(groupId, artifactId, classifier, extension);
+ }
+
+ @Override
+ public String toString() {
+ return groupId + ":" + artifactId + (classifier != null ? ":" + classifier : "")
+ + (extension != null ? "." + extension : "");
+ }
+}
From f4a8a54e116b07e888ac7b6371fa24b7a81517b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jorge=20Sol=C3=B3rzano?=
Date: Mon, 13 Feb 2023 11:00:49 +0100
Subject: [PATCH 60/64] [MCOMPILER-525] Incorrect detection of dependency
change (#172)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jorge Solórzano
Co-authored-by: Guillaume Nodet
---
src/it/MCOMPILER-525/invoker.properties | 21 ++++++
src/it/MCOMPILER-525/pom.xml | 64 +++++++++++++++++++
.../src/main/java/myproject/HelloWorld.java | 34 ++++++++++
src/it/MCOMPILER-525/verify.groovy | 44 +++++++++++++
.../plugin/compiler/AbstractCompilerMojo.java | 2 +-
5 files changed, 164 insertions(+), 1 deletion(-)
create mode 100644 src/it/MCOMPILER-525/invoker.properties
create mode 100644 src/it/MCOMPILER-525/pom.xml
create mode 100644 src/it/MCOMPILER-525/src/main/java/myproject/HelloWorld.java
create mode 100644 src/it/MCOMPILER-525/verify.groovy
diff --git a/src/it/MCOMPILER-525/invoker.properties b/src/it/MCOMPILER-525/invoker.properties
new file mode 100644
index 00000000..da0f0927
--- /dev/null
+++ b/src/it/MCOMPILER-525/invoker.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# NOTE: The first time, we run up to "integration-test" phase which includes the AntRun execution which saves the
+# timestamp of the first JAR for comparison with the timestamp of the JAR from the final "package" invocation.
+# Note:
+invoker.goals = clean integration-test package -Dmaven.compiler.showCompilationChanges=true
diff --git a/src/it/MCOMPILER-525/pom.xml b/src/it/MCOMPILER-525/pom.xml
new file mode 100644
index 00000000..48de91e9
--- /dev/null
+++ b/src/it/MCOMPILER-525/pom.xml
@@ -0,0 +1,64 @@
+
+
+
+ 4.0.0
+ org.apache.maven.plugins
+ MCOMPILER-525-no-recreation
+ MCOMPILER-525-no-recreation
+ jar
+ 1.0-SNAPSHOT
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ @project.version@
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.3.0
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 3.1.0
+
+
+ touch
+ integration-test
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/it/MCOMPILER-525/src/main/java/myproject/HelloWorld.java b/src/it/MCOMPILER-525/src/main/java/myproject/HelloWorld.java
new file mode 100644
index 00000000..8318e9fb
--- /dev/null
+++ b/src/it/MCOMPILER-525/src/main/java/myproject/HelloWorld.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package myproject;
+
+/**
+ * The classic Hello World App.
+ */
+public class HelloWorld {
+
+ /**
+ * Main method.
+ *
+ * @param args Not used
+ */
+ public static void main(String[] args) {
+ System.out.println("Hi!");
+ }
+}
diff --git a/src/it/MCOMPILER-525/verify.groovy b/src/it/MCOMPILER-525/verify.groovy
new file mode 100644
index 00000000..0e97225d
--- /dev/null
+++ b/src/it/MCOMPILER-525/verify.groovy
@@ -0,0 +1,44 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.nio.file.*;
+import java.time.*;
+import java.time.temporal.*
+import java.util.*;
+
+File target = new File( basedir, "target" );
+assert target.isDirectory()
+
+File jarFile = new File( target, "MCOMPILER-525-no-recreation-1.0-SNAPSHOT.jar" );
+assert jarFile.isFile()
+
+File refFile = new File( target, "reference.jar" );
+assert refFile.isFile()
+
+Instant referenceTimestamp = Files.getLastModifiedTime( refFile.toPath() )
+ .toInstant().truncatedTo( ChronoUnit.MILLIS );
+System.out.println( "Reference timestamp: " + referenceTimestamp );
+
+Instant actualTimestamp = Files.getLastModifiedTime( jarFile.toPath() )
+ .toInstant().truncatedTo( ChronoUnit.MILLIS );
+System.out.println( "Actual timestamp : " + actualTimestamp );
+
+assert referenceTimestamp.equals(actualTimestamp),
+ "Timestamps don't match, JAR was recreated although contents has not changed"
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index aff9059b..ad68b4f0 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -1538,7 +1538,7 @@ protected boolean isDependencyChanged() {
for (String pathElement : pathElements) {
File artifactPath = new File(pathElement);
if (artifactPath.isDirectory() || artifactPath.isFile()) {
- if (hasNewFile(artifactPath, buildStartTime)) {
+ if (!artifactPath.equals(getOutputDirectory()) && hasNewFile(artifactPath, buildStartTime)) {
if (showCompilationChanges) {
getLog().info("New dependency detected: " + artifactPath.getAbsolutePath());
} else {
From 4022bd0f37626124dad394b2e4583fd6768fa74a Mon Sep 17 00:00:00 2001
From: "David M. Lloyd"
Date: Mon, 13 Feb 2023 06:17:46 -0600
Subject: [PATCH 61/64] [MCOMPILER-494] - Add a `useModulePath` switch to the
`testCompile` mojo (#119)
Co-authored-by: Guillaume Nodet
---
.../plugin/compiler/TestCompilerMojo.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index 4bbdc7e0..d091825e 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -161,6 +161,18 @@ public class TestCompilerMojo extends AbstractCompilerMojo {
@Parameter(defaultValue = "${project.build.directory}/generated-test-sources/test-annotations")
private File generatedTestSourcesDirectory;
+ /**
+ *
+ * When {@code true}, uses the module path when compiling with a release or target of 9+ and
+ * module-info.java or module-info.class is present.
+ * When {@code false}, always uses the class path.
+ *