How can I use a installed version of Maven with eclipse - maven

I have downloaded Apache-Maven-3.0.4 in zip format and extracted to a directory called My Documents\Software.I have set Path variable to point to the Maven\bin directory.Now when I am checking from command prompt mvn command is working only inside Maven\bin directory.
I want to use Maven with eclipse.Do I have to download eclipse m2e plugin separately or can I make use of the already installed Maven-3.0.4. If I install eclipse m2e plugin where can I find installed m2e plugin ?
In which directory should I put my project to mvn package command to work?
This may sound silly,but I am new to Maven.Please help.

Go to window->preference->maven->installation.
click on Add. Here, you can specify external maven installation, rather internal.
But you need to install m2e plug-in for this.

are you using my eclipse or simple eclipse???
there is an option when u right click on project to add maven capabilities
look at this tutorial...find configure option on right click
link
Regards
Anshul Katta

Related

Installing Gradle manually on Intellij

How do I install downloaded Gradle for Windows OS on Intellij? I've tried to unzip the folder then copying it in a Gradle folder I created on Local Disk C, I've also added the path in the Enviroment Variables but still not working.
If you want to create a new project follow these steps:
Launch IntelliJ and select the "New project" option, you should see Gradle appearing on the left hand side option bar
Specify the JDK and maybe some Frameworks

How to check maven installed in Drools machine

I have installed Drools in my machine and we have m2 repository in our linux machine. Does that mean maven installed in my machine.
If type mvn -v its saying command not found.
I am new to this maven. Kindly help me out
Drools is a library. It does not "install". You add it as a dependency to a Java project. If you "installed" something, it's not Drools. Perhaps it's jBPM or some other application which uses Drools.
Maven is a toolchain. When you install it, the zip file includes a binary that you need to put on your path. That binary (mvn) allows you to run from the commandline.
The two are not related in any way.
If you get an error when trying to run mvn -v that the command is not recognized, that means that the Maven binary is not on your path. Find where you installed Maven, locate the 'bin' directory in that installation, and add that bin directory to your Path environment variable.
If you did not install Maven, and therefore don't have an install directory, you probably want to go do that. Don't forget to put the bin directory on your path after installing.
(A less common way of using Maven involves packaging a mvn.cmd or mvn.sh script with your project itself so that you don't need to have Maven installed globally. If this is what you're doing instead, you need to run the mvn command from the same directory as that script.)

Install m2e in eclipse without install maven in system

I recently try to use maven in my eclipse project. In maven official website there are several step that I must to accomplish to configure maven side by side with eclipse. But I know there is a m2eclipse plugins if I need to use maven. But I don't know if I can use this plugins with maven installed in system or not.
So can I use this plugins without maven been installed in system or not ?
The m2e plugin brings a copy of Maven 3.0.4 and installs it inside of Eclipse so the plugin can use it. This is enough to build Maven projects inside of Eclipse. No external installation is needed.
You must start Eclipse with a JDK, though. A JRE isn't enough. If you're unsure: Look for the file lib/tools.jar. When it's there: You're good.
This copy isn't accessible from the command line. If you want to build from the command line as well or if you need a newer version of Maven than 3.0, you need to install Maven and configure the plugin accordingly.

IntelliJ cannot find Maven M2_HOME environment variable

I'm trying to make my first step with Maven system. But I cannot understand if I should install it separately or if it comes built-in with IntelliJ 13 Community Edition? My system is Windows 7.
Maven does not come bundled with Intellij. You need to install the version of Maven you'd like to use on your computer.
Intellij has a Maven plugin, which requires that you either set M2_HOME or supply it with the location of your Maven install.
First you should it install it separately cause you will need it on command line. Furthermore it's best to understand maven on command line first and than make the integration step into Maven with an IDE of your choice.

Maven location (when installed indirectly with Netbeans/Glassfish)?

Where is the maven home directory when you install Netbeans with Glassfish? I have searched for 'mvn' in the Program Files directory and my user directory in Windows 7 but it turns up nothing.
In the Maven settings in Netbeans for 'Maven Home' it says 'Bundled' which isn't much use to me, I need the actual path to maven.
First install maven separately (and verify it by running mvn command line) and then open netbeans and navigate to Tools -> Options -> Java -> Maven (I guess you already know that but just in case) and change the 'Maven Home' path to the directory where maven is installed.
The Bundled maven could generally be found at NetBeans_install_directory/java/maven.
Example For Mac:
/Applications/NetBeans 8.2.app/Contents/Resources/NetBeans/java/maven/
Example For Windows:
C:/Program Files/Netbeans 8.2/java/maven/
Not sure what version you downloaded back then, but with version 7.3, maven is found here:
C:\Program Files (x86)\NetBeans 7.3\java\maven\
In Mac OS it is in
/Applications/NetBeans/NetBeans 8.0.2.app/Contents/Resources/NetBeans/java/maven/bin
I know its an old question but still there's also another way of seeing where mvn is installed on your Netbeans.
When you clean and build your project you can see in the console output the location of maven used. See the red circle in the screenshot /home/<user>/netbeans-8.2/java/maven/bin/mvn
The maven bundled with NetBeans located at
% NetBeans Installation Location %\java\maven
Eg: C:\Program Files\NetBeans 8.2\java\maven\bin

Resources