The Console view does not show any output when the Maven is configured to external Maven installation in Eclipse.
Please refer to the screenshots for more details.
The Console is displayed when Maven → Installations is configured for EMBEDDED Maven.
My external Maven version: 3.5.0, Eclipse Luna.
TIA
Apparently you're using Maven's brand new v3.5.0 that's just three weeks old. I don't know whether the m2e Eclipse plugin has been updated to support it already. I performed Help → Check for Updates in Eclipse and there wasn't any.
I'd try Maven's previous v3.3.9 which I experienced to be stable for 1.5 years now to see whether it works with that.
Related
I have installed the Maven plugin, "Maven Integration for Eclipse" in Anypoint Studio. How should I test from within anypoint studio to confirm that my maven plugin installation is correct? The documentation says Windows--> Preferences-->AnypointStudio-> Maven Settings-->TestMavenConfigutation. However in my machine I don't have such an option, I only have a ''Maven' option separately and it dosen't have a 'TestMavenConfigutation' option. Another thing I noticed is that after the installation of the plugin I no longer see the 'Run As --> Mule Project' option from the file menu. I can still run as a mule project successfully from 'Run Configurations'. The green play button icon which is also 'Run As' shows the mule icon for the projects, but gives deployment error when run. I am just wondering if this is normal after installing the plugin. Hope someone can advise me on the above, thank you so much everyone.
As you said, from the documentation Windows--> Preferences-->AnypointStudio-> Maven Settings-->TestMavenConfigutation should look like below image
maven test configuration
Here I am using Anypoint version 6.5.0 and need to install maven in your local and and set the path.
Check the below configurations:
1. Check your Anypoint studio version. (if it is anypoint studio >=7.0 i.e., Mule 4 then all applications are maven projects by default)
2. In local check maven version(mvn -version) to know maven has installed in your system or not.
In my previous pc I was working with linux, eclipse Indigo, m2e (I suppose v1.2 or v1.3) and maven 2.
I had configured m2e to use my external maven 2 installation, had projectA depend on projectB and without the need to install any of the projects to the maven local repository I could execute an Eclipse Maven Build (e.g: compile or dependency:tree) configured to use the external maven installation and to Resolve artifacts in workspace. That worked.
Now, I 'm using win7, eclipse kepler, m2e 1.4.1 and maven 3. I configured all in the same fashion (use external maven installation), create the same projects, use the same eclipse Maven build (run configuration) with workspace artifact resolution enabled and it don't work.
Right now it only works if i configure the maven build to use the internal eclipse embedded maven installation.
I 'd really like to always use my external instalation, does anyone knows if this feature was removed from m2e or should this scenario work as I expected and maybe it's a bug thats happening in my specific environment?
It's worth checking that the settings.xml for your external maven makes sense, and eclipse is configured to use it.
I 've tested in other similar environments obtaining same results but, when
upgraded to Eclipse Luna problem was solved.
If you 're facing similar problem, then upgrade to Eclipse Luna.
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 ..
I installed JUNO Eclipse and then wanted to get the maven plugin for eclipse. After some searching I got to know that I can install the plugin using eclipse market place. So I searched the plugin and installed it successfully but when I restarted eclipse, I cannot see Maven option when I right click on any project. When I click on WINDOWS--> PREFERENCES , I can see the Maven option there. It means, maven got installed but not sure if completely.
I reinstalled it again but still no luck. Can anyone help?
FYI, I am using maven 3.0.4
If your project is still a standard Java project, then you have to enable Maven for this project. You can do this by right-clicking on the project, then choose Configure -> Convert to Maven project. Then you have to type group id, artifact id etc. and the pom.xml is created for you.
You need to make sure you have installed the Java JDK and add it to the Preferences -> Java -> Installed JREs.
I have a project (built from an AppFuse template) that requires Maven 2.2.1. So I upgraded to this (from 2.1.0) and set my path and my M2_HOME and MAVEN_HOME env variables.
Then I ran mvn eclipse:eclipseand imported the project into Eclipse (Galileo).
However, in the problems list for the project (and at the top of the pom.xml GUI editor) it says:
Unable to build project
'/export/people/clegg/data/Workspace/funcserve/pom.xml;
it requires Maven version 2.2.1
This persists whether I set Eclipse to use its Embedded Maven implementation, or the external 2.2.1 installation, in the Preferences -> Maven -> Installations dialog.
I've tried closing and reopening the project, reindexing the repository, cleaning the project, restarting the IDE, logging out and back in again, everything I can think of! But Eclipse still won't believe I have Maven 2.2.1.
I just did a plugin update so I have the latest version of Maven Integration for Eclipse -- 0.9.8.200905041414.
Does anyone know how to convince Eclipse I really do have the right version of Maven? It's like it's recorded the previous version somewhere else and won't pay any attention to my changes :-(
Eclipse allows you to specify an external Maven installation. But there's a catch. :(
Have a look at Windows > Preferences > Maven > Installations.
You will see a message like this:
Note: Embedded runtime is always used for dependency resolution, but does
not use global settings when it is used to launch Maven.
To learn more, visit the maven web page.
Translating to English, it means that Eclipse will continue to employ its internal Maven instance in order to perform some tasks.
When you "Run As > maven install" it will run your pom.xml script employing the external Maven instance you specified but when Eclipse performs some of its internal stuff, it will continue to use the embedded Maven instance, whatever version it is.
(edited)
As far as I know, when you install M2Eclipse you are implicitly defining which "internal Maven instance" you will have, which is exactly that one packaged by the plugin.
In the plugin configuration, you can add external Maven instances by telling where they are installed.
If you are using a recent m2eclipse version, you can try this too:
<prerequisites>
<maven>>=2.2.1</maven>
</prerequisites>
Notice the greater than in >=2.2.1. It works fine for me.
A common source of trouble (of this kind) is if you change global preferences and don't remember or know that you have enabled some project specific settings. At least it's a chance that the global setting is now set to use the external maven but the project setting is still set to 'embedded'.
M2Eclipse uses an embedded maven instance, not the maven instance you have installed on your system.
Have you tried switching workspaces?
You can still reference the same project in the new workspace. This would provide about as much of a reset as you can do in terms of eclipses internal settings.
Try creating your eclipse project with mvn project:m2eclipse or use the maven import option under import project.
Using m2eclipse, my fallback in these situations is to do Maven > Update Dependencies and then Maven > Update Project Configuration. The first is just me being supersticious, but the second will rewrite .project and .classpath.
As Pascal says about, m2eclipse can also be pointed at an external instance. I've done this in the past, though not at 2.2.1.
Dan
I got the same issue. Resolved it by restarting the system because every time you change the 'Path' in environment variables you should restart the system or else if would not pick the changes.