Maven/Eclipse – Adding New Jar

Adding a new jar to a maven/eclipse project:

  • Say you want the latest Rhino JavaScript jar (js-1.6R7.jar).
  • Notice that the “POM Dependency” section of the artifact page shows you exactly what you need to copy & paste into your project’s pom.xml file.
POM Dependency
  • Once you have updated your pom, execute the following maven command to bring the jar, and optionally the source, into your eclipse project.
C:\project\workspace\project> mvn -DdownloadSources=true eclipse:eclipse

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply