I'm working on a Java project with Maven, where I need to deploy very often to two different weblogic environments. The only differences between these 2 deployments are a bunch of changes in these 2 files: pom.xml and weblogic.xml files. The rest of the files are the same.
We're creating 2 GIT branches for this: dev & parallel-dev.
But we're having many problems maintaining and merging the changes between these two branches.
All the changes are done in parallel-dev branch, and once this code is reviewed and approved, we're merging it to dev branch, except those two files that don't need to be merged (unless the pom version is modified - in that case we need to merge just the version change but not the rest of changes in pom.xml). This is kind of messy.
I think this method is pretty confusing and can be improved, but can't really see how. I'd love to just keep one branch for this process and avoid all those crazy merges that we're facing.
Any advice would be much appreciated.
-- EDIT --
The difference in the pom.xml is just a different profile for parallel-dev branch:
<profiles>
<profile>
<id>parallel-dev</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>env.properties</include>
<include>more.properties</include>
...
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>env.properties</exclude>
<exclude>more.properties</exclude>
...
</excludes>
</testResource>
</testResources>
</build>
</profile>
In weblogic.xml the difference is the context-root name and a library reference (this lib also has parallel-dev and dev branches).