Maven works but eclipse error - eclipse

I created a maven project from the command-line interface. Configured the dependencies with my other maven projects. Now when I run my project, it works without any problem using the following maven command:
$ mvn clean
$ mvn install
$ mvn exec:java
Hello world!
Then, I use the following maven command to have my eclipse project files.
$ mvn eclipse:eclipse
I go and open my project using Eclipse Kepler, however as you can see there is a exclamation point on my project and it does not run from eclipse.
The problem is I do not know how to find the error on eclipse..

Related

Eclipse can't find a class on my classpath

The project is a maven project.
run as maven install works
mvn install works
I have tried mvn eclipse:eclipse to update project, I can see the jar file in my properties order and export
I have closed and reopened the project
I have deleted and re added the project
I have done a refresh
I have done a maven update project
I have cleaned the project
maven disable maven nature and then configure convert to maven project
It builds just fine from:
The command line:
mvn install
In eclipse run as maven install
It works in intellij idea
For the love of all that is holy...
There was a class of the same name in this project with all lines commented out.
Deleting that source file fixed the problem.

Eclipse maven install pass argument

I want to use mvn clean install -P build-modules-test -Dmaven.test.skip=true in Eclipse. I have the m2e plugin for eclipse. I have found the "Run as --> Maven install" button, but I do not know how to pass the remaining arguments (-P build-modules-test -Dmaven.test.skip=true) to eclipse. In Run configurations I only see the Maven build node, but not the Maven install node:

Eclipse Maven: Run configuration - Start two servers

I am trying to use the gwt-maven-archetype from here and now after I imported the project I'd like Eclipse Maven to run:
mvn gwt:codeserver -pl *-client -am to start the codeserver and
mvn tomcat7:run -pl *-server -am -Denv=dev to run tomcat server
How can I tell Eclipse to do that for me?
Best regards.
You could establish an extra "run" project and use the exec-maven-plugin in it's POM.

Maven2 + Eclipse 3.5 web Project Errors

I'm using Maven 2.2 to build Simple Web Project and Integrate it to Eclipse:
I'm doing it the following way:
1) Going to my workspace directory using command line:
2) Create Project using the following command:
mvn archetype:generate -DgroupId=com.vanilla.test -DartifactId=myTest -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
3) Convert this project to Eclipse project:
cd myTest
mvn eclipse:eclipse -Dwtpversion=R7
When I import then project to Eclispe I have red 'x' on the project name. Although, I tried to Clean project, to refresh it or run index.jsp, I can't fix it.
No any other problems with the project.
Why does it happen?
Perhaps you should configure the workspace before converting to Eclipse project.
mvn eclipse:configure-workspace -Declipse.workspace=<path-of-your-workspace>

SNAPSHOT Artifacts not visible in eclipse after mvn install

from proj-a folder: run mvn install proj-a
from proj-b folder: (proj-b depends on proj-a) run mvn clean eclipse:clean eclipse:eclipse
refresh proj-b in eclipse.
jars that proj-a depends on are in the proj-b classpath, but proj-a-0.0.1-SNAPSHOT.jar is missing. proj-a-0.0.1-SNAPSHOT.jar is in the local repository.
run mvn deploy for proj-a
delete proj-a folder from local repository
run mvn eclipse:eclipse from proj-b folder - all jars are visible.
what can cause this problem? all artifacts should be available right after install operation. mvn does not complains about nothing....
thanks.
For me handling maven projects in eclipse becomes easier using m2eclipse. After you have installed the plugin, right click on your project > Maven > Enable Dependency Management so that it becomes a maven eclipse project. Then, given you have run your mvn install and you can see your SNAPSHOT jar in your local repository, right click on your maven project > Maven > Update Snapshots or in general Maven > Update Dependencies.