Migration from maven2

We have maven 3.x package in Fedora 15 already but maven2 is still needed (maven-3.x even Requires it). To fully get rid of several packages need to be changed or fixed. This page will try to propose a migration plan that would enable step by step conversion without disruption of packaging.

= Goals =
 * Get rid of /usr/share/maven2/poms (i.e. move _mavenpomdir somewhere sensible - /usr/share/maven-poms maybe)
 * Move fragments and depmaps from /etc/maven/ to /usr/share/maven-fragments
 * Perhaps stop using %update_maven_depmap macros and simply use things generated by %add_maven_depmap macro directly (simplify packages)
 * This will need performance review, but performance would hit only packagers anyway

= Packages affected =

maven
Maven 3.x package contains several maven2 references:
 * JavadirWorkspaceReader resolved pom files from /usr/share/maven2/repository/poms originally. This was recently extended to cover ..maven/poms as well.
 * It really reads files from /usr/share/maven[2]/repository/JPP/maven[2]/poms/
 * Makes code ugly
 * Maven currently cannot work directly with fragments but only with files generated by update_maven_depmap
 * fragments are just xml snippets (no root element). This could make it a bit more complicated

jpackage-utils

 * Main problem is _mavenpomdir macro currently set to %{_datadir}/maven2/poms
 * Let's assume redefinition to %{_datadir}/maven-poms/

maven2

 * packages that don't work with maven3 (maven-ant-tasks for now) will have problems

maven-X-plugin
Most maven plugins should work with both maven3 and maven2, but compiling them in pure maven-3.x environment might not be easy.

= Migration plan =


 * 1) Modify maven-3.x and maven2 to resolve poms from /usr/share/maven-poms in addition to old directories
 * 2) Modify update_maven_depmap macro in jpackage-utils to generate also from _datadir/maven-fragments directory
 * 3) * symlink would cause problems when finishing migration
 * 4) Change _mavendepmapfragdir macro to _datadir/maven-fragments
 * 5) Change _mavenpomdir definition to _datadir/maven-poms
 * 6) Add both new directories to jpackage-utils (now they are owned by maven)
 * 7) After rebuild all fragments will be in proper new directory
 * 8) Remove code dealing with old placement from maven-3