i have main development on git master
branch, , build mvn
. sometimes, create temporary "experimental" branch pursue particular algorithm idea or refactor. of experiments don't lead want them go, blow branch away again , go master
.
question: how best keep ~/.m2
repository being polluted code on experimental branch? both branches have same version identifier (there no point in incrementing on experimental branch) , builds overwrite each other.
i create different build profiles specifying different .m2
directories, know i'll forget specify them when building. also, require me create different profile each throw-away branch, , makes throw-away branches far less appealing in git.
is there better way?
update: i'm thinking use different artifact id on different branch. if there mechanism in maven declare property this:
<myprop>$(git branch | grep '^\*' | cut -f 2 -d ' ')</myprop>
but guess there isn't.
Comments
Post a Comment