Hi all,

First of all, why does Magnolia think we should launch migration tasks from a 
version handler class? Migrating data is neither conceptually connected to 
increasing a module's version number nor it's technically practical. That way, 
running the tasks is painful, since it's invasive, too circuitous (version 
increase, magnolia restart...) and hardly repeatable.

A much cleaner way would be to run them from a groovy script within a running 
Magnolia. I assembled some of the main migration task classes and tried to run 
it, but ran into NullPointerExceptions. I double checked DMS data as well as 
constructor arguments (from what I could tell from the argument names; there's 
no javadoc). My script looks as follows:

[code]import info.magnolia.dam.setup.migration.*;
import info.magnolia.dam.app.setup.migration.*;

// DMS -> DAM (DMS must be installed and old data imported)
new MoveDataWorkspaceToDamMigrationTask(
    "Migration task: Migrate DMS content to DAM", "Migrate DMS to DAM",
    Arrays.asList("/semiramis"),
    "/",
    "dms"
).doExecute();

// website -> DAM
new MoveContentToDamMigrationTask(
    "Migration task: Migrate Uploaded content to DAM repository", "",
    "website",
    Arrays.asList("/semiramis"),
    "/moved_uploaded",
    null
).doExecute();

// website/FCKEditore -> DAM
new MoveFCKEditorContentToDamMigrationTask(
    "Migration task: Migrate Uploaded content to DAM repository", "",
    "website",
    Arrays.asList("/semiramis"),
    "/moved_uploaded_fck",
    null
).doExecute();

// website/links etc. -> DAM
new CleanContentForDamMigrationTask(
    "Migration task: Clean Content repository", "",
    "website",
    Arrays.asList("/semiramis")
).doExecute();[/code]

I suspect the problem might be the fact I executed those tasks from a groovy 
script instead of a version handler, but debugging from a groovy script is 
hardly possible in a productive way.

Have others ran into similar problems?

Does someone understand the idea behind Magnolia's suggested version handler 
setup?

Cheers,
Cedric

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=eea49958-142d-4666-b683-07881e085129


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to