/** * Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval] */ public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]"); return; } // parse the command line options using CLI // using a separate class to avoid unnecessary // dependencies CommandLineParser.getInstance().invokeCommandLineJelly(args); } catch (JellyException e) { Throwable cause = e.getCause(); if (cause == null) { e.printStackTrace(); } else { cause.printStackTrace(); } } }
/** * Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval] */ public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]"); return; } // parse the command line options using CLI // using a separate class to avoid unnecessary // dependencies CommandLineParser.getInstance().invokeCommandLineJelly(args); } catch (JellyException e) { Throwable cause = e.getCause(); if (cause == null) { e.printStackTrace(); } else { cause.printStackTrace(); } } }
/** * Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval] */ public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]"); return; } // parse the command line options using CLI // using a separate class to avoid unnecessary // dependencies CommandLineParser.getInstance().invokeCommandLineJelly(args); } catch (JellyException e) { Throwable cause = e.getCause(); if (cause == null) { e.printStackTrace(); } else { cause.printStackTrace(); } } }
/** * Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval] */ public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]"); return; } // parse the command line options using CLI // using a separate class to avoid unnecessary // dependencies CommandLineParser.getInstance().invokeCommandLineJelly(args); } catch (JellyException e) { Throwable cause = e.getCause(); if (cause == null) { e.printStackTrace(); } else { cause.printStackTrace(); } } }
/** * Request Handler for the feed itself. This will always return an empty feed since the feed is created from the JIRA cache * * @param request the {@link org.kohsuke.stapler.StaplerRequest} * @param response the {@link org.kohsuke.stapler.StaplerResponse} * @throws Exception in case of errors */ public void doFeed(StaplerRequest request, StaplerResponse response) throws Exception { JellyContext context = new JellyContext(); context.setVariable("request", request); DateTime now = new DateTime(); context.setVariable("timezone", timeZoneFormatter.withZone(now.getZone()).print(now)); context.setVariable("date", dateTimeFormatter.print(now.toDateTime(DateTimeZone.UTC))); try { response.setStatus(HttpServletResponse.SC_OK); response.setContentType("application/atom+xml"); context.runScript(getClass().getResource("feed.jelly"), XMLOutput.createXMLOutput(response.getWriter())); } catch (JellyException e) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); e.printStackTrace(response.getWriter()); } }