How to Implement a new Migrator - OndraZizka/jboss-migration GitHub Wiki

Stub

Implementation

  1. Create a new package in org.jboss.loom.migrators.*

  2. Implement IMigrator. You may use AbstractMigrator which deals with conf.<migratorName>.* app parameters by putting them to a Map<String, String>.

  3. If you need an action which is not in the existing set, first discuss on #jboss-migration IRC channel.

  4. If it's a warn-only implementation (let's user know that the impl is not done yet), create ManualAction(s) like this:

     // TODO: Report exactly what was found in which deployment.
     ManualAction manualAction = new ManualAction();
     manualAction.addWarning(
             "jboss-classloading.xml or/and jboss-web.xml was found in your deployments.\n"
             + "Migration of classloading configuration is not supported (yet).");
     ctx.getActions().add( manualAction );
    

Test Case

  • Use Arquillian
  • Use org.jboss.loom.TestAppConfig
  • Put the test in the same package
  • If it needs an app, see ShrinkWrap