maven-mvnd icon indicating copy to clipboard operation
maven-mvnd copied to clipboard

mvnd from java

Open ramarro123 opened this issue 1 year ago • 4 comments

hi, i have a java app that spawn mvn and now i try to replace with mvnd

i got

Fri Feb 02 11:03:41 CET 2024 Feb 02, 2024 11:03:41 AM org.jline.utils.Log logr Fri Feb 02 11:03:41 CET 2024 WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) Fri Feb 02 11:03:41 CET 2024 [main] WARNING org.jline - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

as warning, and no log are returned in output.

i start the process with ProcessBuilder pb = new ProcessBuilder(commands); pb.redirectErrorStream(true);

i can say that aside from log mvnd is working

any way to get the log from mvnd?

ramarro123 avatar Feb 02 '24 10:02 ramarro123

hi, i have a java app that spawn mvn and now i try to replace with mvnd

i got

Fri Feb 02 11:03:41 CET 2024 Feb 02, 2024 11:03:41 AM org.jline.utils.Log logr Fri Feb 02 11:03:41 CET 2024 WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) Fri Feb 02 11:03:41 CET 2024 [main] WARNING org.jline - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

as warning, and no log are returned in output.

i start the process with ProcessBuilder pb = new ProcessBuilder(commands); pb.redirectErrorStream(true);

i can say that aside from log mvnd is working

any way to get the log from mvnd?

Isn't it written to the output stream of the spawned process ?

gnodet avatar Feb 02 '24 10:02 gnodet

i don'tknow why but no, a simple "mvn clean install" actually build the artifact but there is no log, i do redir stderr as you can see and then do

proc.getinputstream() (wrapped with a reader) to read it, that should be just right as far as i know.

unfortunately it only display the warning i copied, no other things (that log come from the prog.getinputstream)

ramarro123 avatar Feb 02 '24 10:02 ramarro123

Try running mvnd in batch mode with -B ?

gnodet avatar Feb 02 '24 12:02 gnodet

umm, nope, didn't changed i try with debug mode as well, not sure it apply "-DconsoleLevel=debug", "-B", "clean", "install"

ramarro123 avatar Feb 02 '24 13:02 ramarro123