advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the Code!
Sidebar 1. A More Complete Eclipse Environment
Partners & Affiliates
advertisement
advertisement
Average Rating: 5/5 | Rate this item | 3 users have rated this item.
 Print Print
 
Integrate the Eclipse Web Tools Platform and Maven
Leveraging the Eclipse Web Tools Platform (WTP) and the M2Eclipse (M2) plugin in the same project has compelling benefits for the Java web developer. 

advertisement
he Eclipse Web Tools Platform (WTP) and the M2Eclipse (M2) plugin are separate projects, each with high value for the developer who uses Eclipse. WTP is a tools bundle that extends the Eclipse platform for web and Java EE application development, while M2 integrates Maven tightly into the IDE. Leveraging both in the same project has compelling benefits for the developer. Unfortunately, Eclipse has yet to offer WTP and M2 integration OOTB (that's Out Of The Box, if you didn't know). That's where this article comes in.


This article demonstrates basic web application development using both WTP and M2 as an integrated solution. By walking through a project-building exercise from setup through deployment, it will enable you to speed up your own Eclipse-based Java web development by applying the same process.

Environment Setup
The primary development environment for the project described in this article is Eclipse. Your Eclipse environment must include the following technologies to complete the exercise.

What You Need
WTP 2
M2 Plugin
The latest version of Java 5
The latest versions of Tomcat
The settings file from the Maven 2 install
(available in the apache-maven-2.0.8\conf folder)

 
Figure 1. Server Configuration: Follow these steps to configure the server.

See Sidebar 1 for a more complete list of Eclipse download links.

WTP and M2Plugin Configurations
Before you begin, you must set some initial server, browser, and Maven configurations. In fact, when you launch Eclipse with the M2 plugin you may see an error message regarding a settings.xml file. Ignore the message. It will be resolved shortly.

Server Configuration
Configure your server to run the web application. From the Eclipse menu, follow these steps to configure the server (see Figure 1): Windows→Preferences→Server→Installed Runtimes→add.

Select the appropriate version of Tomcat. In the next page of this wizard screen, browse to the Tomcat home directory and press "finish."

 
Figure 2. Maven Settings: Navigate through Eclipse Menu→Window→Preference and click on Maven in the left panel.

Configure Browser
When you launch a web application using WTP, it opens in an internal browser. You may prefer to have your web applications open in an external browser of your choice. If so, configure the external browser to launch using the Eclipse menu path Window→Web Browser.

Maven2 Configurations
Navigate through Eclipse Menu→Window→Preference and click on "Maven" in the left panel. This may take a short while. If so, please wait. Note the file path mentioned in the "User Settings file" field (see Figure 2). Ensure a valid settings.xml file is present in this location. If you don't have a valid settings.xml file there, copy it from apache-maven-2.0.8\conf. Press the "OK" button.

Now you can start the actual work of creating a dynamic WTP project and integrating it with the M2 plugin.

Page 1 of 4


advertisement
  Next Page: Project Setup
Page 1: IntroductionPage 3: Development—Finally!
Page 2: Project SetupPage 4: Launching the Web Application from WTP
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES