If you can get one script language to work, it shouldn't be a big leap
to get other ones working too. Especially since maven will do anything
ant can do. If it's not working in maven, try writing it in ant first.
Once you've worked out the problem in ant, it's usually little more than
a cut-and-paste job to get it into maven.

Adam

-----Original Message-----
From: M. Sean Gilligan [mailto:[EMAIL PROTECTED] 
Sent: 24 April 2005 23:03
To: users@maven.apache.org
Subject: <ant:script> tag and Groovy


Hello Maven Mavens:

Using ant 1.6.1, I can use the ant <script> tag to run short scripts in
JavaScript, Groovy, Jython, and Beanshell.  (as long as the right jars
are in my ant/lib directory...)

I'd like to be able to do this in a maven.xml file under Maven 1.0.2.
Is this possible?

My first choice would be Groovy (or perhaps Beanshell) as I don't want
to learn Python, and am not sure JavaScript gives me the file access
that I need.  (I know Groovy has its warts, but it works fairly well for
me in short scripts.)

I've thrashed around a bit and can't seem to get any language to work in
the <ant:script> tag.  I did manage to get the following to work:

   <jython:script>
print "This is a jython script"
print "My Maven POM's name is", pom.getName()
print "If the POM has a name, then the context passing is working"
    </jython:script>

After putting xmlns:jython="jelly:jython" in the root <project> tag and
the (correct?) jar files in Maven's path.

I've looked in the maven site, the mailing lists, and done Google
searches, and can't find any documentation or examples of how to do
this.  I thrashed around for far too long with the only progress being
the jython:script test code above.

I there a way to do this in Maven 1.0.2?  Is it documented?  If not,
will Maven 1.1 (with ant 1.6.x) make it easier?

Thanks,

Sean

-- 
------------------------------------------------------------------------
---
M. Sean Gilligan                    : 831-466-9788 x11
vBlog Central                       : http://www.vblogcentral.com
------------------------------------------------------------------------
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to