You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rahul Thakur <ra...@gmail.com> on 2006/12/14 21:33:45 UTC

[Fwd: Re: how to refer to a file properties starting from the pom.xml]

Moving this to user list...

I have the same question - How do I inject properties from an external 
file into pom.xml?

I have use case where I need to inject some DB connection properties 
into pom.xml and I don't want to define them in the pom itself. I 
noticed some discussion about properties-maven-plugin on mojo-dev lists 
but that plugin isn't a part of Mojo project yet.

TIA,
Rahul

Re: [Fwd: Re: how to refer to a file properties starting from the pom.xml]

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/15/06, Rahul Thakur <ra...@gmail.com> wrote:

> I don't want to have the username and password in pom.xml as it is
> published to the repo when the artifact is deployed or a release is
> performed.
>
> Any other ideas?

Username and password are developer-specific, so I would put them in
settings.xml.

<settings> ...
      <profile>
        <activation>
          <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
          <username>wsmoak</username>
          <password>pass</password>
          <ip.address>xxx.xxx.xxx.xxx</ip.address>
        </properties>
      </profile>
... </settings>

-- 
Wendy

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


Re: [Fwd: Re: how to refer to a file properties starting from the pom.xml]

Posted by Rahul Thakur <ra...@gmail.com>.
I don't want to have the username and password in pom.xml as it is 
published to the repo when the artifact is deployed or a release is 
performed.

Any other ideas?

Rahul


----- Original Message ----- 
From: "Stephen Coy" <st...@gmail.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Friday, December 15, 2006 11:48 PM
Subject: Re: [Fwd: Re: how to refer to a file properties starting from 
the pom.xml]


> You can set up profiles defining properties in a separate profile.xml
> file.
>
> Why do you not want them in the pom.xml itself? Things like db
> connection properties are generally associated with a particular
> deployment environment. Therefore I set up a profile corresponding to
> each environment, and place its specific properties within it.
>
> Steve C
>
> On 15/12/2006, at 7:33 AM, Rahul Thakur wrote:
>
>> Moving this to user list...
>>
>> I have the same question - How do I inject properties from an
>> external file into pom.xml?
>>
>> I have use case where I need to inject some DB connection
>> properties into pom.xml and I don't want to define them in the pom
>> itself. I noticed some discussion about properties-maven-plugin on
>> mojo-dev lists but that plugin isn't a part of Mojo project yet.
>>
>> TIA,
>> Rahul
>>
>> From: "Wendy Smoak" <ws...@gmail.com>
>> Date: 25 November 2006 2:21:15 AM
>> To: "Maven Developers List" <de...@maven.apache.org>
>> Subject: Re: how to refer to a file properties starting from the
>> pom.xml
>> Reply-To: "Maven Developers List" <de...@maven.apache.org>
>>
>>
>> On 11/24/06, Wendy Smoak <ws...@gmail.com> wrote:
>>
>>> You can include <properties> inside pom.xml itself.
>>
>> ... and please ask questions on the user list instead. :)
>>
>> You can find subscription info here:  http://maven.apache.org/mail-
>> lists.html
>>
>> -- 
>> Wendy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-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: [Fwd: Re: how to refer to a file properties starting from the pom.xml]

Posted by Stephen Coy <st...@gmail.com>.
You can set up profiles defining properties in a separate profile.xml  
file.

Why do you not want them in the pom.xml itself? Things like db  
connection properties are generally associated with a particular  
deployment environment. Therefore I set up a profile corresponding to  
each environment, and place its specific properties within it.

Steve C

On 15/12/2006, at 7:33 AM, Rahul Thakur wrote:

> Moving this to user list...
>
> I have the same question - How do I inject properties from an  
> external file into pom.xml?
>
> I have use case where I need to inject some DB connection  
> properties into pom.xml and I don't want to define them in the pom  
> itself. I noticed some discussion about properties-maven-plugin on  
> mojo-dev lists but that plugin isn't a part of Mojo project yet.
>
> TIA,
> Rahul
>
> From: "Wendy Smoak" <ws...@gmail.com>
> Date: 25 November 2006 2:21:15 AM
> To: "Maven Developers List" <de...@maven.apache.org>
> Subject: Re: how to refer to a file properties starting from the  
> pom.xml
> Reply-To: "Maven Developers List" <de...@maven.apache.org>
>
>
> On 11/24/06, Wendy Smoak <ws...@gmail.com> wrote:
>
>> You can include <properties> inside pom.xml itself.
>
> ... and please ask questions on the user list instead. :)
>
> You can find subscription info here:  http://maven.apache.org/mail- 
> lists.html
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org