You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Davis Ford <da...@zenoconsulting.biz> on 2009/03/04 17:42:48 UTC

resource filtering in pom.xml

Is it possible to have maven do resource filtering on the fly inside
the pom.xml -- albeit without writing to the file (i.e. in-memory
only)

For example, I might be using maven-sql-plugin:

<configuration>
          <driver>${db.driver}</driver>
          <url>${db.url}</url>
          <username>${db.username}</username>
          <password>${db.password}</password>
</configuration>

I don't want to hard-code these values in the pom.xml.  I want them to
be read from an external properties file.  Is this possible?

Thanks in advance,
Davis
-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

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


Re: resource filtering in pom.xml

Posted by Davis Ford <da...@zenoconsulting.biz>.
Awesome -- exactly what I was looking for Thomas.  Thank you.

On Wed, Mar 4, 2009 at 11:53 AM, Thomas Marti <th...@schweiz.org> wrote:
> Hello Davis
>
> You can use the Maven Properties Plugin
> => http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/
>
>
> Greetings, Thomas
>
> Davis Ford wrote:
>>
>> Is it possible to have maven do resource filtering on the fly inside
>> the pom.xml -- albeit without writing to the file (i.e. in-memory
>> only)
>>
>> For example, I might be using maven-sql-plugin:
>>
>> <configuration>
>>          <driver>${db.driver}</driver>
>>          <url>${db.url}</url>
>>          <username>${db.username}</username>
>>          <password>${db.password}</password>
>> </configuration>
>>
>> I don't want to hard-code these values in the pom.xml.  I want them to
>> be read from an external properties file.  Is this possible?
>>
>> Thanks in advance,
>> Davis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

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


Re: resource filtering in pom.xml

Posted by Thomas Marti <th...@schweiz.org>.
Hello Davis

You can use the Maven Properties Plugin
=> http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/


Greetings, Thomas

Davis Ford wrote:
> Is it possible to have maven do resource filtering on the fly inside
> the pom.xml -- albeit without writing to the file (i.e. in-memory
> only)
> 
> For example, I might be using maven-sql-plugin:
> 
> <configuration>
>           <driver>${db.driver}</driver>
>           <url>${db.url}</url>
>           <username>${db.username}</username>
>           <password>${db.password}</password>
> </configuration>
> 
> I don't want to hard-code these values in the pom.xml.  I want them to
> be read from an external properties file.  Is this possible?
> 
> Thanks in advance,
> Davis

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