Difference between revisions of "Maven integration in eclipse"

From MPDLMediaWiki
Jump to navigation Jump to search
Line 5: Line 5:
== Install the maven plugin ==
== Install the maven plugin ==
Do the following steps to install the maven plugin:
Do the following steps to install the maven plugin:
* Go to Help->Software Updates->Find and install...
* Go to ''Help->Software Updates->Find and install...''
* Choose ''Search for new features to install''
* Choose ''Search for new features to install''
* Add a new remote site with the following info:
* Add a new remote site with the following info:
Line 16: Line 16:
== Importing the projects ==
== Importing the projects ==
To import all the submodules of a project, do the following:
To import all the submodules of a project, do the following:
* Go to Files->Import...
* Go to ''Files->Import...''
* Choose ''General->Maven projects''
* Choose ''General->Maven projects''
* Now choose the root of your projects folder (it's the one with a pom.xml and the submodule folders)  
* Now choose the root of your projects folder (it's the one with a pom.xml and the submodule folders)  
Line 29: Line 29:


For local testing a JBoss server can be used to deploy the project artifact. To define a JBoss instance in eclipse, do the following:
For local testing a JBoss server can be used to deploy the project artifact. To define a JBoss instance in eclipse, do the following:
* Go to Window->Preferences...
* Go to ''Window->Preferences...''
* Choose Server->Installed Runtimes->Add...
* Choose ''Server->Installed Runtimes->Add...''
* Choose a JBoss Version (normally 4.2) and add the path to your JBoss installation. Remember, use the server in ''jboss/server_eclipse''!
* Choose a JBoss Version (normally 4.2) and add the path to your JBoss installation. Remember, use the server in ''jboss/server_eclipse''!
* Now open a server view and righclick in it
* Now open a server view and righclick in it
* With New->Server you can add your created server runtime
* With ''New->Server'' you can add your created server runtime

Revision as of 13:45, 18 March 2008

Prerequisites[edit]

  • Eclipse 3.3.1.1
  • Subclipse plugin for eclipse 1.2.4 (get it here)

Install the maven plugin[edit]

Do the following steps to install the maven plugin:

  • Go to Help->Software Updates->Find and install...
  • Choose Search for new features to install
  • Add a new remote site with the following info:
Name: Maven
URL: http://m2eclipse.codehaus.org/update
  • Install version 0.0.11 of the plugin; 0.0.12 won't work since it's complaining about a misconfigured plugin

Importing the projects[edit]

To import all the submodules of a project, do the following:

  • Go to Files->Import...
  • Choose General->Maven projects
  • Now choose the root of your projects folder (it's the one with a pom.xml and the submodule folders)
  • Check every project and import all the modules

You will get a parent eclipse project with all submodules and eclipse projects of all the submodules.

Attention, at the moment, the subversion plugin only works from the parent eclipse project.

Define the JBoss instance[edit]

For local testing a JBoss server can be used to deploy the project artifact. To define a JBoss instance in eclipse, do the following:

  • Go to Window->Preferences...
  • Choose Server->Installed Runtimes->Add...
  • Choose a JBoss Version (normally 4.2) and add the path to your JBoss installation. Remember, use the server in jboss/server_eclipse!
  • Now open a server view and righclick in it
  • With New->Server you can add your created server runtime