On Wed, 2003-07-09 at 09:40, Rademacher Tobias wrote: > Hi Vincent, > > thx. Dammed! I guess I'm bound to much to Jelly when talking about Maven > Plugins. > You are definitly right. If something is getting to hard to achive in Jelly > - use a POJO approach an wrap > it into a Jelly or an Ant Task.
Jelly can use straight beans, I would avoid AntTasks at all costs given potential ClassLoader woes. > Thx anyway. > > > > -----Urspr�ngliche Nachricht----- > > Von: Vincent Massol [mailto:[EMAIL PROTECTED] > > Gesendet am: Mittwoch, 9. Juli 2003 15:27 > > An: 'Maven Users List' > > Betreff: RE: Jelly question > > > > Hi Tobias, > > > > Not sure I understand your question. My own personal rule for writing > > plugins is the following: > > > > 1/ Write the logic in Java. If I write an xml processing plugin then I > > would write the xml processing logic in java. That's of course if a > > framework does not already exist for it... > > > > Then, depending on your use case you may want to wrap it in > > an Ant task > > or in a Jelly tag or in a Maven plugin or... > > > > -Vincent > > > > > -----Original Message----- > > > From: Rademacher Tobias [mailto:[EMAIL PROTECTED] > > > Sent: 09 July 2003 15:17 > > > To: 'Maven Users List' > > > Subject: AW: Jelly question > > > > > > Please correct me if I was wrong: I thougth Jelly tag libs are > > inspired by > > > JSTL, aren't they? > > > If that is true Jelly gets a +1 for it save learining time. > > So Vicent > > > maybe > > > the JSTL tags may benefit for simplification? > > > > > > What should be use if we right a common plugin for xml processing? > > ant, > > > jelly... ??? > > > Any user guidiance for plugin writters? > > > > > > Thx > > > Toby > > > > > > > -----Urspr�ngliche Nachricht----- > > > > Von: Vincent Massol [mailto:[EMAIL PROTECTED] > > > > Gesendet am: Mittwoch, 9. Juli 2003 14:43 > > > > An: 'Maven Users List' > > > > Betreff: RE: Jelly question > > > > > > > > Jelly is extremely powerful (as is Java), but I personally > > > > prefer using > > > > xmltask. Here's how you would modify an attribute: > > > > > > > > <xmltask source="input.xml" dest="out.xml"> > > > > <attr path="web/servlet/[EMAIL PROTECTED]'4']/" attr="id" > > value="test"/> > > > > </xmltask> > > > > > > > > looks simpler to me (provided you are ok adding a new jar to > > > > your build > > > > classpath!). > > > > > > > > -Vincent > > > > > > > > > -----Original Message----- > > > > > From: Paul Libbrecht [mailto:[EMAIL PROTECTED] > > > > > Sent: 09 July 2003 13:42 > > > > > To: Maven Users List > > > > > Subject: Re: Jelly question > > > > > > > > > > Well, with jelly, you can easily modify a stream of SAX events. > > > > > > > > > > But you can definitely parse a document, store it in a variable, > > > > modify > > > > > it (accessing it using XPath for example) then re-output it... > > > > > > > > > > Down here is such a snippet, it parses a bunch of files together > > and > > > > > re-outputs it in one file... > > > > > > > > > > Do note that if you're using DTDs or Schemas, the default values > > > > > specified there will come in... > > > > > > > > > > Also, do not that jelly has a strong tendency to ignore all > > > > whitespace > > > > > by default (the trim attribute just about everywhere) which > > > > may or may > > > > > not be wished... > > > > > > > > > > Paul > > > > > > > > > > <?xml version="1.0" encoding="utf-8" ?> > > > > > > > > > > <j:jelly > > > > > xmlns:j ="jelly:core" > > > > > xmlns:log ="jelly:log" > > > > > xmlns:x ="jelly:xml" > > > > > xmlns:ant ="jelly:ant" > > > > > xmlns:util="jelly:util" > > > > > xmlns:b="jelly:beanshell" > > > > > > > > > > > > > > > > <log:info>Constructing File scanner.</log:info> > > > > > <ant:fileScanner var="blopFiles"> > > > > > <ant:fileset dir="." includes="blop/**/dependency.xml"/> > > > > > </ant:fileScanner> > > > > > > > > > > <log:info>File scanner constructed.</log:info> > > > > > <!-- - amalgamate all files within > > one object --> > > > > > <x:parse var="all_files"> > > > > > <my:allFiles xmlns:my="myNamespace"> > > > > > <j:forEach var="file" > > > > items="${blopFiles.iterator()}"> > > > > > <j:set var="url" > > > > value="${file.toURL()}"/> > > > > > <log:info>Going around > > ${url}</log:info> > > > > > <my:file > > > > > > > > > href="${url.toExternalForm()}"> > > > > > <j:include > > > > uri="${url.toExternalForm()}"/> > > > > > </my:file> > > > > > </j:forEach> > > > > > </my:allFiles> > > > > > </x:parse> > > > > > > > > > > > > > > > <!-- do something on there like something using > > > > > x:forEach which goes around XPath elements --> > > > > > > > > > > <j:file name="someFile.xml" outputMode="HTML" ><!-- > > > > > prettyPrint="yes" > > > > > --> > > > > > <x:copyOf select="$all_files"/> > > > > > </j:file> > > > > > > > > > > </j:jelly> > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- jvz. Jason van Zyl [EMAIL PROTECTED] http://tambora.zenplex.org In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
