This concerns the JBoss part of the question: If there are real product-specific differences in the code, they should hopefully be localized to one or few classes. Apart from this hygienic measure, it would be unhelpfully painful to separate your project into two.
Most of the configuration files should be the same for the two environments too; if not, you may consider doing what we do at my job site: We have a conf_XXX
and a conf_YYY
directory for separate configuration files.
The problem of including/not including the correct files per deployment environment should be delegated to one or two ant
build scripts. If there are indeed file differences, you can create a proj_Weblogic.war
and a proj_jboss.war
and deploy those to the appropriate servers. If you can't find specific deployment ant tasks, you can still use straight file copy
tasks or scp
to move your WAR files into the server's appropriate deployment directories.