title: Netbeans with Maven - Strange class behaviour
body: <p>I currently have a Maven application within Netbeans. Since I need to use regular expressions within my project, I added the following class to one of my packages : <a href="http://docs.oracle.com/javase/tutorial/essential/regex/test_harness.html" rel="nofollow">http://docs.oracle.com/javase/tutorial/essential/regex/test_harness.html</a></p>
  
  <p>I changed all the Input/Output statements to use System.out and BufferedReader. When I run this class from a fresh project, the class works as expected. But when I add it to my Maven project, I can see no output after : </p>
  
  <p>NetBeans: Executing '/usr/share/maven2/bin/mvn -Dexec.classpathScope=runtime -Dexec.args=-classpath %classpath MySource.RegexTestHarness -Dexec.executable=/home/gowri/jdk1.6.0_20/bin/java -Dnetbeans.execution=true process-classes org.codehaus.mojo:exec-maven-plugin:1.1.1:exec'
  NetBeans:      JAVA_HOME=/home/gowri/jdk1.6.0_20</p>
  
  <p>Scanning for projects...</p>
  
  <hr>
  
  <p>Building crawler4j
     task-segment: [process-classes, org.codehaus.mojo:exec-maven-plugin:1.1.1:exec]</p>
  
  <hr>
  
  <p>[enforcer:enforce]</p>
  
  <p>[resources:resources]</p>
  
  <p>Using 'UTF-8' encoding to copy filtered resources.</p>
  
  <p>Copying 2 resources</p>
  
  <p>[compiler:compile]</p>
  
  <p>Compiling 1 source file to /home/gowri/WORKSPACE/yasserg-crawler4j-7b8bf91/target/classes</p>
  
  <p>[exec:exec] </p>
  
  <p>Could anyone please tell me why this is happening ? I made sure that this class is the only one with a main() function in it, and I click on "Run file" and not on "Run Project".</p>
  
  <p>Thank you :)</p>
  
  <p>EDIT : I just realized something, when I convert all the System.out.print() statements to System.out.println(), only then can I see the correct output. Any ideas why ?</p>