- This topic has 2 replies, 3 voices, and was last updated 12 years, 1 month ago by Brian Fernandes.
-
AuthorPosts
-
pierre.henryMemberI have a web project where some configuration files are filtered during the build process, using filters that depend on the environment specified using the profiles mechanism
To illustrate this, we have a properties file that contain the following line :
mediafiles.images.dir=${webapp.mediafiles.imagesDir}
In another profile-specific properties files we have the following line :
webapp.mediafiles.imagesDir=d:/JavaTools/apache-tomcat-7.0.29/webapps/lis-media/images/
The goal is of course to have different values for different environments (developer machines, test, quality, production etc.)
(see also this other question)
It works fine when using Maven to build, either from command line or inside ME, but when deploying to Tomcat using the MyEclipse connector, the Maven build is not executed and the files are copied but not filtered, so thex still contain the ${…} patterns.
Is there a way to force ME’s deployment process or server connector or whatever it is called to perform the same packaging steps that are done in the Maven build ?
The workaround used so far was to have a double set of files, with plain unfiltered files in the normal location (used for development in MyEclipse), and filtered files somewhere else, and then in the maven bbuild, replace the plain files by the filtered ones. It works but it unnecessarily complicates the build process and if we are not careful it generates problems such as duplicalte properties files or unfiltered files landing on test or quality servers with the ${…} still inside.
Also, it defeats the purpose of having environment profiles, since each developer has to maintain the unfiltered files and be careful in case thiese files are commited to SVN etc…
So if I could have a solution that works with both Maven and the ME deployment mechanism it would be great.
Regards,
support-swapnaModeratorpierre.henry,
I have escalated it to a dev team member. They will get back to you.
Brian FernandesModeratorPierre,
I have responded in your other post – let’s continue any further required discussion in that thread: https://www.genuitec.com/forums/topic/maven-builder-what-does-it-do-and-not-do/
-
AuthorPosts