java - MavenCli doMain() method build log to LOGGER.info instead of System.out -
i using maven cli run maven command java. since below method accepts printstream
object input, how write maven build log logger
instead of system.out
. not trying put of system.out , system.err onto logger. need pass argument mavencli domain() method can redirect method(build) logs logger.
mavencli cli = new mavencli(); integer result = cli.domain(new string[]{"clean","package","-dmaven.test.skip=true"}, pathtopom, system.out, system.out);
fixed issue. build log being written temp text file. mavencli cli = new mavencli(); string dir = appproperties.getenvproperty("queue"); printstream stdout = new printstream( new file("temp.txt") ); result = cli.domain(new string[]{"clean","package","-dmaven.test.skip=true"}, pathtopom, stdout, stdout);
Comments
Post a Comment