I installed maven on eclipse, its working when I go to the project and do do maven clean, then maven install. But if I go the project and try to go to Configure then as maven project, the option does not appear in my eclipse but in my friends eclipse it appears.
Eclipse is designed to run completely stand-alone, so for a quick fix you could just copy over your friend's eclipse folder to your own machine and see if the option appears.
For the long fix, how about reinstalling the maven eclipse plugin software?
http://maven.apache.org/eclipse-plugin.html
Related
I try to build a project, which is using the Maven Wrapper. The build works fine on command line. There is also a plug-in for IntelliJ Idea. However, I haven't found any article, how to build such project with Eclipse.
Do you have an experience with project build by ./mvnw command instead of mvn in Eclipse, please?
As implied by the comment from LMC, the Java edition of Eclipse will come with the "m2e" plugin, which will automatically recognize a project with a pom.xml file as a Maven project, and it will automatically note the dependencies, download them, and compile your source code with those artifacts as dependencies.
That deals with dependencies and compilation. If your build is running unit tests with Surefire, or generating code with particular plugins, unless there is a specialized m2e connector for that plugin, Eclipse will not know to do that.
Inside Eclipse, if you need to run a Maven build, you don't need to care about "mvn" vs. "mvnw". Eclipse will have an embedded Maven installation.
Similar issue to this issue but it seems to be a maven/eclipse project issue.
I am using eclipse neon to check out from git, like this:
File -> Import
Maven -> Check out Maven projects from SCM
Now give it the url as below:
I am using the following public github repo and I am seeing that Maven m2e during git checkout is not working, I get issues like the screenshot here where "import org.springframework.*" items are not being imported. All of this "just works" when I build with "mvn clean install" from the commandline, but is failing inside eclipse:
I have tried to refresh, and can't figure out any other action which might clear this issue up from inside "m2e" (maven to eclipse) integration in Eclipse Neon.
The projects appear to have "maven nature" but are not buildable. I checked in the project properties and I don't see any errors in the Builders or Java Build Path. I also tried this with Eclipse Mars.2 and had no luck with it either.
I checked out an existing eclipse project from SVN. Then I converted it to Maven project.
The project is compile with Maven target clean install perfectly no problem. But the eclipse doesn't identify any dependency jar file. Basically it does not know the Maven repo path. It knows only JDK path. So all my java classes are with full of red lines.
Everything in this site and google I checked all fine. But why eclipse can not find the mvn repo?
eclipse version = JUNO Version: 4.2.2. ( I think this has inbuilt maven plugin)
Maven plugin detail = M2E - Maven Integration for Eclipse version - 1.4.0, Provider - Eclipse.org -m2e
UPDATE ======================
If I checkout the source code separately and import it as a maven project that way its working. But I want to know why if I checkout the code through Subclipse and convert it to maven project is not working?
Run
# use maven to control your eclipse .project and .classpath files, that is
mvn eclipse:clean
mvn eclipse:eclipse
and then restart your eclipse (or switch your workspace and then back).
Make sure you have the m2e plugin, - from here, you should read the Release Notes and add this to your update sites - "http://download.eclipse.org/releases/juno" and "http://download.eclipse.org/technology/m2e/releases".
In Eclipse, you can actually create an external tool Run> External Tools> External Tools Configurations. After this you can select your project that you want to setup and run this external tool.
or if you have maven plugin installed in eclipse, select your project right click Run As > Maven Build... (see below image). In Goals put "eclipse:eclipse" and click Run
I am in Eclipse Indigo and I have installed m2eclipse plugin. I saw in Eclipse Helios there is an option Maven in the right click menu, when I clicked on a Project, but this option is not present now.
I have installed Maven from both of the marketplace and also from adding site in Install new software option in Eclipse(Help->Install New Software).
What I am doing wrong.
This question was asked before in SO, but I tried the solution provided there.
Is this option is really not present? What I want is to enable Maven Dependency Management of a Dynamic Web Project of Eclipse.
You have to do a right click on the project, then choose Configure → Convert to Maven project
Right Click on the Project --> Configure --> Convert to Maven Project.
It will show Maven Related Options.
One way is to import the project as Maven project.
If you are trying to install in Eclipse older versions, use YOXOS Marketplace - by EclipseSource. Search for "Maven" in marketplace. You will get Maven Integration for Eclipse provided by Sonatype. Use that to install.
After installing m2eclipse plugin, go to Window -> Preferences. Check "Maven" is enlisted at the left panel list
this happened to me because I imported a parent folder as a project. so all my projects where sub directories of this parent folder and not a project them selves. after deleting them (only) from the workspace and re importing them as separate projects, maven worked fine.
I have a multi-modules Maven project checked out from SVN. I installed m2eclipse in Eclipse. Then I imported the project into Eclipse. Everything is fine. But after I update my Maven project from SVN(outside of Eclipse), Eclipse will give me a lot of errors and warnings unless I import the project again. That is really annoying. I have to import the project every time that I update it from SVN.
Is there a solution?
Thanks a lot. :)
Install Subclipse see here: http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
Then install, m2eclipse and m2eclipse extras as mentioned here: http://m2eclipse.sonatype.org/installing-m2eclipse.html
After, these are done.
Open Eclipse go to Window > Open Perspective > Other... > SVN Repository Exploring
Add URL to SVN repository/code base.
Select a project. Right Click and select Checkout as Maven Project. You're done.
Now, update, commit, delete, build all from inside Eclipse.
Install m2e and subclipse from the Eclipse Marketplace depending on what version of Eclipse you have. Then:
Open Eclipse go to Window > Open Perspective > Other... > SVN Repository Exploring.
Add your svn url to SVN repository/code base.
Select a project. Right Click and select Checkout.
Assuming your project has a pom.xml, switch back to your Java perspective, select the project that was just imported, right click and select Configure > Convert to Maven Project.
try the other plugin of maven may be more stable.
http://www.eclipse.org/iam/
Svn have a very stable plugin
But frankly it's not working good think about switching to intellij if you work with maven the integration between the IDE and maven is really working period
may be the free version of intellij is enough for your needs