cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <robby.pelss...@ciber.nl>
Subject RE: Re: Using spring configurator (for properties) in block
Date Thu, 29 Jan 2009 09:47:17 GMT
Thx Luca,

You just saved me a lot of time.

I solved it by putting the environment (running mode) specific property
in a separate property file:

/META-INF/cocoon/properties/dev/repositorylocation.properties
repository.dir=D:/nxp/testdata

and the other shared properties in

/META-INF/cocoon/properties/reposistory.properties
repository.dir.flyerdefinitions=${repository.dir}/XML Repository/Flyer
Definitions

Works like a charm ;-)

Cheers,
Robby

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Luca Morandini
Sent: donderdag 29 januari 2009 1:02
To: users@cocoon.apache.org
Subject: Re: Using spring configurator (for properties) in block

Robby Pelssers wrote:
> 
> So I created following  property file in 
> /META-INF/cocoon/properties/application.properties
> repository.dir=D:/_testdata_
> repository.dir.released=${repository._dir_}/XML Repository
> repository.dir.flyerdefinitions=${repository._dir_.released}/Flyer 
> Definitions

Maven doesn't expand properties like Ant does, you either have to avoid 
it, like in:
repository.dir.flyerdefinitions=D:/_testdata_/XML Repository/Flyer 
Definitions

...or ...since Cocoon reads properties files according to their names, 
you can still enjoy properties expansion by splitting the properties 
into different files:

/META-INF/cocoon/properties/application.properties
repository.dir=D:/_testdata_

/META-INF/cocoon/properties/b-application.properties
repository.dir.released=${repository._dir_}/XML Repository

/META-INF/cocoon/properties/c-application.properties
repository.dir.flyerdefinitions=${repository._dir_.released}/Flyer
Definitions

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


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


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


Mime
View raw message