Details
Description
C:\Program Files\ISS\SiteProtector>"C:\Program Files\ISS\SiteProtector\JRE1.6.0_SR9\bin\java.exe" -jar "C:\Program Files\ISS\SiteProtector\JavaEE\Geronimo2.1.7\bin\deployer.jar" --offline undeploy "iss/HelpServer/1.0/war" > trunk.txt
There will be an IllegalArgumentException exception as below:
Exception in thread "main" java.lang.IllegalArgumentException: Need at least 10 spaces for printing, but indent=4 and endCol=1
at org.apache.geronimo.deployment.cli.DeployUtils.println(DeployUtils.java:116)
at org.apache.geronimo.deployment.cli.CommandStart.execute(CommandStart.java:66)
at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:31)
----- End of batch file output --------
Error: The process returned 1.
In deploy command, we are using ConsoleReader.printString, no this kind of error.
But in undeploy command, we are using DeployUtil.println, which has some terminal width check, this will make error on windows if server folder and command is too long
int endCol = consoleReader.getTermwidth();
int start = consoleReader.getCursorBuffer().cursor;
// some terminals will give a terminal width of zero (e.g. emacs shell).
// in that case, default to a reasonable term width value.
if (endCol == 0)
if (endCol - indent < 10)
{ throw new IllegalArgumentException("Need at least 10 spaces for " + "printing, but indent=" + indent + " and endCol=" + endCol); }Change DeployUtil.println method to ConsoleReader.printString