title: System.out.print() invisible until new line in exec-maven-plugin
body: <p>This is very strange, and now i explain this with detail.
  I am in Intellij Idea 2021.3, i make a Maven project, with jdk Amazon-corretto-11.
  I use the plugin org.codehaus.mojo:exec-maven-plugin to run the program, and this is the program:</p>
  <pre><code>public static void main(String[] args) throws InterruptedException {
      System.out.println(&quot;hello&quot;);
      System.out.print(&quot;ok&quot;);
      Thread.sleep(2000);
  }
  </code></pre>
  <p>The fact is, that it correctly prints &quot;hello&quot;, but i do not see &quot;ok&quot; until the program ends or a new line is printed. I tried this in a classic project (no maven) and the &quot;ok&quot; appears instantly.
  pom.xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;org.example&lt;/groupId&gt;
  &lt;artifactId&gt;TempTest&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
  &lt;properties&gt;
      &lt;JAVA_HOME&gt;C:\Users\user\.jdks\corretto-11.0.12&lt;/JAVA_HOME&gt;
      &lt;maven.compiler.source&gt;11&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;11&lt;/maven.compiler.target&gt;
  &lt;/properties&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.6.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-cli&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exec&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;arguments&gt;
                              &lt;argument&gt;--module-path&lt;/argument&gt;
                              &lt;!-- automatically creates the modulepath using all project dependencies, also adding the project build directory --&gt;
                              &lt;modulepath/&gt;
                              &lt;argument&gt;-classpath&lt;/argument&gt;
                              &lt;!-- automatically creates the classpath using all project dependencies, also adding the project build directory --&gt;
                              &lt;classpath/&gt;
                              &lt;argument&gt;com.gabrik.TempTest&lt;/argument&gt;
                          &lt;/arguments&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;${JAVA_HOME}/bin/java&lt;/executable&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Any help would be appreciated, note that this weird thing ONLY happens if i am in a maven project AND i run with org.codehaus.mojo:exec-maven-plugin, otherwise the text &quot;ok&quot; appears.
  I tried to reboot my pc, to create another project repeating the same steps, but the problem persists</p>