[maven] branch master updated (8ceb6c6 -> d740200)

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git.


from 8ceb6c6  [MNG-7063] Infinite loop using Shade plugin and JUnit 5 
dependency
 add d740200  [MNG-7107] relax profile id validation, different from 
coordinate id

No new revisions were added by this update.

Summary of changes:
 .../model/validation/DefaultModelValidator.java| 116 ++---
 .../validation/DefaultModelValidatorTest.java  |  18 ++--
 ...-ids-pom.xml => invalid-coordinate-ids-pom.xml} |   0
 ...alid-profile-id.xml => invalid-profile-ids.xml} |  15 +++
 4 files changed, 106 insertions(+), 43 deletions(-)
 rename 
maven-model-builder/src/test/resources/poms/validation/{invalid-ids-pom.xml => 
invalid-coordinate-ids-pom.xml} (100%)
 rename 
maven-model-builder/src/test/resources/poms/validation/{invalid-profile-id.xml 
=> invalid-profile-ids.xml} (75%)



[maven] 01/01: [MNG-7107] relax profile id validation, different from coordinate id

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git

commit d740200811830e1cb794af787ad243cce6957a23
Author: Hervé Boutemy 
AuthorDate: Fri Feb 26 08:25:22 2021 +0100

[MNG-7107] relax profile id validation, different from coordinate id
---
 .../model/validation/DefaultModelValidator.java| 116 ++---
 .../validation/DefaultModelValidatorTest.java  |  18 ++--
 ...-ids-pom.xml => invalid-coordinate-ids-pom.xml} |   0
 ...alid-profile-id.xml => invalid-profile-ids.xml} |  15 +++
 4 files changed, 106 insertions(+), 43 deletions(-)

diff --git 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index ba812b5..2e71520 100644
--- 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -85,7 +85,9 @@ public class DefaultModelValidator
 
 private static final String EMPTY = "";
 
-private final Set validIds = new HashSet<>();
+private final Set validCoordinateIds = new HashSet<>();
+
+private final Set validProfileIds = new HashSet<>();
 
 @Override
 public void validateFileModel( Model m, ModelBuildingRequest request, 
ModelProblemCollector problems )
@@ -190,7 +192,7 @@ public class DefaultModelValidator
 {
 String prefix = "profiles.profile[" + profile.getId() + "].";
 
-validateId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
+validateProfileId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
 
 if ( !profileIds.add( profile.getId() ) )
 {
@@ -358,9 +360,9 @@ public class DefaultModelValidator
 {
 validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, 
Version.BASE, m.getModelVersion(), m );
 
-validateId( "groupId", problems, m.getGroupId(), m );
+validateCoordinateId( "groupId", problems, m.getGroupId(), m );
 
-validateId( "artifactId", problems, m.getArtifactId(), m );
+validateCoordinateId( "artifactId", problems, m.getArtifactId(), m );
 
 validateStringNotEmpty( "packaging", problems, Severity.ERROR, 
Version.BASE, m.getPackaging(), m );
 
@@ -668,10 +670,10 @@ public class DefaultModelValidator
 private void validateEffectiveDependency( ModelProblemCollector problems, 
Dependency d, boolean management,
   String prefix, 
ModelBuildingRequest request )
 {
-validateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
+validateCoordinateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
 d.getManagementKey(), d );
 
-validateId( prefix, "groupId", problems, Severity.ERROR, Version.BASE, 
d.getGroupId(),
+validateCoordinateId( prefix, "groupId", problems, Severity.ERROR, 
Version.BASE, d.getGroupId(),
 d.getManagementKey(), d );
 
 if ( !management )
@@ -727,19 +729,21 @@ public class DefaultModelValidator
 {
 if ( request.getValidationLevel() < 
ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 )
 {
-validateId( prefix, "exclusions.exclusion.groupId", 
problems, Severity.WARNING, Version.V20,
-exclusion.getGroupId(), d.getManagementKey(), 
exclusion );
+validateCoordinateId( prefix, 
"exclusions.exclusion.groupId", problems, Severity.WARNING,
+  Version.V20, exclusion.getGroupId(), 
d.getManagementKey(), exclusion );
 
-validateId( prefix, "exclusions.exclusion.artifactId", 
problems, Severity.WARNING, Version.V20,
-exclusion.getArtifactId(), 
d.getManagementKey(), exclusion );
+validateCoordinateId( prefix, 
"exclusions.exclusion.artifactId", problems, Severity.WARNING,
+  Version.V20, 
exclusion.getArtifactId(), d.getManagementKey(), exclusion );
 }
 else
 {
-validateIdWithWildcards( prefix, 
"exclusions.exclusion.groupId", problems, Severity.WARNING,
- Version.V30, 
exclusion.getGroupId(), d.getManagementKey(), exclusion );
+validateCoordinateIdWithWildcards( prefix, 
"exclusions.exclusion.groupId", problems,
+   Severity.WARNING, 
Version.V30, exclusion.getGroupId(),
+   

[maven] branch MNG-7107 updated (2b919c9 -> d740200)

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 2b919c9  [MNG-7107] relax profile id validation, different from 
coordinate id
 new d740200  [MNG-7107] relax profile id validation, different from 
coordinate id

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2b919c9)
\
 N -- N -- N   refs/heads/MNG-7107 (d740200)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../model/validation/DefaultModelValidator.java| 26 --
 1 file changed, 14 insertions(+), 12 deletions(-)



[maven-gpg-plugin] 01/01: Merge pull request #11 from Syquel/bugfix/MGPG-80

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git

commit b38c6387cb3c8892fdac8ed47ddc9d2892810ed5
Merge: 9808611 64e1d4e
Author: Elliotte Rusty Harold 
AuthorDate: Fri Feb 26 16:45:03 2021 +

Merge pull request #11 from Syquel/bugfix/MGPG-80

[MGPG-81] check format in constructor

 .../org/apache/maven/plugins/gpg/GpgVersion.java   | 93 +-
 .../maven/plugins/gpg/GpgVersionConsumerTest.java  |  2 +-
 2 files changed, 39 insertions(+), 56 deletions(-)



[maven-gpg-plugin] branch master updated (9808611 -> b38c638)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git.


from 9808611  Bump junit from 4.13 to 4.13.1
 add 64e1d4e  [MGPG-81] refactor GpgVersion
 new b38c638  Merge pull request #11 from Syquel/bugfix/MGPG-80

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/maven/plugins/gpg/GpgVersion.java   | 93 +-
 .../maven/plugins/gpg/GpgVersionConsumerTest.java  |  2 +-
 2 files changed, 39 insertions(+), 56 deletions(-)



[maven-compiler-plugin] branch check created (now e4fd3e6)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch check
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git.


  at e4fd3e6  [MCOMPILER-428] Improve incremental compilation documentation

No new revisions were added by this update.



[maven-gpg-plugin] branch check created (now 64e1d4e)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch check
in repository https://gitbox.apache.org/repos/asf/maven-gpg-plugin.git.


  at 64e1d4e  [MGPG-81] refactor GpgVersion

No new revisions were added by this update.



[maven-install-plugin] 01/01: docs: grammar

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch elharo-patch-1
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git

commit 85b8d1d2b2d513e00dc050340ea51912bacb46f6
Author: Elliotte Rusty Harold 
AuthorDate: Fri Feb 26 16:31:08 2021 +

docs: grammar

@rfscholte
---
 src/main/java/org/apache/maven/plugins/install/InstallMojo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java 
b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
index 277687f..b01c114 100644
--- a/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
+++ b/src/main/java/org/apache/maven/plugins/install/InstallMojo.java
@@ -77,7 +77,7 @@ public class InstallMojo
 private boolean installAtEnd;
 
 /**
- * Set this to true to bypass artifact installation. Use this 
for artifacts that does not need to be
+ * Set this to true to bypass artifact installation. Use this 
for artifacts that do not need to be
  * installed in the local repository.
  * 
  * @since 2.4



[maven-install-plugin] branch elharo-patch-1 created (now 85b8d1d)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch elharo-patch-1
in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git.


  at 85b8d1d  docs: grammar

This branch includes the following new commits:

 new 85b8d1d  docs: grammar

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[maven-shared-utils] branch master updated: Test, fix, and deprecate buggy copyDirectory methods (#80)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git


The following commit(s) were added to refs/heads/master by this push:
 new ab2cc93  Test, fix, and deprecate buggy copyDirectory methods (#80)
ab2cc93 is described below

commit ab2cc9348b3f60c7fdcc8167432ab9d519346fba
Author: Elliotte Rusty Harold 
AuthorDate: Fri Feb 26 14:01:19 2021 +

Test, fix, and deprecate buggy copyDirectory methods (#80)

Unignore copyDirectory tests and fix broken behavior that caused them to be 
ignored. Deprecate these methods in favor of better maintained and documented 
Apache Commons IO methods from which they were copied and pasted 10+ years ago.
---
 .../apache/maven/shared/utils/io/FileUtils.java|  58 +--
 .../maven/shared/utils/io/FileUtilsTest.java   | 189 -
 2 files changed, 73 insertions(+), 174 deletions(-)

diff --git a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java 
b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
index f194782..4612b37 100644
--- a/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
+++ b/src/main/java/org/apache/maven/shared/utils/io/FileUtils.java
@@ -19,6 +19,7 @@ package org.apache.maven.shared.utils.io;
  * under the License.
  */
 
+import org.apache.commons.io.IOUtils;
 import org.apache.maven.shared.utils.Os;
 import org.apache.maven.shared.utils.StringUtils;
 
@@ -52,13 +53,14 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 import java.util.Random;
 
 /**
  * This class provides basic facilities for manipulating files and file paths.
- * 
+ *
  * Path-related methods
- * 
+ * 
  * Methods exist to retrieve the components of a typical file path. For 
example
  * /www/hosted/mysite/index.html, can be broken into:
  * 
@@ -68,13 +70,12 @@ import java.util.Random;
  * 
  * 
  * File-related methods
- * 
+ * 
  * There are methods to create a {@link #toFile File from a URL}, copy a
  * {@link #copyFile File to another File},
  * copy a {@link #copyURLToFile URL's contents to a File},
  * as well as methods to {@link #deleteDirectory(File) delete} and {@link 
#cleanDirectory(File)
  * clean} a directory.
- * 
  * 
  * Common {@link java.io.File} manipulation routines.
  * 
@@ -89,7 +90,6 @@ import java.util.Random;
  * @author mailto:christoph.r...@dlr.de;>Christoph.Reck
  * @author mailto:pe...@apache.org;>Peter Donald
  * @author mailto:je...@apache.org;>Jeff Turner
- *
  */
 public class FileUtils
 {
@@ -633,7 +633,7 @@ public class FileUtils
 try ( InputStream input1 = new FileInputStream( file1 );
 InputStream  input2 = new FileInputStream( file2 ) )
 { 
-return IOUtil.contentEquals( input1, input2 );
+return IOUtils.contentEquals( input1, input2 );
 }
 }
 
@@ -750,7 +750,7 @@ public class FileUtils
 {
 if ( destinationDirectory.exists() && 
!destinationDirectory.isDirectory() )
 {
-throw new IllegalArgumentException( "Destination is not a 
directory" );
+throw new IOException( "Destination is not a directory" );
 }
 
 copyFile( source, new File( destinationDirectory, source.getName() ) );
@@ -1022,9 +1022,9 @@ public class FileUtils
 }
 
 /**
- * Resolve a file filename to it's canonical form. If 
filename is
- * relative (doesn't start with /), it will be resolved 
relative to
- * baseFile, otherwise it is treated as a normal 
root-relative path.
+ * Resolve a file filename to its canonical form. If 
filename is
+ * relative (doesn't start with /), it is resolved relative to
+ * baseFile. Otherwise it is treated as a normal 
root-relative path.
  *
  * @param baseFile where to resolve filename from, if 
filename is relative
  * @param filename absolute or relative file path to resolve
@@ -1605,14 +1605,30 @@ public class FileUtils
 /**
  * Copy the contents of a directory into another one.
  *
- * @param sourceDirectory  the source directory
- * @param destinationDirectory the target directory
+ * @param sourceDirectory the source directory. If the source does not 
exist,
+ * the method simply returns.
+ * @param destinationDirectory the target directory; will be created if it 
doesn't exist
  * @throws IOException if any
+ * @deprecated use {@code org.apache.commons.io.FileUtils.copyDirectory()}
  */
+@Deprecated
 public static void copyDirectory( @Nonnull File sourceDirectory, @Nonnull 
File destinationDirectory )
 throws IOException
 {
-copyDirectory( sourceDirectory, destinationDirectory, "**", null );
+Objects.requireNonNull( sourceDirectory );
+Objects.requireNonNull( destinationDirectory );
+if ( 

[maven-shared-utils] branch null updated (2104faf -> 784ff96)

2021-02-26 Thread elharo
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch null
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git.


from 2104faf  Merge branch 'master' into null
 add 784ff96  format

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/maven/shared/utils/io/FileUtils.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)



[maven-surefire] 02/02: [travisci] openjdk15

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 25e13331e54bd6b287b205679c7f6687552d3456
Author: tibordigana 
AuthorDate: Fri Feb 26 12:35:56 2021 +0100

[travisci] openjdk15
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index ba10e50..963469f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,7 +23,7 @@ cache:
   - "$HOME/.m2"
 
 install: true
-jdk: openjdk14
+jdk: openjdk15
 
 jobs:
   include:



[maven-surefire] branch jdk-16-17 updated (10e73f0 -> 25e1333)

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a change to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


from 10e73f0  fix
 new 5681a8e  excluded java 16 in UmlautDirIT
 new 25e1333  [travisci] openjdk15

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml| 2 +-
 .../src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java   | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)



[maven-surefire] 01/02: excluded java 16 in UmlautDirIT

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 5681a8e0782d157ffd292f41c0d874e6f82e52ec
Author: tibordigana 
AuthorDate: Fri Feb 26 12:35:06 2021 +0100

excluded java 16 in UmlautDirIT
---
 .../src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java   | 7 +++
 1 file changed, 7 insertions(+)

diff --git 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java 
b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
index e0095e0..8bcdfd4 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
@@ -33,6 +33,7 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import static 
org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersionExcluded;
 import static java.nio.file.Files.copy;
 import static java.nio.file.Files.createDirectories;
 import static java.nio.file.Files.exists;
@@ -53,6 +54,12 @@ public class UmlautDirIT extends 
SurefireJUnit4IntegrationTestCase
 @Before
 public void backupLocalRepo()
 {
+// We touched the Javac bug, see the discussion [1].
+// The fix [2] will be in Java 17, not in Java 16. So we cannot use 
Java 16 then!
+// [1]: 
http://ant.1045680.n5.nabble.com/JDK-16-is-in-Rampdown-Phase-One-td5720549.html#a5720552
+// [2]: https://bugs.openjdk.java.net/browse/JDK-8258246
+assumeJavaVersionExcluded( 16 );
+
 localRepo = System.getProperty( "maven.repo.local" );
 }
 



[maven] 01/01: [MNG-7107] relax profile id validation, different from coordinate id

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 2b919c9bcd8881eefefe98071b28c01404929904
Author: Hervé Boutemy 
AuthorDate: Fri Feb 26 08:25:22 2021 +0100

[MNG-7107] relax profile id validation, different from coordinate id
---
 .../model/validation/DefaultModelValidator.java| 90 --
 .../validation/DefaultModelValidatorTest.java  | 18 +++--
 ...-ids-pom.xml => invalid-coordinate-ids-pom.xml} |  0
 ...alid-profile-id.xml => invalid-profile-ids.xml} | 15 
 4 files changed, 92 insertions(+), 31 deletions(-)

diff --git 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index ba812b5..51c7e57 100644
--- 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -85,7 +85,9 @@ public class DefaultModelValidator
 
 private static final String EMPTY = "";
 
-private final Set validIds = new HashSet<>();
+private final Set validCoordinateIds = new HashSet<>();
+
+private final Set validProfileIds = new HashSet<>();
 
 @Override
 public void validateFileModel( Model m, ModelBuildingRequest request, 
ModelProblemCollector problems )
@@ -190,7 +192,7 @@ public class DefaultModelValidator
 {
 String prefix = "profiles.profile[" + profile.getId() + "].";
 
-validateId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
+validateProfileId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
 
 if ( !profileIds.add( profile.getId() ) )
 {
@@ -358,9 +360,9 @@ public class DefaultModelValidator
 {
 validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, 
Version.BASE, m.getModelVersion(), m );
 
-validateId( "groupId", problems, m.getGroupId(), m );
+validateCoordinateId( "groupId", problems, m.getGroupId(), m );
 
-validateId( "artifactId", problems, m.getArtifactId(), m );
+validateCoordinateId( "artifactId", problems, m.getArtifactId(), m );
 
 validateStringNotEmpty( "packaging", problems, Severity.ERROR, 
Version.BASE, m.getPackaging(), m );
 
@@ -668,10 +670,10 @@ public class DefaultModelValidator
 private void validateEffectiveDependency( ModelProblemCollector problems, 
Dependency d, boolean management,
   String prefix, 
ModelBuildingRequest request )
 {
-validateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
+validateCoordinateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
 d.getManagementKey(), d );
 
-validateId( prefix, "groupId", problems, Severity.ERROR, Version.BASE, 
d.getGroupId(),
+validateCoordinateId( prefix, "groupId", problems, Severity.ERROR, 
Version.BASE, d.getGroupId(),
 d.getManagementKey(), d );
 
 if ( !management )
@@ -727,11 +729,11 @@ public class DefaultModelValidator
 {
 if ( request.getValidationLevel() < 
ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 )
 {
-validateId( prefix, "exclusions.exclusion.groupId", 
problems, Severity.WARNING, Version.V20,
-exclusion.getGroupId(), d.getManagementKey(), 
exclusion );
+validateCoordinateId( prefix, 
"exclusions.exclusion.groupId", problems, Severity.WARNING,
+  Version.V20, exclusion.getGroupId(), 
d.getManagementKey(), exclusion );
 
-validateId( prefix, "exclusions.exclusion.artifactId", 
problems, Severity.WARNING, Version.V20,
-exclusion.getArtifactId(), 
d.getManagementKey(), exclusion );
+validateCoordinateId( prefix, 
"exclusions.exclusion.artifactId", problems, Severity.WARNING,
+  Version.V20, 
exclusion.getArtifactId(), d.getManagementKey(), exclusion );
 }
 else
 {
@@ -830,17 +832,18 @@ public class DefaultModelValidator
 // Field validation
 // --
 
-private boolean validateId( String fieldName, ModelProblemCollector 
problems, String id,
-InputLocationTracker tracker )
+private boolean validateCoordinateId( String fieldName, 
ModelProblemCollector problems, String id,
+  

[maven] branch MNG-7107 updated (154c09d -> 2b919c9)

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 154c09d  [MNG-7107] relax profile id validation, different from 
coordinate id
 new 2b919c9  [MNG-7107] relax profile id validation, different from 
coordinate id

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (154c09d)
\
 N -- N -- N   refs/heads/MNG-7107 (2b919c9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/maven/model/validation/DefaultModelValidator.java  | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)



[maven] branch MNG-7107 updated (0ff735d -> 154c09d)

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 0ff735d  [MNG-7107] relax profile id validation, different from 
coordinate id
 new 154c09d  [MNG-7107] relax profile id validation, different from 
coordinate id

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0ff735d)
\
 N -- N -- N   refs/heads/MNG-7107 (154c09d)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/maven/model/validation/DefaultModelValidator.java  | 11 +--
 .../maven/model/validation/DefaultModelValidatorTest.java |  4 +++-
 .../test/resources/poms/validation/invalid-profile-ids.xml|  8 +++-
 3 files changed, 19 insertions(+), 4 deletions(-)



[maven] 01/01: [MNG-7107] relax profile id validation, different from coordinate id

2021-02-26 Thread hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-7107
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 154c09df77dfb669bb25347270681b1de59f694b
Author: Hervé Boutemy 
AuthorDate: Fri Feb 26 08:25:22 2021 +0100

[MNG-7107] relax profile id validation, different from coordinate id
---
 .../model/validation/DefaultModelValidator.java| 85 --
 .../validation/DefaultModelValidatorTest.java  | 18 +++--
 ...-ids-pom.xml => invalid-coordinate-ids-pom.xml} |  0
 ...alid-profile-id.xml => invalid-profile-ids.xml} | 15 
 4 files changed, 89 insertions(+), 29 deletions(-)

diff --git 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index ba812b5..d6b27d9 100644
--- 
a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ 
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -85,7 +85,9 @@ public class DefaultModelValidator
 
 private static final String EMPTY = "";
 
-private final Set validIds = new HashSet<>();
+private final Set validCoordinateIds = new HashSet<>();
+
+private final Set validProfileIds = new HashSet<>();
 
 @Override
 public void validateFileModel( Model m, ModelBuildingRequest request, 
ModelProblemCollector problems )
@@ -190,7 +192,7 @@ public class DefaultModelValidator
 {
 String prefix = "profiles.profile[" + profile.getId() + "].";
 
-validateId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
+validateProfileId( prefix, "id", problems, Severity.ERROR, 
Version.V40, profile.getId(), null, m );
 
 if ( !profileIds.add( profile.getId() ) )
 {
@@ -358,9 +360,9 @@ public class DefaultModelValidator
 {
 validateStringNotEmpty( "modelVersion", problems, Severity.ERROR, 
Version.BASE, m.getModelVersion(), m );
 
-validateId( "groupId", problems, m.getGroupId(), m );
+validateCoordinateId( "groupId", problems, m.getGroupId(), m );
 
-validateId( "artifactId", problems, m.getArtifactId(), m );
+validateCoordinateId( "artifactId", problems, m.getArtifactId(), m );
 
 validateStringNotEmpty( "packaging", problems, Severity.ERROR, 
Version.BASE, m.getPackaging(), m );
 
@@ -668,10 +670,10 @@ public class DefaultModelValidator
 private void validateEffectiveDependency( ModelProblemCollector problems, 
Dependency d, boolean management,
   String prefix, 
ModelBuildingRequest request )
 {
-validateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
+validateCoordinateId( prefix, "artifactId", problems, Severity.ERROR, 
Version.BASE, d.getArtifactId(),
 d.getManagementKey(), d );
 
-validateId( prefix, "groupId", problems, Severity.ERROR, Version.BASE, 
d.getGroupId(),
+validateCoordinateId( prefix, "groupId", problems, Severity.ERROR, 
Version.BASE, d.getGroupId(),
 d.getManagementKey(), d );
 
 if ( !management )
@@ -727,10 +729,10 @@ public class DefaultModelValidator
 {
 if ( request.getValidationLevel() < 
ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 )
 {
-validateId( prefix, "exclusions.exclusion.groupId", 
problems, Severity.WARNING, Version.V20,
+validateCoordinateId( prefix, 
"exclusions.exclusion.groupId", problems, Severity.WARNING, Version.V20,
 exclusion.getGroupId(), d.getManagementKey(), 
exclusion );
 
-validateId( prefix, "exclusions.exclusion.artifactId", 
problems, Severity.WARNING, Version.V20,
+validateCoordinateId( prefix, 
"exclusions.exclusion.artifactId", problems, Severity.WARNING, Version.V20,
 exclusion.getArtifactId(), 
d.getManagementKey(), exclusion );
 }
 else
@@ -830,17 +832,18 @@ public class DefaultModelValidator
 // Field validation
 // --
 
-private boolean validateId( String fieldName, ModelProblemCollector 
problems, String id,
-InputLocationTracker tracker )
+private boolean validateCoordinateId( String fieldName, 
ModelProblemCollector problems, String id,
+  InputLocationTracker tracker )
 {
-return validateId( EMPTY, fieldName, problems, Severity.ERROR, 
Version.BASE, id, null, tracker );
+return validateCoordinateId( EMPTY, fieldName, problems, 
Severity.ERROR, 

[maven-surefire] branch jdk-16-17 updated: fix

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/jdk-16-17 by this push:
 new 10e73f0  fix
10e73f0 is described below

commit 10e73f0065749d31f557957c98beff2a7e5a6558
Author: tibordigana 
AuthorDate: Fri Feb 26 10:37:48 2021 +0100

fix
---
 Jenkinsfile| 4 ++--
 README.md  | 6 +++---
 maven-failsafe-plugin/pom.xml  | 2 +-
 maven-surefire-plugin/src/site/apt/developing.apt.vm   | 2 +-
 pom.xml| 4 ++--
 surefire-its/pom.xml   | 4 ++--
 surefire-its/src/test/resources/java9-full-api/pom.xml | 4 ++--
 surefire-its/src/test/resources/toolchains.xml | 2 +-
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 050c048..540040b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -151,7 +151,7 @@ def buildProcess(String stageKey, String jdkName, String 
jdkTestName, String mvn
 ]) {
 sh '$JAVA_HOME_IT/bin/java -version'
 sh 'echo JAVA_HOME=$JAVA_HOME, JAVA_HOME_IT=$JAVA_HOME_IT, 
PATH=$PATH'
-def script = cmd + ['\"-Djdk.home=$JAVA_HOME_IT\"']
+def script = cmd + ['\"-DjdkHome=$JAVA_HOME_IT\"']
 def error = sh(returnStatus: true, script: script.join(' 
'))
 currentBuild.result = error == 0 ? 'SUCCESS' : 'FAILURE'
 }
@@ -163,7 +163,7 @@ def buildProcess(String stageKey, String jdkName, String 
jdkTestName, String mvn
 ]) {
 bat '%JAVA_HOME_IT%\\bin\\java -version'
 bat 'echo JAVA_HOME=%JAVA_HOME%, 
JAVA_HOME_IT=%JAVA_HOME_IT%, PATH=%PATH%'
-def script = cmd + ['\"-Djdk.home=%JAVA_HOME_IT%\"']
+def script = cmd + ['\"-DjdkHome=%JAVA_HOME_IT%\"']
 def error = bat(returnStatus: true, script: script.join(' 
'))
 currentBuild.result = error == 0 ? 'SUCCESS' : 'FAILURE'
 }
diff --git a/README.md b/README.md
index e9c0fba..7be267a 100644
--- a/README.md
+++ b/README.md
@@ -59,13 +59,13 @@ Build the Surefire project using **Maven 3.1.0+** and **JDK 
1.8+**.
   set MAVEN_OPTS="-server -Xmx256m -XX:MetaspaceSize=128m 
-XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication 
-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 
-Djava.awt.headless=true -Dhttps.protocols=TLSv1.2"
   ```
 
-* In order to run the tests with **JDK 1.7** (on Linux/Unix modify the system 
property **jdk.home**):  
+* In order to run the tests with **JDK 1.7** (on Linux/Unix modify the system 
property **jdkHome**):  
   ```
-  mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program 
Files\Java\jdk1.7.0_80\"
+  mvn install site site:stage -P reporting,run-its "-DjdkHome=e:\Program 
Files\Java\jdk1.7.0_80\"
   ```
 * In order to run the build and the tests with **JDK 1.8+**, e.g. JDK 11:
   ```
-  mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program 
Files\Java\jdk11\"
+  mvn install site site:stage -P reporting,run-its "-DjdkHome=e:\Program 
Files\Java\jdk11\"
   ```
   
 
diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index fcf9677..f9ef2ec 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -291,7 +291,7 @@
 
 
 
-${jdk.home}
+${jdkHome}
 
 
 
diff --git a/maven-surefire-plugin/src/site/apt/developing.apt.vm 
b/maven-surefire-plugin/src/site/apt/developing.apt.vm
index dcae1d7..7c8ccb2 100644
--- a/maven-surefire-plugin/src/site/apt/developing.apt.vm
+++ b/maven-surefire-plugin/src/site/apt/developing.apt.vm
@@ -119,7 +119,7 @@ ForkedBooter#main
   and other modules are compiled with source/target 1.7. The plugin and 
several providers are 1.7.
   The provider <<>> is compiled with jdk1.8.
   The project requires using <<>> jdk1.8 but the tests run with 
jdk1.7+ which is
-  configured by system property <<>>, see <<>>.
+  configured by system property <<>>, see <<>>.
 
 * Provider Isolation
 
diff --git a/pom.xml b/pom.xml
index 6782431..3e36523 100644
--- a/pom.xml
+++ b/pom.xml
@@ -514,7 +514,7 @@
 ${jvm.args.tests}
 false
 false
-${jdk.home}/bin/java
+${jdkHome}/bin/java
   
 
 
@@ -674,7 +674,7 @@
 jvm9ArgsTests
 
 
-

[maven-surefire] branch jdk-16-17 updated: fix

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/jdk-16-17 by this push:
 new 988384e  fix
988384e is described below

commit 988384eb5a81923f73687d155f5d447a36ef432d
Author: tibordigana 
AuthorDate: Fri Feb 26 10:26:14 2021 +0100

fix
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index e996320..6782431 100644
--- a/pom.xml
+++ b/pom.xml
@@ -669,6 +669,7 @@
 
 
 
+jdkHome
 doSkipTests
 jvm9ArgsTests
 



[maven-surefire] branch jdk-16-17 updated: fix

2021-02-26 Thread tibordigana
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch jdk-16-17
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/jdk-16-17 by this push:
 new cfa4426  fix
cfa4426 is described below

commit cfa44266c28a6fa472f3507a15e3fee12ca79781
Author: tibordigana 
AuthorDate: Fri Feb 26 10:14:05 2021 +0100

fix
---
 pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 6d186a9..e996320 100644
--- a/pom.xml
+++ b/pom.xml
@@ -675,7 +675,9 @@
 
 jdkHome = 
session.getUserProperties().getProperty("jdk.home", 
project.getProperties().getProperty("jdk.home"));
 if (jdkHome == null || jdkHome.isEmpty()) {
-jdkHome = System.getProperty("java.home");
+jreHome = System.getProperty("java.home");
+jrePath = new File(jreHome);
+jdkHome = "jre".equals(jrePath.getName()) ? 
jrePath.getParent() : jrePath.getPath();
 }
 release = new File(jdkHome, "release");
 System.out.println("Beanshell found jdkHome=" + 
jdkHome);



[maven-scripting-plugin] 01/01: basic java scripting engine support

2021-02-26 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch rmannibucau/java-scripting-draft
in repository https://gitbox.apache.org/repos/asf/maven-scripting-plugin.git

commit 0346ed96d069c6a4edcd6bf980fea7409169e84d
Author: Romain Manni-Bucau 
AuthorDate: Fri Feb 26 09:41:24 2021 +0100

basic java scripting engine support
---
 pom.xml|  38 ++
 src/it/java/pom.xml|  68 
 src/it/java/verify.bsh |  44 +++
 .../plugins/scripting/AbstractScriptEvaluator.java |  22 +-
 .../apache/maven/plugins/scripting/EvalMojo.java   |  70 +++-
 .../plugins/scripting/FileScriptEvaluator.java |   5 +-
 .../plugins/scripting/StringScriptEvaluator.java   |   4 +-
 .../plugins/scripting/engine/JavaScriptEngine.java | 422 +
 .../scripting/engine/JavaScriptEngineFactory.java  | 133 +++
 .../scripting/engine/JavaScriptEngineTest.java |  99 +
 10 files changed, 897 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index 13fb174..5b20d0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,6 +69,7 @@ under the License.
 3.0
 1.8
 1.8
+2.8.8
 
2021-02-24T19:52:25Z
   
 
@@ -96,6 +97,42 @@ under the License.
   provided
 
 
+
+
+  org.codehaus.plexus
+  plexus-compiler-api
+  ${plexus.compiler.version}
+  
+
+  org.codehaus.plexus
+  plexus-component-api
+
+  
+
+
+  org.codehaus.plexus
+  plexus-compiler-manager
+  ${plexus.compiler.version}
+  
+
+  org.codehaus.plexus
+  plexus-component-api
+
+  
+
+
+  org.codehaus.plexus
+  plexus-compiler-javac
+  ${plexus.compiler.version}
+  runtime
+  
+
+  org.codehaus.plexus
+  plexus-component-api
+
+  
+
+
 
 
   junit
@@ -133,6 +170,7 @@ under the License.
 verify
 
${project.build.directory}/local-repo
 src/it/settings.xml
+verify.bsh
 
   scripting:eval
 
diff --git a/src/it/java/pom.xml b/src/it/java/pom.xml
new file mode 100644
index 000..0db926d
--- /dev/null
+++ b/src/it/java/pom.xml
@@ -0,0 +1,68 @@
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  org.apache.maven.plugins.scripting.its
+  java
+  1.0.0-SNAPSHOT
+  pom
+  
+  
+
+  
+org.apache.maven.plugins
+maven-scripting-plugin
+@project.version@
+
+  java
+  
+MyMain
+1
+2
+3
+4
+5
+6
+  
+  
+  
+  
+
+  
+
+  
+
diff --git a/src/it/java/verify.bsh b/src/it/java/verify.bsh
new file mode 100644
index 000..a0f3f98
--- /dev/null
+++ b/src/it/java/verify.bsh
@@ -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.
+ */
+
+// beanshell does not like much java.nio.file so let's use java.io which is 
more than enough for us
+import java.util.stream.Collectors;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.File;
+
+File file = new File( basedir, "target/out" );
+if ( !file.exists() )
+{
+throw new FileNotFoundException( "Could 

[maven-scripting-plugin] branch rmannibucau/java-scripting-draft created (now 0346ed9)

2021-02-26 Thread rmannibucau
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a change to branch rmannibucau/java-scripting-draft
in repository https://gitbox.apache.org/repos/asf/maven-scripting-plugin.git.


  at 0346ed9  basic java scripting engine support

This branch includes the following new commits:

 new 0346ed9  basic java scripting engine support

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.