Maven Build with Eclipse

I have found that the best way to run maven from inside eclipse is to create only one external tool named “Maven” and use the project_loc variable to specify the working directory in which maven will run. 
Here is a step-by-step guide:

1. Run > External Tools > External Tools…
2. Right click on “Program” and select “New”
3. For “Name”, type “Maven”.
4. For “Location”, click “Browse File System…” and find the maven.bat file
5. For “Working Directory”, click “Variables” and select “project_loc”.
6. Now you can run Maven by simply clicking the external tools button and it will build the project you are currently working on using maven.

Also, maven will create and delete the target folders as needed.  Eclipse also needs a place to put files that it builds.  I suggest that all of the eclipse built files be put in a folder named “.output” in the root of the project folder. 
For example:

1. Set “Flex Build Path” > “Output Folder” to “.output/flex2”
2. Set “Java Build Path” > “Output Folder” to “<eclipse project name>/.output/java/classes”.