Apply command-line arguments. @param arg The arguments @throws JasperException JSPC error
(String[] arg)
| 394 | * @throws JasperException JSPC error |
| 395 | */ |
| 396 | public void setArgs(String[] arg) throws JasperException { |
| 397 | args = arg; |
| 398 | String tok; |
| 399 | |
| 400 | dieLevel = NO_DIE_LEVEL; |
| 401 | |
| 402 | while ((tok = nextArg()) != null) { |
| 403 | if (tok.equals(SWITCH_VERBOSE)) { |
| 404 | verbose = true; |
| 405 | showSuccess = true; |
| 406 | listErrors = true; |
| 407 | } else if (tok.equals(SWITCH_OUTPUT_DIR)) { |
| 408 | tok = nextArg(); |
| 409 | setOutputDir(tok); |
| 410 | } else if (tok.equals(SWITCH_PACKAGE_NAME)) { |
| 411 | targetPackage = nextArg(); |
| 412 | } else if (tok.equals(SWITCH_COMPILE)) { |
| 413 | compile = true; |
| 414 | } else if (tok.equals(SWITCH_FAIL_FAST)) { |
| 415 | failFast = true; |
| 416 | } else if (tok.equals(SWITCH_CLASS_NAME)) { |
| 417 | targetClassName = nextArg(); |
| 418 | } else if (tok.equals(SWITCH_URI_BASE)) { |
| 419 | uriBase = nextArg(); |
| 420 | } else if (tok.equals(SWITCH_URI_ROOT)) { |
| 421 | setUriroot(nextArg()); |
| 422 | } else if (tok.equals(SWITCH_FILE_WEBAPP)) { |
| 423 | setUriroot(nextArg()); |
| 424 | } else if (tok.equals(SHOW_SUCCESS)) { |
| 425 | showSuccess = true; |
| 426 | } else if (tok.equals(LIST_ERRORS)) { |
| 427 | listErrors = true; |
| 428 | } else if (tok.equals(SWITCH_WEBAPP_INC)) { |
| 429 | webxmlFile = nextArg(); |
| 430 | if (webxmlFile != null) { |
| 431 | webxmlLevel = INC_WEBXML; |
| 432 | } |
| 433 | } else if (tok.equals(SWITCH_WEBAPP_FRG)) { |
| 434 | webxmlFile = nextArg(); |
| 435 | if (webxmlFile != null) { |
| 436 | webxmlLevel = FRG_WEBXML; |
| 437 | } |
| 438 | } else if (tok.equals(SWITCH_WEBAPP_XML)) { |
| 439 | webxmlFile = nextArg(); |
| 440 | if (webxmlFile != null) { |
| 441 | webxmlLevel = ALL_WEBXML; |
| 442 | } |
| 443 | } else if (tok.equals(SWITCH_WEBAPP_XML_ENCODING)) { |
| 444 | setWebXmlEncoding(nextArg()); |
| 445 | } else if (tok.equals(SWITCH_ADD_WEBAPP_XML_MAPPINGS)) { |
| 446 | setAddWebXmlMappings(true); |
| 447 | } else if (tok.equals(SWITCH_MAPPED)) { |
| 448 | mappedFile = true; |
| 449 | } else if (tok.equals(SWITCH_XPOWERED_BY)) { |
| 450 | xpoweredBy = true; |
| 451 | } else if (tok.equals(SWITCH_TRIM_SPACES)) { |
| 452 | tok = nextArg(); |
| 453 | if (TrimSpacesOption.SINGLE.toString().equalsIgnoreCase(tok)) { |
no test coverage detected