Magnolia 6.0 Do UpdateTasks Of MyModule At Least
currently i use a simple ModuleVersionHandler like this :
public class MyModule extends DefaultModuleVersionHandler {
public MyModule() {
DeltaBuilder v60 = DeltaBuilder.update(".0.0", "Update to 6.0 and new configuration settings.");
v60.addTask(new BootstrapSingleModuleResource("Module configuration","Default configuration for myModule web.","config.modules.myModule.xml"));
register(v60);
}
@Override
protected List<Task> getExtraInstallTasks(InstallContext installContext) {
List<Task> extraTasks = new ArrayList<Task>();
extraTasks.add(new NewPropertyTask("SiteDefault","Set Default Site Task", RepositoryConstants.CONFIG, "/modules/site/config/site", "extends" , "/modules/myModule/config/myModule/"));
return extraTasks;
}
}
my problem is, if i deploy it in cleared workspaces @Tomcat or Wildfly the update will be processing at first so in that case it will fail because the magnolia nodePath /modules/site/config/site will not exist.
if i rewirte as example into NodeDelegateTasks to do a check before and create the path by myself or something else that build the node path and set the extends property, the following magnolia install tasks will overwrite my tasks. it fells like that the magnolia installation Tasks will remove previous node that will match with /modules/site/*
How can i tell Magnolia to do myModule tasks at least or after the init install of magnolia ?
Kind regards
Answer
You could either add a build-dependency through Maven/Gradle like @bradley-andersen suggested or only add the module as an install-dependency in your Module Descriptor XML like this:
<dependencies>
<dependency>
<name>core</name>
<version>3.6.0/*</version>
</dependency>
See magnolia documentation for further info about the module descriptor: https://documentation.magnolia-cms.com/display/DOCS60/XML-based+module+descriptor#XML-basedmoduledescriptor-Moduledependencies
Related Questions
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM