I know it is an old question now, but for users who are using Maven plugin with Eclipse under Windows, you have two options:
If you got Maven installed as a standalone application:
You can use the following command in the CMD under your project
path:
mvn eclipse:eclipse
It will update your repository with all the missing jars, according
to your dependencies in your pom.xml file.
If you haven't got Maven installed as a standalone application you
can follow these steps on your eclipse:
Right click on the project ->Run As -- >Run configurations.
Then select mavenBuild.
Then click new button to create a configuration of the selected
type .Click on Browse workspace then select your project and in
goals specify eclipse:eclipse
You can use mvn compile to download compile time dependencies or mvn test for compile time and test dependencies but I prefer something that always works.
I know it is an old question now, but for users who are using
Maven
plugin withEclipse
underWindows
, you have two options:If you got Maven installed as a standalone application:
You can use the following command in the
CMD
under your project path:It will update your repository with all the missing jars, according to your dependencies in your
pom.xml
file.If you haven't got Maven installed as a standalone application you can follow these steps on your eclipse:
Right click on the
project
->Run As
-- >Run configurations
.Then select
mavenBuild
.Then click
new
button to create a configuration of the selected type .Click on Browse workspace then select your project and in goals specifyeclipse:eclipse
You can refer to how to run the command mvn eclipse:eclipse for further details.
Right, click on the project. Go to Maven -> Update Project.
The dependencies will automatically be installed.
mvn install
(ormvn package
) will always work.You can use
mvn compile
to download compile time dependencies ormvn test
for compile time and test dependencies but I prefer something that always works.If you want to only download dependencies without doing anything else, then it's:
Or to download a single dependency:
If you need to download from a specific repository, you can specify that with
-DrepoUrl=...