Maven run works in command line not in Eclipse - eclipse

Created Maven project from Elcipse Orxygen 2.
Using jetty server and trying to display just the index jsp on localhost link.
Compiled from command prompt + run from command prompt -> works.
Compiled from Eclipse + run from command prompt -> works
Compiled from Eclipse + run from Eclipse -> doesn't work.
Console and Maven console does not display any warning and also does not display Info messages (this problems is for all other projects too).

I did not have all the m2e software. Installed me2 wtp and the issue has been resolved.

Related

mvn command not found in eclipse but works on terminal

mvn command not found in eclipse but works on mac terminal.
Where do I have to setup Path to Maven for eclipse. Tried articles from google but no luck.
Eclipse includes an embedded version of maven. I suggest not to use it, but refer to the installed version in your environment. From eclipse -> windows -> preferences -> Maven -> Installations -> add: insert the path of your installed maven. Flag it. (not the embedded!).Then you can go to Maven -> User settings and enter the path to the settings.xml of your installed maven.
Then you can right click on the project -> maven -> update project or run as -> maven .. to execute tasks using the same maven installation of the terminal.

Maven command prompt run tomcat debug mode (Eclipse)

I have got a Java web application project what use Maven, Spring, Tomcat, and so on.
I use Eclipse Mars and I can import the project but I cannot run it under Eclipse because there are some plug-ins which I cannot find. But I can compile the project with mvn compile command and I can run my project with mvn tomcat7:run command.
I want to run the project in debug mode but I don't know how to run the project in debug mode from command prompt. I know that there is an mvnDebug command but if I put a breakpoint anywhere in my source (naturally somewhere in Java file) code in Eclipse, it stops when the process reach the breakpoint.
If you have m2e eclipse, go to Debug Configuration > Goals : mvn tomcat7:run > Apply > Debug

How do I run an eclipse project without eclipse?

I want to send my project I made in eclipse to others, so I tried running the project in my workspace. But I don't have a software to run it.(besides eclipse) What software should I use?
I don't have a software to run it.(besides eclipse) What software should I use?
You should use Java. Eclipse is just an IDE, so it doesn't run your Java programs. Java does. Export your program as a JAR, and if you have Java installed, you can run the JAR by double-clicking on it, or by running it from the command line:
java -jar file.jar
First Step
Second Step
Third step
voilà!

How to get access to (embedded in) Maven console in Eclipse?

Is possible to access Maven (embedded) console in Eclipse like in shell (linux shell, windows cmd.exe) to run custom maven commands (mvn archetype:create.... etc) ? I'm using m2e, but can run Maven commands only by GUI.
You can run custom maven commands directly from Eclipse by doing:
Run -> Run Configurations... -> Maven Build
You'll need just some Maven plugin for Eclipse like m2e.
maybe you can use "external tools" function to do it.
see:
In Eclipse, choose “Run -> External Tools -> External Tools Configurations
In "Program", click “New Launch Configuration”
Config your console name, location, working directory
"run"
sorry for no images, because my reputation is below 10.
I highly recommend shell plugin for Eclipse: Wicked shell (http://www.wickedshell.net/)
Sadly I don't know about any Eclipse plugin to do that :(
A long time ago (in the Maven 1 era) there was a Maven goal called "console" that allowed you to execute goals in a pre-loaded maven instance. But that feature was discontinued in Maven 2.
For new versions of Maven (Maven 3), the folks at Sonatype made a Maven Shell which I think will do what you want: http://shell.sonatype.org/index.html

Where is mvn.exe when using embedded maven 3 in eclipse indigo?

I'm using the Indigo Release of eclipse. When I check Window -> Preferences, Maven -> Installations, it confirms that it's using the Embedded (3.0.2/...) installation of Maven.
I want to be able to run maven commands from the command line (Windows Powershell), but when I type, e.g.,
PS C:\> mvn
no executable is found. I did a search for "mvn.exe" and found no results.
I suppose I could install a stand-alone version of Maven 3 and add that to my PATH, but I'd prefer to be using the same Maven installation for command line tasks as well as IDE (eclipse) tasks.
So, where is the embedded maven's mvn.exe hiding?
The simple answer is, cause it's embedded in Eclipse so you can't call it from console. If you like to do this you have to install Maven yourself.
There is no mvn.exe at all. The Maven distro comes with batch or shell scripts. Eclipse runs an embedded version which is called through an API.
remember, embedded maven is not configured to work out of eclipse environment (and terminal usage is out of STS usage).
we have to install maven.
and also note, there is no "mvn.exe"
follow the following to setup maven to work from terminal.
maven download link is here
download latest maven from here
extract it where ever you want.
i extracted as below (see the bin,boot,conf,... folders are shown below as in the image):
as this maven download is extracted from zip file (it is not setup), you will have to add this extracted path to "PATH" variable in windows environment.
follow this to set environment path:
now "mvn" command must work.
in my case, i use STS (spring tool suite)
and i had to restart STS for "mvn" to work in terminal in sts.
check it out with eclipse.