You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/11/11 10:58:00 UTC

[GitHub] [maven] slawekjaranowski commented on a diff in pull request #869: [MNG-7338] Automatically activate batch-mode and make output quiet when running in CI.

slawekjaranowski commented on code in PR #869:
URL: https://github.com/apache/maven/pull/869#discussion_r1020113059


##########
maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java:
##########
@@ -1438,6 +1446,33 @@ private MavenExecutionRequest populateRequest( CliRequest cliRequest, MavenExecu
         return request;
     }
 
+    private void disableInteractiveModeIfNeeded( final CliRequest cliRequest, final MavenExecutionRequest request )
+    {
+        CommandLine commandLine = cliRequest.getCommandLine();
+        if ( commandLine.hasOption( FORCE_INTERACTIVE ) )
+        {
+            return;
+        }
+
+        boolean runningOnCI = isRunningOnCI( cliRequest.getSystemProperties() );
+        if ( runningOnCI )
+        {
+            slf4jLogger.info( "Detected a CI build, because the environment variable CI equals \"true\". "
+                + "Disable this detection by removing that variable or adding --force-interactive." );

Review Comment:
   What does mean that we detected CI builds?
   maybe, some thing like:
   
   ```
   Using non interactive build due to CI environment present.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org