From Fedora Project Wiki

Revision as of 16:52, 6 June 2011 by Sochotni (talk | contribs) (Created page with '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 pag...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

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
    • symlink would cause problems when finishing migration
  3. Change _mavendepmapfragdir macro to _datadir/maven-fragments
  4. Change _mavenpomdir definition to _datadir/maven-poms
  5. Add both new directories to jpackage-utils (now they are owned by maven)
  6. After rebuild all fragments will be in proper new directory
  7. Remove code dealing with old placement from maven-3