You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris DeJong <ch...@metatv.com> on 2005/02/12 02:25:12 UTC

regexp plugin

Hi.  I'm new to Maven, and just written my first plugin successfully (it
analyzes dependencies).  But --

 

I'm now trying to use the jelly-regexp plugin to add some features to
it, and I'm getting an error I don't understand.  I was hoping someone
here might have a quick answer for me.

 

My understanding is that I'm supposed to be able to use the tags by
making the plugin a dependency in my project.xml.  So in project.xml I
have:

 

<dependency>

      <groupId>commons-jelly</groupId>

      <artifactId>commons-jelly-tags-regexp</artifactId>

      <version>1.0</version>

      <url>http://jakarta.apache.org/commons/jelly/libs/regexp</url>

      <properties>

            <classloader>root.maven</classloader>

      </properties>

</dependency>

 

I can see this download fine when I build with plugin:install for the
first time.

 

Then I import the tags in plugin.jelly as:

 

<project [... stuff deleted ...] xmlns:rgx="jelly:regexp">

 

And then I try to use the "match" tag:

 

<j:set var="foo" value="somerandomstring"/>

<rgx:match expr="somerandomstring" text="${foo}" var="found_a_match" />

 

But I get an error that some class is missing:

 

Underlying exception: java.lang.ClassNotFoundException: regexp

java.lang.ClassNotFoundException: regexp

        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

        at java.security.AccessController.doPrivileged(Native Method)

        [mountainous stack trace deleted]

 

Shouldn't the plugin simply carry with it the class library it needs, or
cause the appropriate libraries to be downloaded?

 

Hope I'm missing something obvious here.  Any and all help appreciated!

 

--Chris


Re: regexp plugin

Posted by Brett Porter <br...@gmail.com>.
perhaps jelly:regexp has not been registered as a tag library. Maven
1.0 uses an old version of Jelly, so if this is a newer tag library
this is a possibility. To use it directly, you need to use:

<project xmlns:rgx="jelly:org.apache.commons.jelly.tags.regex.RegexTagLibrary"
/>

(assuming that is the class name - I haven't checked)

Cheers,
Brett

On Fri, 11 Feb 2005 17:25:12 -0800, Chris DeJong <ch...@metatv.com> wrote:
> Hi.  I'm new to Maven, and just written my first plugin successfully (it
> analyzes dependencies).  But --
> 
> I'm now trying to use the jelly-regexp plugin to add some features to
> it, and I'm getting an error I don't understand.  I was hoping someone
> here might have a quick answer for me.
> 
> My understanding is that I'm supposed to be able to use the tags by
> making the plugin a dependency in my project.xml.  So in project.xml I
> have:
> 
> <dependency>
> 
>       <groupId>commons-jelly</groupId>
> 
>       <artifactId>commons-jelly-tags-regexp</artifactId>
> 
>       <version>1.0</version>
> 
>       <url>http://jakarta.apache.org/commons/jelly/libs/regexp</url>
> 
>       <properties>
> 
>             <classloader>root.maven</classloader>
> 
>       </properties>
> 
> </dependency>
> 
> I can see this download fine when I build with plugin:install for the
> first time.
> 
> Then I import the tags in plugin.jelly as:
> 
> <project [... stuff deleted ...] xmlns:rgx="jelly:regexp">
> 
> And then I try to use the "match" tag:
> 
> <j:set var="foo" value="somerandomstring"/>
> 
> <rgx:match expr="somerandomstring" text="${foo}" var="found_a_match" />
> 
> But I get an error that some class is missing:
> 
> Underlying exception: java.lang.ClassNotFoundException: regexp
> 
> java.lang.ClassNotFoundException: regexp
> 
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 
>         at java.security.AccessController.doPrivileged(Native Method)
> 
>         [mountainous stack trace deleted]
> 
> Shouldn't the plugin simply carry with it the class library it needs, or
> cause the appropriate libraries to be downloaded?
> 
> Hope I'm missing something obvious here.  Any and all help appreciated!
> 
> 
> --Chris
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org