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

2005-04-22 Thread Wolfgang Häfelinger
Jörg Schaible [EMAIL PROTECTED] 
21-04-2005 08:52
Please respond to
Maven Users List users@maven.apache.org




To
Maven Users List users@maven.apache.org
cc

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




Hello,

thanks for the feedback. Will try some proposals and given feedback later.

Cheers,
Wolfgang.

Arik Kfir wrote on Wednesday, April 20, 2005 8:23 PM:

 Jörg Schaible wrote:
 This won't work in general. E.g. a property like maven.repo.remote is
 evaluated before the first goal ever executed. Additionally if you
 load properties, they are nor available in the reactors e.g.
 inherited by the subprojects in multiproject. You'll have to play
 with this. 
 
 If you load your properties into the current context (via the
 properties tag), and then somehow translate that to a Map, you can
 put it into maven's POM context (or plugin context) via
 ${pom.context.setVariables(myMap)} 
 Wouldn't that work?

Try it and give feedback ;-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2005-04-21 Thread Jörg Schaible
Arik Kfir wrote on Wednesday, April 20, 2005 8:23 PM:

 Jörg Schaible wrote:
 This won't work in general. E.g. a property like maven.repo.remote is
 evaluated before the first goal ever executed. Additionally if you
 load properties, they are nor available in the reactors e.g.
 inherited by the subprojects in multiproject. You'll have to play
 with this.
 
 If you load your properties into the current context (via the
 properties tag), and then somehow translate that to a Map, you can
 put it into maven's POM context (or plugin context) via
 ${pom.context.setVariables(myMap)}   
 Wouldn't that work?

Try it and give feedback ;-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2005-04-20 Thread Arik Kfir




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 Hfelinger 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

2005-04-20 Thread Mykel Alvis
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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

2005-04-20 Thread Arik Kfir




Jrg Schaible wrote:

  This won't work in general. E.g. a property like maven.repo.remote is evaluated before the first goal ever executed. Additionally if you load properties, they are nor available in the reactors e.g. inherited by the subprojects in multiproject. You'll have to play with this.
  

If you load your properties into the current context (via the
properties tag), and then somehow translate that to a Map, you
can put it into maven's POM context (or plugin context) via
${pom.context.setVariables(myMap)}
Wouldn't that work?

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]