geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom McQueeney <...@mcqueeney.com>
Subject Re: Configuring plan files during assembly bulid step
Date Sat, 18 Jun 2005 17:14:36 GMT
Jeremy,

This didn't work for me. I experimented by setting some of the "Plan*" 
variables in project.properties and rebuilt the assembly module. None of 
the variable values I set were used in the resulting plan files. I 
suspect that's because the "assemble" goal in maven.xml is using Jelly 
"set" tags to explicitly set the variables to values. If the vars had 
initial values from project.properties, those j:set's would change them, 
correct?

I freely admit I'm not strong with Maven, so maybe I'm overlooking 
something. But it does seem those j:set instructions would override any 
values set in an external properties file. What am I missing?

Thank you for your help with this.

-Tom


Jeremy Boynes wrote:
> The assembly module proceses the plans with velocity so any values from 
> project.properties can simply be referenced with ${prop} - we use that 
> to substitute in the version numbers.
> 
> The packaging plugin does the same thing.
> -- 
> Jeremy
> 
> Tom McQueeney wrote:
> 
>> I'm hoping someone who is less Maven-challenged than I could help with 
>> a question about configuring the plan files during the assembly build 
>> step.
>>
>> Last month, some of the server plans in the assembly module were 
>> changed to allow variable substitution at build time. I think this was 
>> done primarily for the izpack installer, but can we take advantage of 
>> these variables when building from source by setting them in an 
>> external properties file?
>>
>> maven.xml in the assembly module sets the "Plan*" values in the 
>> "assemble" goal. E.g.
>>
>>         <j:set var="PlanServerHostname" value="localhost" />
>>         <j:set var="PlanNamingPort" value="1099" />
>>         <j:set var="PlanIIOPPort" value="9000" />
>> etc.
>>
>> I know I can change these Plan values directly in the maven.xml, but 
>> is there an easy way to override these values with a 
>> project.properties kind of file? I figure one way to get Maven to use 
>> the project.properties file would be to wrap each of the above jelly 
>> j:set instructions in an "if" to check whether the var already had a 
>> value, but is there an easier Maven way of doing things?
>>
>> Thanks for any pointers.
>>
>> -Tom
> 
> 

Mime
View raw message