Hi Michael!

We use Maven profiles for that.

You have to modify the project's pom.xml little bit. Introduce as many profiles 
as you want (development, integration, ...) and create a separate directory for 
each of them. Then use a <build>/<resources>/<resource> element in your 
pom.xml, which will point to the respective directory. The path to the 
directory can contain something like ${my_profile_name}. You set its value in 
your profile definition.

And the directory can contain properties files tailored just for the respective 
profile. And, inside XML files, you just type something like ${my_property}, 
where "my_property" is defined in a properties file inside a profile-specific 
directory.

Then, to build the project, just specify the profile name: mvn install 
-Pdevelopment

I think you can find some examples on the Maven site.

Hope this helps!

Jarda

-----Original Message-----
From: Michael Wechner [mailto:[email protected]]
Sent: 20. November 2014 8:45 dop.
To: [email protected]
Subject: [cas-user] Multiple environments with different bean properties values

Hi

We are using CAS within different environments, like for example

- development
- integration
- staging
- production

and inside

deployerConfigContext.xml

we have some custom bean properties, but depending on the environment have 
different values, e.g.

<!-- Test environment -->
<property name="baseUrl" value="https://test.wyona.com/"/>
<!-- Production environment -->
<property name="baseUrl" value="https://www.wyona.com/"/>


Every time we make changes on this file, we need to remind ourselves that we 
have to comment or uncomment the property with the right value depending on the 
environment where we deploy the file.
Which of course leads to errors ;-)

It would be nice to have some kind of environment/profile functionality within 
CAS, like for example

<property name="baseUrl" value="https://test.wyona.com/"; env="test"/> <property 
name="baseUrl" value="https://test.wyona.com/"; env="prod"/>

Is this possible somehow? Or how do others solve this?

Thanks

Michael



--
You are currently subscribed to [email protected] as: [email protected] To 
unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user



Join IDC beginning October 29, 2014 through January 29, 2015 for:
IDC's 2015 Predictions and IDC FutureScapes Web Conference 
Series<www.idc.com/predictions2015>
Accelerating Innovation on the 3rd Platform
Register 
Now<http://event.on24.com/r.htm?e=861361&s=1&k=223AFC21785863D975C9D80CEE2A97C2>



-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to