Just enter the proper coordinate and it should download.
I have noticed that the search function in Eclipse doesn't always find everything, the indexing capabilities of m2e are not that good. But if you know the coordinates, then you can always enter them manually.
i added the above jar file for my Webdriver API's i used. But i do not understand why i am getting the error in pom.xml file
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
i got the error as soon as i edited the pom.xml file as above
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 344
posted
0
Linda
People won't be able to help you unless you give specific error details. What is the error you receive?
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
Its not a specific error. Eclipse shows that pom.xml file has error saying that there is a spelling mistake in few words in the pom.xml even though there is none.
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 344
posted
0
Linda
What happens when you run a build using Maven?
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
i am getting a error with the following jar file now.
how can i correct it?
the previous jar file was taken properly.
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
following is the error trace when i do maven install from eclipse. its not able to find that jar!!!
what is the workaround ??
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 344
posted
0
Linda
Re-run the install build, thus time with the 'Force Updates' option checked (or -U on the command line if you prefer)
Try opening the JAR file using the jar utility. Here is an example:
jar -tf C:\Users\prasanna\.m2\repository\com\google\guava\guava\10.0.1\guava-10.0.1.jar
If that is not successful, then the JARs are corrupt. Delete the entire directory containing the artifacts. For example, for the guava JAR, delete C:\Users\prasanna\.m2\repository\com\google\guava\.
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
how can i put the dependency for ScreenRecorder.jar in maven?
I used Jarfinder (http://www.jarfinder.com/index.php/java) to look up that class. Jarfinder knows about almost all open source classes. It could not find this class. Unless the owner of the JAR file that contains this class provides instructions on how to access the JAR via a Maven dependency, you will either have to import the JAR into your local Maven repository or deploy the JAR file to Nexus (or some other remote repository server). In my environment, we always do the latter. Oh, look in the JAR and see if there is a META-INF/maven directory; if there is, and you go to the subdirectories you will see the pom.xml which will give you the details about the artifact.
When we do this, we generally use the common package name for all classes in the JAR as the groupId (in your case, this might be "ch.randelshofer.screenrecorder"), and the JAR file name (minus the extension) as the artifactId. We also look at the META-INF/MANIFEST.MF file to see if it contains any version info. If it doesn't, we use the timestamp on the class files as the artifact's version.
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
Thank you so much for this important information.. :-)
linda russel
Ranch Hand
Joined: Jan 05, 2012
Posts: 73
posted
0
I added a Settings.xml file and changed the control to local repository after adding the ScreenRecorder.jar . It worked. Thanks a lot for all your help
subject: how do i add a jar file externally as a maven dependency in eclipse?