why do i have to manually download the jars in maven2 repository when m2e already downloaded the pom and sha1 - eclipse

I've installed elcipse 3.6.2 and m2e plugin
M2E - Maven Integration for Eclipse (Incubation) 0.13.0.201105261543 org.eclipse.m2e.feature.feature.group.
I have imported an existing maven pom project. I right clicked on the project then went to
Debug As > Maven Install.
It downloads most of the things but leaves out a lot of jar even though it's corresponding .pom and .sha2 are downloaded. So it leaves me with error messages like missing .jar.
So i had to download it manually from the ibiblio site.
Is there something wrong with my configuration?
BTW, the imported projects are from jetty 8.0.3M.
I don't think their pom needs changing.
I suppose it's in the eclipse/m2e plugin config?

This has worked for me almost always:
Delete your .pom and .sha2 files for the jar that is missing.
From Eclipse run the menu command "Update All Maven Dependencies" under Project.
This seems to download what is missing.
Hope that helps.

Related

how to add ojdbc14.jar to maven project in eclipse

How can I add the ojdbc14.jar file to a maven project in eclipse? In other posts, there is a mention of a installing the jar into the local repository. However, I cannot install maven on this machine and eclipse is the only way in.
Thanks.

How to add Maven dependencies in Eclipse libaries

Can any one explain how to add Maven dependency JAR i.e. build path libraries? To be very specific how to include JAR file mentioned in pom.xml to Java build path? Maven dependencies - unable to see jars over here.
Don't have a option to update Maven dependencies. Also executed the script mvn eclipse:eclipse, seen on StackOverflow.
Generally, you should not have any need to deal with such a task manually. Here is the correct procedure for importing of maven project to your Eclipse IDE:
Make sure you have m2eclipse plugin installed (Maven support for Eclipse). As far I remember it is included to Eclipse IDE for JEE developers by default.
Checkout your maven project to any directory
From this directory (root pom.xml is located in), run: mvn eclipse:eclipse
Go to Eclipse, File -> Import, select "Existing maven project"
Select directory where your root pom.xml is located, Eclipse should find all maven modules.
Optional: if eclipse will tell you that it can't recognize some maven plugins - ignore this, just continue.
If you follow this instruction, IDE will create all maven modules as eclipse projects and you will have an option to update maven dependencies and also willsee all of them rigth in IDE.

How to add missing jars in Eclipse Maven based project

I am new to maven with eclipse. I am using m2e plugin(version 1.2.0).
i have imported maven project, it is showing build path errors due to some jars are missing.
How to add those jars to the build path. Do i need to download manually and add to the eclipse build.
i am learning about pom.xml, please help me.
you should add dependency of missing jar into pom.xml file.
As soon as you add them , eclipse will automatically download those jar files for you.
You can easily find maven dependencies on google.

How to deploy a maven project in tomcat within Eclipse

I have been trying to deploy a project that I created within eclipse but when I right click on the tomcat server and click "Add and Remove...", I got the message "There are no resources that can be added or removed from the server".
From what I understand it has something to do with the facets? I am not really sure to understand what is going wrong here.
Here is what I did for know:
I created a Maven project.
executed mvn eclipse:eclipse through the command line on the folder of the project
installed m2e
tried to add the project to the tomcat server
You probably want to use either mvn eclipse:eclipse OR m2e, but not both. m2e has gotten MUCH better in the last couple years, so that's what I would suggest.
Make sure you are using Eclipse for Java EE, otherwise you will need to install other plugins like WTP
Install m2e.
Install maven integration for wtp (from the eclipse marketplace)
make sure the artifact type for your project is war
Import Existing Maven Project in eclipse and browse to your pom to import the project.
It should give the correct facets to your project so it looks like a web project.

How can I add a classpath entry as a publish/export dependency in an Eclipse dynamic web project?

I successfully created a project using Wicket quickstart and turned it into an Eclipse dynamic web project by running
mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0
I imported the project to Eclipse without any issues, but got this warning for each JAR:
Classpath entry M2_REPO/**.jar will not be exported or published.
Runtime ClassNotFoundExceptions may result.
I can fix this by using right click → QuickFix on each warning and selecting "Mark the associated raw classpath entry as a publish/export dependency," but this takes a lot of time and would not be possible if there were a lot of dependencies.
There must be a way to have Maven do this for me; what is it?
EDIT: I've found out that using m2eclipse core + Maven Integration for WTP (from m2eclipse extras) resolves my issues.
I'm still interested in how to achieve this without m2eclipse, though, just out of curiosity :p
The two Maven plugins needed to work with web projects in Eclipse are available from the Eclipse Marketplace.
Maven Integration for Eclipse (included in the Java version of Eclipse)
Maven Integration for Eclipse WTP