For the release of Jaybird (Firebird JDBC driver) we also want to release to the Maven repository. I am now considering how to name/version the artifacts, as there is a different version for each supported Java version (for the upcoming Jaybird 2.2 it would be a version for Java 5/JDBC 3, Java 6/JDBC 4.0 and Java 7/JDBC 4.1).
I have found three different ways of naming JVM specific versions:
<artifactId>jaybird-jdk15</<artifactId>
)<version>2.2.0-jdk15</version>
)<classifier>jdk15</classifier>
)As the builds have different sourcecode one could consider the JVM variants to be actually different artifacts (option 1). I have seen that PostgreSQL JDBC uses option 2. Option 3 has (AFAIK) the downside that you can't include version specific sources and javadoc.
I would like to know if I have missed a totally different option or maven-feature for JVM specific artifacts, or if there is a preferred method for versioning these types of artifacts.
NOTE: The Jaybird build process itself does not use Maven
Due to the fact that the source code is different for both, I'd go w/ option 1. It really is a different artifact.
Now, if you combined all the source into one tree, and used profiles to build the different artifacts, I'd go w/ option 3. But only if it became more of one source code base.