You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathan Coast <na...@codeczar.com> on 2005/11/22 00:17:21 UTC
optional ant replaceregexp task
Hi,
having recently upgraded to maven 1.1-b2, I have been unable to get ant
replaceregexp tasks working
I have tried adding the dependencies to the oro regexp jars (I couldn't
find the org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp class in any
jar)
<dependency>
<groupId>ant</groupId>
<artifactId>ant-apache-oro</artifactId>
<version>1.6.5</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
<type>jar</type>
</dependency>
I also set the property
<ant:property name="ant.regexp.regexpimpl"
value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/>
<ant:replaceregexp
file="${hibernate.schema.output.dir}/hibernate-schema-initialize.sql"
match="^(alter table .* drop|drop table)"
replace="-- SKIP \1"
flags="i"
byline="true"/>
when I execute the script the following output appears but nothing happens
<replaceregexp match="^(alter table .* drop|drop table)"
file="D:\dev\components\i18n/target/hibernate/hibernate-schema-initialize.sql"
byline="true" flags="i" replace="-- SKIP \1"></replaceregexp>
any ideas?
cheers
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: optional ant replaceregexp task
Posted by Nathan Coast <na...@codeczar.com>.
Thanks Brett,
I found the jdk1.4 regexp task in ant-nodeps-1.6.5.jar
this worked when I placed it in the root classloader
Strangely, I tried placing the ant-oro and oro jars in the root
classloader, maven still didn't pick up the oro regexp task. Gave up
digging, jdk-1.4-regexp works for me :)
cheers
Nathan
Brett Porter wrote:
> Try putting both in the root classloader:
>
> <properties>
> <classloader>root</classloader>
> </properties>
>
> On 11/22/05, Sachin Patel <sp...@gmail.com> wrote:
>> I too am seeing the same problem.
>>
>> Nathan Coast wrote:
>>> Hi,
>>>
>>> having recently upgraded to maven 1.1-b2, I have been unable to get
>>> ant replaceregexp tasks working
>>>
>>> I have tried adding the dependencies to the oro regexp jars (I
>>> couldn't find the org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
>>> class in any jar)
>>>
>>> <dependency>
>>> <groupId>ant</groupId>
>>> <artifactId>ant-apache-oro</artifactId>
>>> <version>1.6.5</version>
>>> <type>jar</type>
>>> </dependency>
>>> <dependency>
>>> <groupId>oro</groupId>
>>> <artifactId>oro</artifactId>
>>> <version>2.0.8</version>
>>> <type>jar</type>
>>> </dependency>
>>>
>>> I also set the property
>>>
>>>
>>> <ant:property name="ant.regexp.regexpimpl"
>>> value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/>
>>>
>>> <ant:replaceregexp
>>> file="${hibernate.schema.output.dir}/hibernate-schema-initialize.sql"
>>> match="^(alter table .* drop|drop table)"
>>> replace="-- SKIP \1"
>>> flags="i"
>>> byline="true"/>
>>>
>>>
>>> when I execute the script the following output appears but nothing
>>> happens
>>>
>>> <replaceregexp match="^(alter table .* drop|drop table)"
>>> file="D:\dev\components\i18n/target/hibernate/hibernate-schema-initialize.sql"
>>> byline="true" flags="i" replace="-- SKIP \1"></replaceregexp>
>>>
>>> any ideas?
>>>
>>> cheers
>>> Nathan
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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: optional ant replaceregexp task
Posted by Brett Porter <br...@gmail.com>.
Try putting both in the root classloader:
<properties>
<classloader>root</classloader>
</properties>
On 11/22/05, Sachin Patel <sp...@gmail.com> wrote:
> I too am seeing the same problem.
>
> Nathan Coast wrote:
> > Hi,
> >
> > having recently upgraded to maven 1.1-b2, I have been unable to get
> > ant replaceregexp tasks working
> >
> > I have tried adding the dependencies to the oro regexp jars (I
> > couldn't find the org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
> > class in any jar)
> >
> > <dependency>
> > <groupId>ant</groupId>
> > <artifactId>ant-apache-oro</artifactId>
> > <version>1.6.5</version>
> > <type>jar</type>
> > </dependency>
> > <dependency>
> > <groupId>oro</groupId>
> > <artifactId>oro</artifactId>
> > <version>2.0.8</version>
> > <type>jar</type>
> > </dependency>
> >
> > I also set the property
> >
> >
> > <ant:property name="ant.regexp.regexpimpl"
> > value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/>
> >
> > <ant:replaceregexp
> > file="${hibernate.schema.output.dir}/hibernate-schema-initialize.sql"
> > match="^(alter table .* drop|drop table)"
> > replace="-- SKIP \1"
> > flags="i"
> > byline="true"/>
> >
> >
> > when I execute the script the following output appears but nothing
> > happens
> >
> > <replaceregexp match="^(alter table .* drop|drop table)"
> > file="D:\dev\components\i18n/target/hibernate/hibernate-schema-initialize.sql"
> > byline="true" flags="i" replace="-- SKIP \1"></replaceregexp>
> >
> > any ideas?
> >
> > cheers
> > Nathan
> >
> > ---------------------------------------------------------------------
> > 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: optional ant replaceregexp task
Posted by Sachin Patel <sp...@gmail.com>.
I too am seeing the same problem.
Nathan Coast wrote:
> Hi,
>
> having recently upgraded to maven 1.1-b2, I have been unable to get
> ant replaceregexp tasks working
>
> I have tried adding the dependencies to the oro regexp jars (I
> couldn't find the org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
> class in any jar)
>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant-apache-oro</artifactId>
> <version>1.6.5</version>
> <type>jar</type>
> </dependency>
> <dependency>
> <groupId>oro</groupId>
> <artifactId>oro</artifactId>
> <version>2.0.8</version>
> <type>jar</type>
> </dependency>
>
> I also set the property
>
>
> <ant:property name="ant.regexp.regexpimpl"
> value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/>
>
> <ant:replaceregexp
> file="${hibernate.schema.output.dir}/hibernate-schema-initialize.sql"
> match="^(alter table .* drop|drop table)"
> replace="-- SKIP \1"
> flags="i"
> byline="true"/>
>
>
> when I execute the script the following output appears but nothing
> happens
>
> <replaceregexp match="^(alter table .* drop|drop table)"
> file="D:\dev\components\i18n/target/hibernate/hibernate-schema-initialize.sql"
> byline="true" flags="i" replace="-- SKIP \1"></replaceregexp>
>
> any ideas?
>
> cheers
> Nathan
>
> ---------------------------------------------------------------------
> 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