Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 83669 invoked from network); 14 Jan 2003 08:22:37 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 14 Jan 2003 08:22:37 -0000 Received: (qmail 9391 invoked by uid 97); 14 Jan 2003 08:24:03 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 9355 invoked by uid 97); 14 Jan 2003 08:24:02 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 9343 invoked by uid 97); 14 Jan 2003 08:24:01 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 14 Jan 2003 08:22:26 -0000 Message-ID: <20030114082226.70883.qmail@icarus.apache.org> From: jstrachan@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/jelly/xdocs faq.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jstrachan 2003/01/14 00:22:25 Modified: jelly/xdocs faq.xml Log: updated the FAQ to contain entries describing invoking Jelly from inside Java, from its main, from Ant and Maven Revision Changes Path 1.6 +86 -0 jakarta-commons-sandbox/jelly/xdocs/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/faq.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- faq.xml 18 Oct 2002 00:34:05 -0000 1.5 +++ faq.xml 14 Jan 2003 08:22:25 -0000 1.6 @@ -33,6 +33,26 @@

Using Jelly

  1. + + How do I call Jelly from Java code? + +
  2. +
  3. + + How do I invoke Jelly from the command line? + +
  4. +
  5. + + How do I invoke Jelly from inside Ant? + +
  6. +
  7. + + How do I invoke Jelly from inside Maven? + +
  8. +
  9. How do I add my own tag libraries to Jelly? @@ -90,6 +110,72 @@
    +
    +
    + + How do I call Jelly from Java code? + +
    +
    + Try the following code. Note that the runScript() method below is overloaded and can take a File, URL etc. + +
      +// pass the output of the script somewhere
      +Writer someWriter = new FileWriter( "output.xml" );
      +XMLOutput output = XMLOutput.createXMLOutput( someWriter );
      +
      +// now run a script using a URL
      +JellyContext context = new JellyContext();
      +context.runScript( "foo.jelly", output );
    +
    +
    +
    + +
    +
    + + How do I invoke Jelly from the command line? + +
    +
    + When you build a binary disitribution of Jelly, + there is a jelly script which works on Windows and Unixes to run Jelly. + You can create a binary distribution of Jelly via + + maven dist + +
    +
    + All you really need to do is to invoke the + org.apache.commons.jelly.Jelly class from the command line + with a correct classpath. +
    +
    +
    +
    + + How do I invoke Jelly from inside Ant? + +
    +
    + There is an Ant task that comes with the Ant library called + org.apache.commons.task.JellyTask which can be taskdef'd in any Ant script. +
    +
    + +
    +
    + + How do I invoke Jelly from inside Maven? + +
    +
    + Maven's maven.xml file is actually a Jelly script; so you can include any Jelly script + inside any of the Maven goals. So if you want to execute a specific Jelly script you can + just <j:include uri="foo.jelly" > it inside the maven.xml. +
    +
    +
    -- To unsubscribe, e-mail: For additional commands, e-mail: