I have built a war overlay project, which works fine.
As is typical in an enterprise environment I need to be able to
configure the project (at build time) for various environments
(example: development, test, staging, production, etc.). I'm having
some trouble figuring this out.
I do have an idea how maven profiles work, and can have setup
profiles, but the end settings need to be in a file(s) named by
environment or scoped to environment by a directory structure. The
reason for this is because different machines may need to set up
different environments differently, and the way you do this robustly
is to store sample files in svn, and developers (or the deployment
script) configure copies of those files with appropriate settings.
This way we avoid storing db passwords etc. in svn.
Anyway, I would like to have a series of cas.properties files --
cas.test.properties, cas.staging.properties, etc. -- and copy the
correct one when I do a maven package/install. I know about using
antrun to copy files, but for the life of me I can't find where in the
various pom.xml files the cas.properties file is managed or how to
specify by profile which one to copy. What property in maven
corresponds to the WEB-INF directory in the final .war? I know about
the property maven.war.webapp.dir, but when I try to use this property
in a profile in my overlay projects pom.xml maven complains it does
not exist.
Can anyone help me figure this out?
To comply to our standards the final result must be a 1-line build
that can choose environment by system switch, which maven profiles is
intended to let one do.
Cheerio,
Michael Johnston
[EMAIL PROTECTED]
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas