Using Eclipse WTP to develop with Magnolia
This brings a lot of benefits
- easy debugging
- jspx syntax support
- easy update from svn
- easy check in (if you are developer)
Requirements
- Java 1.5 (mvn eclipse won't work with Java 1.4)
- Maven 2.0.5
Install eclipse with WTP (current WTP1.0M4 eclipse3.1M6)
- go to the WTP page (http://eclipse.org/webtools/)
- get all related plugins (you find them on the download page, window users can get a bundle)
- get the related eclipse 3.1 release (current is 3.1M6) do not get the latest unless it is supposed
- install the plugins (copy the jars in the features and plugin directory of eclipse
- startup (is there a J2EE perspective? if yes you have well done)
Install the svn plugin subclipse
this needs svn client 1.2 installed (windows distribution is bundled)
- Use the update mechanism in the help menu point of eclipse
- enter the url to find the plugin: http://subclipse.tigris.org/update/
- install the plugin and restart
Connect to the svn server
- Window / Open Perspective / Other.. / SVN Repository Exploring
- Add the repository
- the url is http://svn.magnolia.info/svn/magnolia
Checkout
- click with the right mouse button on the /trunk
- Checkout as Project
This generates a non Java Project.
Register a 5.5 Tomcat Server runtime (I was not able to run it with 5.0.28)
- Open the J2EE Perspective
- right click in the Server tab
- register your tomcat installation
If you are using java version 1.4.2 you must also add the jars from the tomcat-compat package which you can find on the tomcat download page
Convert the non Java Project to a Dynamic Web Project
- register the classpath variable MAVEN_REPO. It must point to the maven repository (Preferences / Java /Build Path / Classpath variables)
- close Eclipse
- use the command: maven eclipse
- this creates all the project files needed for the WTP plugin
- open Eclipse and refresh the project
Make the jars accessible for the wtp server configuration
- call maven copylibs in the directory where you checked out the project
Do this every time a lib changed in the project
Increase Memory
- In eclipse, go to WIndow/Preferences/Java/installedJRE's
- select your JVM and click edit
- add at the default VM arguments: -Xmx512M
Add the project to your server
- go back to the server tab
- right click on your server
- add the project
Run the server
- in the server tab you should be able to start the server
Good Luck!
For developers only
- install coding conventions
- install checkstyle plugin
In its previous incarnation on JspWiki, this page was last edited on Apr 17, 2007 4:28:54 PM by Magnolia
Other known authors include :
- Ferris
- Philipp
- BorisKraft