Eclipse Marketplace - Maven Integration - java

I am in Eclipse Indigo and trying to install Maven Support for eclipse. I search Eclipse Marketplace with "maven" and found there are two entries:
Maven Integration for Eclipse WTP.
Maven Integration for Eclipse.
Now I am confused to choose them.
I am developing web application. So what is the entry I should go for?

Install them both. The first is specifically designed to integrate with WTP, the second one is general Maven integration in Eclipse.

Have you tried to just use Maven? With Indigo, m2e is already integrated. If you look at eclipse.org, you will find there the following features integrated:
If you open the preferences in Eclipse (Windows > Preferences), you will find there the Maven configuration for Eclipse:
You have to configure there, where your Maven installation lives, and can start to use Maven inside Eclipse.

Related

No option for creating a maven project in eclipse ide

This is screenshot from a list of available projects. You can follow: File/New/Other. But there is no option for choosing Maven Project.
I have Eclipse IDE for Java EE developers and Ubuntu 16.04
screenshot of eclipse ide
How to create a new maven project?
You need to install Maven Integration for Eclipse from the Marketplace.
Help->Eclipse Marketplace.
type 'maven' in the search box and install Maven Integration for Eclipse.
Install m2eclipse plugin first, go to Window -> Preferences. Check "Maven" is enlisted at the left panel list.
or use the latest version of eclipse

Steps to enable the Maven integration with eclipse

I have installed maven and eclipse juno, on CentOS. Can anyone guide me how to integrate Eclipse with maven. I am going to use this configuration for Mahout.
You need to install a plugin for eclipse so that it knows what to do about maven projects (such as m2eclipse).
Once you have that installed, you can configure it (Windows -> Preferences -> Maven) to point to your existing maven installation, and can then create maven projects via the New -> Maven Project wizard.
You can also convert existing project to maven projects via a right click -> Configure -> Convert to Maven Project.
You can download maven from from eclipse market place
Simply go to help -> eclipse market place, then search maven.
(Though i have always got it already integrated in eclipse).
After you can make various customizations to suite your needs by selecting, window -> preferences, then type in maven in the search bar ontop, you can configure the location of your settings.xml file, maven installation to use and other things you may want.
Hope this helps.

Problems integrating Maven with Eclipse Kepler

I am totally new to working with Maven in Eclipse. I am using the latest verion of Eclipse (Kepler). According other posts, as well as Eclipse's help page http://help.eclipse.org/kepler/index.jsp?topic=//org.eclipse.platform.doc.user/tasks/tasks-127.htm , I am supposed to try to install new software within Eclipse IDE.
However, when I try to Add Eclipse's recommended m2e release, Eclipse gives me an error:
Unable to read repository at http://download.eclipse.org/technology/m2e/releases.
download.eclipse[...]releases is not a valid repository location.
Essentially I run into the same problem no matter which approach I take outlined on the Eclipse help page. Is there some other/better way to integrate Maven with Eclipse? Are there steps I should have taken before this? All I have done so far is install Eclipse. How can I successfully get Maven running?
EDIT: Now I am using Java EE and still run into problems when making a Maven project. I get a "Could not resolve archetype error" could this be because I'm behind a proxy?
Most convenient option:
The reason you're getting that error is because that repo is deprecated, and it has been moved. Example of how the new repo looks:
http://download.eclipse.org/technology/m2e/releases/1.0/1.0.0.20110607-2117
Copy that in the Install New Software view, and you will see that it works.
Other options:
Install the Maven Integration from Eclipse Marketplace (Help -> Eclipse Marketplace)
Download the EE version of Kepler (comes with m2e)
Choose your own release (bottom of the page) and use the Install New Software view.
I had the same issue here and the above answer didnt work for me. Although Maven is installed I cane update my dependencies on my folder the way I used to be able to do on Juno. What I did was used the pom.xml from my current project and pasted it into the pom of my new project I created specifically in Eclipse using new project->Maven.
This was eclipse knows its a Maven project and allows my all the benefits of being one.
To install maven properly for eclipse you should set the correct repos as follow:
Help=>install=>
then work with
http://download.eclipse.org/releases/
example of eclipse version : mars or kepler ..

Using m2e plugin in a Dynamic Web Project

I have an existing Dynamic Web Project in Eclipse Indigo and the m2e plugin installed. In another version of my eclipse setup that I dont quite remember (my hdd crashed) I could just right click on the project -> Maven -> Enable Dependency Management.
This menu is gone for my Dynamic Web Project in my current eclipse version. Whats the way to go now? I tried right click on the project folder -> configure -> convert to maven project but that fails with errors.
M2Eclipse has migrated to an Eclipse project from Sonatype called m2e. Therefore in you Eclipse Indigo you have installed m2e whereas your old Maven projects in the older Eclipse version were created with M2Eclipse according to your right-click description. Now under normal circomstances everything should be working flawlessly and we wouldn't have this discussion. Unfortunately with the move of the project the namespace has changed from org.maven.ide.eclipse to org.eclipse.m2e.core and old Maven projects created with M2Eclipse are not immediately recognised as Maven projects in m2e. Here's a description of how to migrate your projects accordingly.
Erik, importing an existing maven project would let m2e discover and propose you to install m2e-wtp, the Maven Integration for Eclipse WTP plugin. Since you're starting from scratch, you should install m2e-wtp yourself (see https://github.com/sonatype/m2eclipse-wtp/wiki).
Now in order to quickstart a new mavenized web project, you should go to the "New Project" menu and choose new Maven project.
At this point, either you choose to create a "simple" project, in which case you need to select the "war" packaging on the following screen, or use a maven archetype, which will quickstart a new preconfigured web project, with the flavor you want (jsf, spring ...). The m2e-wtp wiki has links to help you get started.
Note : at this point Eclipse to Maven conversion is pretty much inexistant (only creates a bare pom.xml), that's why I recommend to create a maven project first. Hopefully, this should get better in the next m2e 1.1 (June 2012)

How to create new Eclipse RCP project using Maven?

How to create new Eclipse RCP project using Maven (preferably m2eclipse)?
I read that there's plug-in for Maven that have idea about Eclipse.
(Maven Eclipse Plugin) And then it looks like I need to find some Maven Archetype to create Eclipse RCP project, but I could not. At this point I am in doubt if I go right way.
I just want to use maven dependencies resolution and other features in my RCP application development.
P.S. I found that it is possible to "Enable Dependency Management" via m2eclipse.
The other option is to make 2 project: maven project and Eclipse RCP project that will reference the first on classpath. What is the smart way?
P.P.S There's also option to use Eclipse dependency resolution mentioned here
Convert your library project to a
plug-in project (right-click ->
Configure -> Convert to Plug-in
Project) and add it to the
dependencies of your plug-in project
(manifest editor, Dependencies tab).
Maybe Tycho (http://tycho.sonatype.org/) will help you. Currently, it seems to be a little bit alpha, but after releasing Maven 3.0, Jason van Zyl promised to spend more time on Tycho (http://www.sonatype.com/people/2010/10/maven-3-0-has-landed/).
Pending all the maven3 magic highlighted in Steve's answer, you do have this Maven RCP build recipe, based on the pde-maven-plugin (as presented in the Eclipse Plugin Development Environment support page)

Categories

Resources