Hi Maven enthusiasts!
 
We are using the release plugin to release WAR/EAR artifacts to the maven2 
repository. The problem we have is we can't figure out the best way to filter 
environment specific properties.
 
1. We tried the approach with a different classifier per environment. We then 
had to run release:perform with a different classifier for as many environments 
as we had. What I don't like about this approach is that you duplicate the 
artifacts in the repository and you need to know ahead of time all the 
environment properties.

2. Another approach might be to run release:perform only once and don't do any 
filtering at that time. Then I guess you can write a custom deploy script that 
downloads the WAR or EAR from the repository. Unpacks and performs property 
filtering, repacks and copies to the application server. I would like to have a 
generic script to handle this but each project has it's own configuration, for 
example things get increasingly complex if you have JARs inside your EAR where 
you need to unpack each JAR and filter properties in files inside these JARs...
 
3. Last approach I can think of is all properties are discovered at runtime, in 
many cases that can prove very hard to achieve. For example, you are deploying 
a SAR inside an EAR and you have a configurable jdbc connection url in a ds.xml 
file inside your SAR, how can you go about runtime discovery? That doesn't seem 
feasible...
 
What others have found to work in this problem space?
 
Thanks,
-Guillaume Jeudy


____________________________________________________________________________________________________
This electronic mail (including any attachments) may contain information that 
is privileged, confidential, and/or otherwise protected from disclosure to 
anyone other than its intended recipient(s). Any dissemination or use of this 
electronic email or its contents (including any attachments) by persons other 
than the intended recipient(s) is strictly prohibited. If you have received 
this message in error, please notify us immediately by reply email so that we 
may correct our internal records. Please then delete the original message 
(including any attachments) in its entirety. Thank you.

Reply via email to