You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wolfgang Häfelinger <wh...@epo.org> on 2005/04/20 17:55:05 UTC

How would I read a non-standard property file?

Hello,

I understand that Maven tries to read the files "project.properties" and 
"build.properties" on
startup. How would I convince Maven to read "other.props"?? 

Does a tag like

 <properties file="other.props"/>

or so exists?

I' m very well aware that Maven tries to read "build.properties" from 
${user.home}. So I could
simply append "other.props" into my user specific build.properties but 
that that's not what I
want. Basically I want to be able to do something like:

 maven -Dmy.prop.file="other.properties" ..

Also, there should be no difference between properties taken from 
"other.properties" and 
"project.properties".

I have the feeling that I can't do this. Am I correct?

Regards.
 

Re: How would I read a non-standard property file?

Posted by Mykel Alvis <my...@gmail.com>.
I'm in the initial planning stages of a properties plugin. We have a huge 
number of properties that are going to be distributed using an internal 
property service and some of our build props might come from that service. 

The property repository is planned as a web/soap service, so it should be 
trivial to acquire them. The question is how do you get them injected into 
the maven run at the right time. That's the part that I haven't 
investigated.

On 4/20/05, Arik Kfir <ar...@gmail.com> wrote:
> 
> I don't think Maven can do that out of the box - but you can add a line in 
> your maven.xml file that does that - just make sure it puts them in the 
> right context. Also, that *could* make a nice plugin, so you can use it in 
> other projects as well ;-)
> 
> cheers,
> Arik.
>  
> Wolfgang Häfelinger wrote:
> 
> Hello,
> 
> I understand that Maven tries to read the files "project.properties" and 
> "build.properties" on
> startup. How would I convince Maven to read "other.props"?? 
> 
> Does a tag like
> 
>  <properties file="other.props"/>
> 
> or so exists?
> 
> I' m very well aware that Maven tries to read "build.properties" from 
> ${user.home}. So I could
> simply append "other.props" into my user specific build.properties but 
> that that's not what I
> want. Basically I want to be able to do something like:
> 
>  maven -Dmy.prop.file="other.properties" ..
> 
> Also, there should be no difference between properties taken from 
> "other.properties" and 
> "project.properties".
> 
> I have the feeling that I can't do this. Am I correct?
> 
> Regards.
>  
>    
>  
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

Re: How would I read a non-standard property file?

Posted by Arik Kfir <ar...@gmail.com>.
I don't think Maven can do that out of the box - but you can add a line 
in your maven.xml file that does that - just make sure it puts them in 
the right context. Also, that *could* make a nice plugin, so you can use 
it in other projects as well ;-)

cheers,
    Arik.

Wolfgang H�felinger wrote:

>Hello,
>
>I understand that Maven tries to read the files "project.properties" and 
>"build.properties" on
>startup. How would I convince Maven to read "other.props"?? 
>
>Does a tag like
>
> <properties file="other.props"/>
>
>or so exists?
>
>I' m very well aware that Maven tries to read "build.properties" from 
>${user.home}. So I could
>simply append "other.props" into my user specific build.properties but 
>that that's not what I
>want. Basically I want to be able to do something like:
>
> maven -Dmy.prop.file="other.properties" ..
>
>Also, there should be no difference between properties taken from 
>"other.properties" and 
>"project.properties".
>
>I have the feeling that I can't do this. Am I correct?
>
>Regards.
> 
>  
>