I finally figured out a how to use Maven. From within Eclipse, create a new Maven project.
Download Maven, extract the archive, add the /bin
folder to path.
Validate install from command-line by running mvn -v
(will print version and java install path)
Change to the project root folder (where pom.xml
is located) and run:
mvn dependency:copy-dependencies
All jar-files are downloaded to /target/dependency
.
To set another output directory:
mvn dependency:copy-dependencies -DoutputDirectory="c:\temp"
Now it's possible to re-use this Maven-project for all dependency downloads by altering the pom.xml
Add jars to java project by build path -> configure build path -> libraries -> add JARs..