Failed to create Maven Project in eclipse - eclipse

I added maven plugin in my eclipse .. but still can't create Maven project (doesn't exist in new project ) and i can't find it also in window -> preferences .. can any one tell me what's wrong please !?

May be Maven Integration (m2e) plugin not installed properly(check the eclipse version & try to install suitable plugin).
Alternately you could create maven project via command,
For core java project,
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
For Webapplication,
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Kindly refer the below link:
http://www.mkyong.com/tutorials/maven-tutorials/

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.

How to build maven spark project (Scala), then import and config eclipse

I have cloned this project: https://github.com/sryza/aas
and built successful with maven ( pom.xml)
I then import to Eclipse oxygen ( scala IDE plug in), open and run the file "main.scala", and had an error: not found the main class though I had tried to run as configuration with scala nature. Which step i missed?
In general how can i config eclipse to switch with Java, Scala, and python(install PyDev)
Thanks for your help
You can try the following:
1 When you clone the project use: mvn eclipse:eclipse so you can import it in eclipse.
2 Run mvn clean install to see if the project is building
Witch Eclipse IDE for Java EE Developers you should be able to run it

gwt - Error when importing a gwt project using Maven import in Eclipse

I am using Eclipse, Version: Indigo Service Release 1.
My GWT version is 2.4.0. I installed everything like GWT and Maven related plugins.
I am trying to import a existing gwt-maven project. When importing, I see this dialog:
Can anyone tell me why and how to solve it?
Google is your dear friend.
By entering "no marketplace entries found to handle gwt-mavn-plugin", I got:
Error when importing Maven-GWT project ("No marketplace entries found to handle gwt-maven-plugin")
gwt-maven-plugin with Eclipse Indigo
Eclipse: Import Maven project, missing maven-gae-plugin
EDIT :
Actually I would advise you to use maven from the command line instead of using the Maven plugin in Eclipse as I had exprienced many issues with it.
From the command line, run the following commands:
To compile and install : mvn clean install
to generate eclipse project: mvn eclipse:eclipse
Afterwards, from your eclipse, import your generated project as a normal project and voila!
Hope this helps!

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.