using Eclipse as Magnolia IDE
The following article describes how you can use Eclipse as IDE for your Customization of Magnolia. It has kindly submitted by Will Scheidegger from fastforward websolutions.
0. System Setup
The guidance in this article refer to the following system:
1. Setting up the project in Eclipse
Assuming that you have correctly installed Eclipse IDE and MyEclipse plugin...
-
- ...launch the IDE and select "New> Project" from the "File" menu. Do not use the "New Java Project" button, since it will not give you the same options.
- Eclipse will open a "New Project" window and will let you select the appropriate wizard. Select "J2EE > moduleProject (Web Project!?) amd click Next.
- Fill the project name. We used "magnolia" because we are not yet so sure about what effect different names will have on the configuration. Leave the rest as it is and hit the "Finish" button.
-
- In the File system, copy everything from your magnolia-distribution-folder/author/webapps/magnolia WebRoot folder Eclipse has created in the magnolia project folder inside your Eclipse workspace.
-
- Switch back to Eclipse, control click on the magnolia project folder and select "Refresh" from the context
Now all the magnolia stuff should appear underneath the magnolia project folder. You are ready to start developing.
2. Configure the Tomcat Servlet container
When you are ready to test your customization the MyEclipse features to control the application server come in handy. You can deploy your web project directly from Eclipse and start/stop the application server adapter in Eclipse.
-
- Select "Preferences: from the "Window" menu.
- Open "MyEclipse" > Application Servers" select "Tomcat 4"
- Enable the application server and choose your magnolia-distribution-folder/author folder as Tomcat Home and Tomcat Base Directory and click "Apply".
- Now, switch to the JDK settings for this app server and add these JAVA VM arguments:
where {/MDF} is the full path to your magnolia distribution folder.
- I have not yet figured out what the "Debug mode" option in the "Launch" setting panel does, but since we are developing, I turned it on in my setup.
- Conclude the adapter configuration by clicking the OK button.
3. Deploy your Magnolia application to Tomcat
If everything upto this point worked out for you, you are ready to deploy your application.
-
- Make a backup of your original author webapp...you never know when you might need it! Delete "magnolia" folder from the author/webapps afterwards.
- Click the "Deploy J2EE projec to server" button.
- In the project deployments windows, select your magnolia project from the pop up menu, click "Add" and the Tomcat application that you have configured in the previous step. I would suggest to have it deployed to the "Exploded Archive". This will make things easier for you if you need to check if some file has not been deployed. Click the "Finish" button to deploy the project.
- Now you can launch the Tomcat with the "Run/stop servers" button in the Eclipse button bar. Your magnolia instance should be available shortly after under http://localhost:8081
4. Synchronizing author and public instance
After changing your templating you should synchronize the public instance with the author instance
-
- Copy the sync.xml build file you find in SynchronizingTemplatingOfAuthorAndPublishInstance into your magnolia project
- Verify whether you have to modify the build file to match your directories
- Open "Run > External Tools > External tools" and configure sync.xml
- Run this tool
5. Synchronizing your development author instance with your productive instance
After testing your templating in the author and the public instance you can synchronize your productive server with the author instance. You need some knowledge of ANT to customize the build files (ANT Tutorial)
This is the most critical step, so make sure to have a backup of your installation. Typically a restart of the productive instances is necessary, so you should do this within a maintenance time slot.
-
- Copy the ServerScript.xml and toServer.xml build files you find in Sync Development and Server into your magnolia project
- Modify the build files to match your installation.
- Open "Run > External Tools > External Tools" and configure toServer.xml (at least set password and server as properties)
- Run this tool
In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:26:16 AM by MarkusStrickler
Other known authors include :