maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farrukh S. Najmi" <farr...@wellfleetsoftware.com>
Subject Re: String substitution in resource filtering
Date Sat, 12 May 2007 17:48:08 GMT

Unfortunately my build process takes the output of a pre-existing ant
build process in its own build so that is not an option.
It would be nice to have in maven regexp replacement option in maven
filtering similar to:

<http://ant.apache.org/manual/OptionalTasks/replaceregexp.html>

Maven dev team please consider this input and thanks for a terrific tool
that has
improved my dev experience quite a bit.

Andrew Williams wrote:
> Is there any reason you cannot replace the strings with, say
> ${hibernate.dtdname} and ${hibernate.dtdurl}
> and replace both of those using filters?
>
> That is, I think, the "correct" way...
>
> On 12 May 2007, at 07:12, Farrukh S. Najmi wrote:
>
>>
>> I need to do resource filtering that simply needs to replace an existing
>> string with another.
>> There are no variable to substitute. Can someone kindly share an example
>> of how to do this.
>>
>> Here is an example:
>>
>> Original File:
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE hibernate-mapping PUBLIC
>>         "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
>>         "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
>> ....
>>
>> Filtered output file:
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE hibernate-mapping PUBLIC
>>         "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
>>         "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
>> ....
>>
>> In this example I am simply looking to substitute:
>>
>> "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
>>
>> with:
>>
>> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
>>
>> and substitute:
>>
>> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
>>
>> with:
>>
>> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"
>>
>> Thanks for your help.
>>
>> --Regards,
>> Farrukh
>>
>> Web: http://www.wellfleetsoftware.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
>


-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



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


Mime
View raw message