Thanks Chris for your quick responses.

It worked when I moved the dependencies inside the <plugin> section
like,

  <build>
   <plugins>
     <plugin>
       <artifactId>maven-antrun-plugin</artifactId> 
       <executions>
         <execution>
           <phase>install</phase> 
           <configuration>
             <tasks>
               <ant antfile="C:\MavenProject\ant-test\build.xml"
inheritRefs="true"> 
                 <target name="echo" /> 
               </ant>
             </tasks>
           </configuration>
           <goals>
             <goal>run</goal> 
           </goals>
         </execution>
       </executions>
          <dependencies>
          <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.4.2</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
         </dependency>
         <dependency>
              <groupId>ant</groupId>
              <artifactId>ant-apache-regexp</artifactId>
              <version>1.6.5</version>
           </dependency>
         <dependency>
            <groupId>jakarta-regexp</groupId>
            <artifactId>jakarta-regexp</artifactId>
            <version>1.4</version>
        </dependency>
      </dependencies>       
     </plugin>
   </plugins>
  </build>

Thanks
-Jagan

-----Original Message-----
From: Chris Hilton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 31, 2007 12:17 PM
To: Maven Users List
Subject: RE: Maven-antrun-plugin regexp

The only other thing I can think of is that the following issue may be
affecting you:

http://jira.codehaus.org/browse/MANTRUN-49 

> -----Original Message-----
> From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. 
> at Cisco) [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 31 January, 2007 14:08
> To: Maven Users List
> Subject: RE: Maven-antrun-plugin regexp
> 
> 
> That didn't work. I think somehow the classpath is not getting passed 
> to the ant script.
> 
> Even <javac> is failing
> 
>     <javac srcdir="C:\MavenProject\bug-reporting\src\main\java">
>        <classpath refid="maven.plugin.classpath"/> 
>     </javac>
> 
> Embedded error: The following error occurred while executing this 
> line:
> C:\MavenProject\ant-test\build.xml:19: Unable to find a javac 
> compiler; com.sun.tools.javac.Main is not on the classpath.
> Perhaps JAVA_HOME does not point to the JDK
> 
> Any idea?
> 
> 
> 
> -----Original Message-----
> From: Chris Hilton [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 31, 2007 12:01 PM
> To: Maven Users List
> Subject: RE: Maven-antrun-plugin regexp
> 
> You probably want the classpathref to be maven.plugin.classpath. 
> 
> > -----Original Message-----
> > From: Jagan Padmanabha Pillai -X (jpadmana - Insight
> Solutions, Inc. 
> > at Cisco) [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, 31 January, 2007 13:53
> > To: Maven Users List
> > Subject: RE: Maven-antrun-plugin regexp
> > 
> > 
> > Hi Chris,
> > 
> > That didn't work .. Here is my pom and build.xml. Could you please 
> > check it out and see if any issues.
> > Thanks for your help
> > 
> > Pom.xml
> > <?xml version="1.0" encoding="UTF-8"?> <project>
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>com.cisco.nm.glue</groupId>
> >   <artifactId>ant-test</artifactId>
> >   <version>1.0</version>
> >   <packaging>pom</packaging>
> >   <name>Project POM for Ant Testing</name>
> >   <build>
> >    <plugins>
> >      <plugin>
> >        <artifactId>maven-antrun-plugin</artifactId> 
> >        <executions>
> >      <execution>
> >        <phase>install</phase> 
> >        <configuration>
> >          <tasks>
> >            <property name="ant.regexp.regexpimpl"
> > value="org.apache.tools.ant.util.regexp.JakartaRegexpRegexp"/>
> >            <property name="version" value="${project.version}"/>
> >            <ant antfile="C:\MavenProject\ant-test\build.xml"
> > inheritRefs="true"> 
> >              <target name="echo" /> 
> >            </ant>
> >          </tasks>
> >        </configuration>
> >        <goals>
> >          <goal>run</goal> 
> >        </goals>
> >      </execution>
> >        </executions>
> >      </plugin>
> >    </plugins>
> >   </build>
> >   <dependencies>
> >             <dependency>
> >               <groupId>ant</groupId>
> >               <artifactId>ant-apache-regexp</artifactId>
> >               <version>1.6.5</version>
> >             </dependency>
> >             <dependency>
> >               <groupId>jakarta-regexp</groupId>
> >               <artifactId>jakarta-regexp</artifactId>
> >               <version>1.4</version>
> >             </dependency>
> >   </dependencies>
> > </project>
> > 
> > 
> > Build.xml
> > <?xml version="1.0" encoding="UTF-8"?>
> > 
> > <project default="echo" name="Main_Dev">
> > 
> >   <target name="echo">
> >     <echo>ECHO MESSAGE - ${version}</echo>  
> >     <copy todir="../com.cisco.nm.cmp.client">
> >         <fileset dir="../ant-test">
> >             <filename name="*.jar" />
> >         </fileset>           
> >         <mapper type="regexp" from="^(.*?)-(.*).jar$$" to="\1.jar"
> > classpathref="maven.compile.classpath"/>
> >     </copy>
> >   </target> 
> > </project>
> > 
> > Thanks
> > -Jagan
> > 
> > 
> > -----Original Message-----
> > From: Chris Hilton [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, January 31, 2007 11:39 AM
> > To: Maven Users List
> > Subject: RE: Maven-antrun-plugin regexp
> > 
> > Here's the dependencies we use for regexp in antrun:
> > 
> >           <dependency>
> >             <groupId>ant</groupId>
> >             <artifactId>ant-apache-regexp</artifactId>
> >             <version>1.6.5</version>
> >           </dependency>
> >           <dependency>
> >             <groupId>jakarta-regexp</groupId>
> >             <artifactId>jakarta-regexp</artifactId>
> >             <version>1.4</version>
> >           </dependency>
> > 
> > We also have this is in the plugin configuration:
> > 
> >                 <property name="ant.regexp.regexpimpl"
> > value="org.apache.tools.ant.util.regexp.JakartaRegexpRegexp"/>
> > 
> > Though I'm not sure it's actually necessary.
> > 
> > Chris
> > 
> > > -----Original Message-----
> > > From: Jagan Padmanabha Pillai -X (jpadmana - Insight
> > Solutions, Inc. 
> > > at Cisco) [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, 31 January, 2007 13:34
> > > To: [email protected]
> > > Subject: Maven-antrun-plugin regexp
> > > 
> > >  
> > > I am having some issues with maven-antrun-plugin when
> using <mapper
> > > type="regexp"> The error message says, No supported regular
> > expression
> > 
> > > matcher found
> > >  
> > > I am using JDK1.5, Maven2 and also tried adding lot of
> dependencies
> > > like ant-apache-regexp, ant-jakarta-regexp, ant-jakarta-oro, 
> > > ant-nodeps.
> > >  
> > > But nothing worked. Any idea how to solve this.
> > >  
> > > Thanks
> > >  
> > >  
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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]

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

  • ... Jagan Padmanabha Pillai -X \(jpadmana - Insight Solutions, Inc. at Cisco\)
    • ... Maruf Aytekin
      • ... Maruf Aytekin
    • ... Marc Gassmann

Reply via email to