Dashboard > Community Wiki > ... > Modules > ModuleAndEclipse
ModuleAndEclipse Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Jun 23, 2008  (view change)
Labels: 

How to develop your custom module with Eclipse

''Tested with Magnolia trunk (v3.1 M1 or something)
This assumes that you've checked out Magnolia and set it up in Eclipse already. See Introduction to building Magnolia for details.''

1. Create the skeleton

Follow the steps here Module QuickStart

2. Prepare the module for Eclipse

  • Install JCR:
    % mvn install:install-file -DgroupId=javax.jcr -DartifactId=jcr -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/jcr.jar
  • Turn it into an Eclipse project
    % mvn eclipse:eclipse -Dwtpversion=1.5

3. Import the project to Eclipse

  • In the Import window select General > Existing Projects into Workspace and select the folder containing the module
  • Then select the module and hit "finish"

4. Fix some references

  • Set the parent reference correctly in the modules pom.xml
  • Edit the pom.xml of the "magnolia" project to include your new custom module
    {{ <dependency>
    <groupId>info.magnolia</groupId>
    <artifactId>magnolia-module-data</artifactId>
    <version>1.0-SNAPSHOT</version>
    </dependency>}}
  • Add the module also to the J2EE Module Dependencies of the magnolia project (See the projects properties)

This should do the trick. Now you can start to work on your module, e.g. by modifying the module configuration in the modules /src/main/resources/META-INF/magnolia/ folder.

5. Add the resources

  • e.g. data for the repository:
    • Setup the data as you need it in a running magnolia instance
    • Export the nodes to file(s)
    • Add file(s) to your module project under /src/main/resources/mgnl-bootstrap/modulefolder/workspacename
    • Bootstrap switch?
  • e.g. resources for docroot
    • Add them to /src/main/resources/mgnl-files/docroot/modulefolder/

In its previous incarnation on JspWiki, this page was last edited on May 4, 2007 5:55:15 PM by Magnolia
Other known authors include :

Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators