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
advertisement
Average Rating: 5/5 | Rate this item | 3 users have rated this item.
Email this articleEmail this article
 
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.

  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: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: BitLocker Encryption on Windows Server 2008
Go Parallel Article: Intel Thread Checker, Meet 20 Million LOC
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES