Reputation: 1585
I have a little spare time project that is based on JDK8 and makes use of it's new features. Therefore it is not backwards compatible to pre-JDK8. Now I made a little backport to JDK7, because it will take a long time till people start jumping on JDK8. Question is now how to keep those two different versions on GitHub or somewhere else.
One approach would be to have two different repositories named MyProject and MyProjectPreJDK8 (or MyProject and MyProjectJDK8), which seems "inelegant" to me, or have both versions in the same repository defining different source paths in maven for src/main/java and src/main/java8. I fear having different source paths in maven will result in a lot of work to get the built working (selectively preJDK8 or JDK8) and it will confuse users ... So in my utter desperation I thought I ask the community out there whether they have come up with something smarter ;-).
Upvotes: 1
Views: 106
Reputation: 10226
You can maintain two branches of your project, maybe with shared unit tests.
As for releasing them to the public, I would say you can take a look at this question:
Building same project in Maven with different artifactid (based on JDK used)
Upvotes: 2