You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Costin Caraivan <cc...@axway.com> on 2008/11/17 19:16:19 UTC

Bug in maven-antrun-plugin?

I'm trying to rename some files using Ant, called from Maven. Things look
like this: http://pastebin.mozilla.org/572569

The problem is this:
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] D:\Documents and
Settings\cCaraivan\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;D:\Documents
and
Settings\cCaraivan\.m2\repository\ant\ant-launcher\1.6.5\ant-launcher-1.6.5.jar;D:\Documents
and Settings\cCaraivan\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar;C:\Program
Files\Apache\apache-maven-2.0.9\lib\maven-2.0.9-uber.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

*** Embedded error: Could not create type regexpmapper due to No supported
regular expression matcher found. ***

I've even added them in the pom's dependencies section, out of desperation.
Same error. The maven.plugin.classpath is the same, even with the
dependencies in the pom dependency section, no change. I've even changed the
classpath to maven.runtime.classpath, and it still didn't work (when I had
them in the pom dependency section).

Any clues?
-- 
View this message in context: http://www.nabble.com/Bug-in-maven-antrun-plugin--tp20544863p20544863.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Bug in maven-antrun-plugin?

Posted by Costin Caraivan <cc...@axway.com>.
Hmmm, good call, I missed pluginManagement. Great idea, it will help clear
other problems in my poms.

Thank you.

Regards,
Costin.

Jörg Schaible-2 wrote:
> 
> Hi Costin,
> 
> This is not a bug of the antrun-plugin, it's the way Maven 2.0.x works.
> Use
> a common parent with a pluginManagement section where you define all ant
> deps of all POMs where you use antrun.
> The pluginManagement can help.
> 
> No, since Maven will load the plugin once and only. After that the
> classpath
> is fixed.
> 
> - Jörg
> 

-- 
View this message in context: http://www.nabble.com/Bug-in-maven-antrun-plugin--tp20544863p20554893.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Bug in maven-antrun-plugin?

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Costin,

Costin Caraivan wrote:
> 
> justinedelson wrote:
>> 
>> You need to add dependencies to the plugin, not your project.
>> 
> 
> I added them to the plugin (#1), to the project (#2), to both (#3). It did
> not work in any case. I found a workaround, it's a bug in the antrun
> plugin. If you have multiple poms using the antrun plugin, the classpath
> isn't reset.

This is not a bug of the antrun-plugin, it's the way Maven 2.0.x works. Use
a common parent with a pluginManagement section where you define all ant
deps of all POMs where you use antrun.

> So you need to set it right the first time, to make sure it 
> works currectly.

The pluginManagement can help.

> Using ids and such, as recommended here, didn't work (so the bug is still
> there):
> http://jira.codehaus.org/browse/MANTRUN-51

No, since Maven will load the plugin once and only. After that the classpath
is fixed.

- Jörg


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


RE: Bug in maven-antrun-plugin?

Posted by "Durbha, Praveen (GE Healthcare)" <Pr...@ge.com>.
Did you try upgrading to 1.7.1? 

-----Original Message-----
From: Costin Caraivan [mailto:ccaraivan@axway.com] 
Sent: Monday, November 17, 2008 1:03 PM
To: users@maven.apache.org
Subject: Re: Bug in maven-antrun-plugin?




justinedelson wrote:
> 
> You need to add dependencies to the plugin, not your project.
> 

I added them to the plugin (#1), to the project (#2), to both (#3). It
did not work in any case. I found a workaround, it's a bug in the antrun
plugin.
If you have multiple poms using the antrun plugin, the classpath isn't
reset. So you need to set it right the first time, to make sure it works
currectly.

Using ids and such, as recommended here, didn't work (so the bug is
still
there):
http://jira.codehaus.org/browse/MANTRUN-51

--
View this message in context:
http://www.nabble.com/Bug-in-maven-antrun-plugin--tp20544863p20545842.ht
ml
Sent from the Maven - Users mailing list archive at Nabble.com.


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


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


Re: Bug in maven-antrun-plugin?

Posted by Costin Caraivan <cc...@axway.com>.


justinedelson wrote:
> 
> You need to add dependencies to the plugin, not your project.
> 

I added them to the plugin (#1), to the project (#2), to both (#3). It did
not work in any case. I found a workaround, it's a bug in the antrun plugin.
If you have multiple poms using the antrun plugin, the classpath isn't
reset. So you need to set it right the first time, to make sure it works
currectly.

Using ids and such, as recommended here, didn't work (so the bug is still
there):
http://jira.codehaus.org/browse/MANTRUN-51

-- 
View this message in context: http://www.nabble.com/Bug-in-maven-antrun-plugin--tp20544863p20545842.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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