You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/08/04 14:17:18 UTC

[maven-integration-testing] branch removed-java-tools-2 created (now 5be07fd)

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a change to branch removed-java-tools-2
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.


      at 5be07fd  new Surefire version with new feature 'excludedEnvironmentVariables' excluding Jenkins' env 'JAVA_TOOL_OPTIONS'

This branch includes the following new commits:

     new 78e14cb  [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI).
     new 5be07fd  new Surefire version with new feature 'excludedEnvironmentVariables' excluding Jenkins' env 'JAVA_TOOL_OPTIONS'

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.



[maven-integration-testing] 02/02: new Surefire version with new feature 'excludedEnvironmentVariables' excluding Jenkins' env 'JAVA_TOOL_OPTIONS'

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch removed-java-tools-2
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 5be07fd52727ef09dcc29539e80fb6aff534ad3b
Author: tibordigana <ti...@apache.org>
AuthorDate: Thu Aug 1 09:11:57 2019 +0200

    new Surefire version with new feature 'excludedEnvironmentVariables' excluding Jenkins' env 'JAVA_TOOL_OPTIONS'
---
 pom.xml | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index cca422b..8944c66 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,13 +86,29 @@ under the License.
     <repository>
       <id>apache.snapshots</id>
       <name>Apache Snapshot Repository</name>
-      <url>http://repository.apache.org/snapshots</url>
+      <url>https://repository.apache.org/content/groups/snapshots</url>
       <releases>
         <enabled>false</enabled>
       </releases>
     </repository>
   </repositories>
 
+  <pluginRepositories>
+    <pluginRepository>
+      <id>apache.snapshots.plugins</id>
+      <name>Apache Snapshot Plugin Repository</name>
+      <url>https://repository.apache.org/content/groups/snapshots</url>
+      <snapshots>
+        <enabled>true</enabled>
+        <updatePolicy>always</updatePolicy>
+        <checksumPolicy>ignore</checksumPolicy>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </pluginRepository>
+  </pluginRepositories>
+
   <profiles>
     <profile>
       <id>reporting</id>
@@ -132,11 +148,14 @@ under the License.
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.22.0</version>
+          <version>3.0.0-SNAPSHOT</version>
           <configuration>
             <environmentVariables>
               <JENKINS_MAVEN_AGENT_DISABLED>true</JENKINS_MAVEN_AGENT_DISABLED>
             </environmentVariables>
+			<excludedEnvironmentVariables>
+			  <excludedEnvironmentVariable>JAVA_TOOL_OPTIONS</excludedEnvironmentVariable>
+			</excludedEnvironmentVariables>
           </configuration>
         </plugin>
         <plugin>


[maven-integration-testing] 01/02: [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI).

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch removed-java-tools-2
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 78e14cb619102a499f40893c9dcb82768709f8f5
Author: tibordigana <ti...@apache.org>
AuthorDate: Tue Jul 30 11:47:46 2019 +0200

    [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI).
    
    (cherry picked from commit 1d5db0a67c4595b853a012ec984c246ba078b374)
---
 core-it-suite/pom.xml                              |  4 ++++
 .../maven/it/AbstractMavenIntegrationTestCase.java | 27 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/core-it-suite/pom.xml b/core-it-suite/pom.xml
index e1c484d..444b31c 100644
--- a/core-it-suite/pom.xml
+++ b/core-it-suite/pom.xml
@@ -193,6 +193,10 @@ under the License.
               <name>maven.it.global-settings.dir</name>
               <value>${project.build.testOutputDirectory}</value>
             </property>
+            <property>
+              <name>maven.skip.rc</name>
+              <value>${maven.skip.rc}</value>
+            </property>
           </systemProperties>
         </configuration>
       </plugin>
diff --git a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
index 7e3c42a..102f3e7 100644
--- a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
+++ b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
@@ -43,6 +43,11 @@ public abstract class AbstractMavenIntegrationTestCase
     extends TestCase
 {
     /**
+     * Skips using ".mavenrc" on the system. For more information, see 'MAVEN_SKIP_RC' in $MAVEN_DIST/bin/mvn.
+     */
+    private static final boolean MAVEN_SKIP_RC = isMavenSkipRc();
+
+    /**
      * Save System.out for progress reports etc.
      */
     private static PrintStream out = System.out;
@@ -495,6 +500,11 @@ public abstract class AbstractMavenIntegrationTestCase
     {
         Verifier verifier = new Verifier( basedir, debug );
 
+        if ( MAVEN_SKIP_RC )
+        {
+            verifier.setEnvironmentVariable( "MAVEN_SKIP_RC", "1" );
+        }
+
         verifier.setAutoclean( false );
 
         if ( settings != null )
@@ -601,4 +611,21 @@ public abstract class AbstractMavenIntegrationTestCase
     {
         assertCanonicalFileEquals( null, new File( expected ), new File( actual ) );
     }
+
+    private static boolean isMavenSkipRc()
+    {
+        boolean skipRc = Boolean.getBoolean( "maven.skip.rc" );
+
+        if ( skipRc )
+        {
+            System.out.println( "SKIPPED - Skipped '.mavenrc'!" );
+        }
+        else
+        {
+            System.out.println( "In order to disable '.mavenrc' set the system property 'maven.skip.rc', i.e. "
+                    + "'mvn -Dmaven.skip.rc=true -P run-its verify'." );
+        }
+
+        return skipRc;
+    }
 }