I\'m developing application with Netbeans and Maven. My application should obtain data from stdin. But I could not understand how to test it. Putting < data.txt
Old school, but it's what I knew. One caveat is that the mvn command does not return to the cli when done, but for some purposes this is acceptable. Note you need to be in the project root directory
mvn "-Dexec.args=-classpath %classpath com.mycompany.test" -Dexec.executable=/Downloads/jdk1.7/bin/java exec-maven-plugin:1.2.1:exec < /tmp/Input