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/07/30 09:49:31 UTC

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

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1d5db0a  [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI).
1d5db0a is described below

commit 1d5db0a67c4595b853a012ec984c246ba078b374
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).
---
 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;
+    }
 }


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

Posted by Hervé BOUTEMY <he...@free.fr>.
issue fixed, this commit causes more harm than anything else
-1, please revert

Regards,

Hervé

Le mercredi 31 juillet 2019, 19:01:29 CEST Hervé BOUTEMY a écrit :
> doing
> 
> > +        if ( MAVEN_SKIP_RC )
> > +        {
> > +            verifier.setEnvironmentVariable( "MAVEN_SKIP_RC", "1" );
> > +        }
> 
> requires forked execution of Maven
> this de-facto disables embedder mode
> 
> as a consequence, we can see on ASF Jenkins server [1] that build time for
> core ITs has doubled.
> 
> Where has this commit been tested before being merged into master?
> Where has the discussion on merging to master happened?
> 
> Regards,
> 
> Hervé
> 
> [1]
> https://builds.apache.org/view/M-R/view/Maven/job/maven-box/job/maven/job/m
> aster/
> Le mardi 30 juillet 2019, 11:49:31 CEST tibordigana@apache.org a écrit :
> > This is an automated email from the ASF dual-hosted git repository.
> > 
> > tibordigana pushed a commit to branch master
> > in repository
> > https://gitbox.apache.org/repos/asf/maven-integration-testing.git
> > 
> > The following commit(s) were added to refs/heads/master by this push:
> >      new 1d5db0a  [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and
> > 
> > '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI). 1d5db0a is
> > described below
> > 
> > commit 1d5db0a67c4595b853a012ec984c246ba078b374
> > 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). ---
> > 
> >  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/Abstra
> > c
> > tMavenIntegrationTestCase.java
> > b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstra
> > c
> > tMavenIntegrationTestCase.java index 7e3c42a..102f3e7 100644
> > ---
> > a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstra
> > c
> > tMavenIntegrationTestCase.java +++
> > b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstra
> > c
> > tMavenIntegrationTestCase.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;
> > +    }
> > 
> >  }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


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

Posted by Hervé BOUTEMY <he...@free.fr>.
doing
> +        if ( MAVEN_SKIP_RC )
> +        {
> +            verifier.setEnvironmentVariable( "MAVEN_SKIP_RC", "1" );
> +        }
requires forked execution of Maven
this de-facto disables embedder mode

as a consequence, we can see on ASF Jenkins server [1] that build time for core ITs has doubled.

Where has this commit been tested before being merged into master?
Where has the discussion on merging to master happened?

Regards,

Hervé

[1] https://builds.apache.org/view/M-R/view/Maven/job/maven-box/job/maven/job/master/

Le mardi 30 juillet 2019, 11:49:31 CEST tibordigana@apache.org a écrit :
> This is an automated email from the ASF dual-hosted git repository.
> 
> tibordigana pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/maven-integration-testing.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>      new 1d5db0a  [MNG-6725] Skip '.mavenrc' via MAVEN_SKIP_RC=1 and
> '-Dmaven.skip.rc=true' on child ITs (by default on Jenkins CI). 1d5db0a is
> described below
> 
> commit 1d5db0a67c4595b853a012ec984c246ba078b374
> 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). ---
>  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/Abstrac
> tMavenIntegrationTestCase.java
> b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstrac
> tMavenIntegrationTestCase.java index 7e3c42a..102f3e7 100644
> ---
> a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstrac
> tMavenIntegrationTestCase.java +++
> b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Abstrac
> tMavenIntegrationTestCase.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;
> +    }
>  }





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org