I am new to Maven and so maybe I am misunderstanding this but the dependencies are in reference to your project, correct?
Because I created a new project and included Maven support and then I want to use log4j in my app so I thought I need to do it through Maven, I right click the pom.xml and under MyElcipse4Maven I choose Add Dependency. In the window I search for “log4j” and find an entry simply labeled “log4j” with latest version 1.2.16.
I pick it and close the dialog and then the Maven build updates itself automatically but quickly outputs an error:
5/3/11 4:43:27 PM EDT: Missing artifact log4j:log4j:bundle:1.2.16:compile
If I right-click the pom.xml and choose Run As… Maven install then it throws this error:
[ERROR] Failed to execute goal on project myapp: Missing:
----------
1) log4j:log4j:bundle:1.2.16
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=log4j -DartifactId=log4j -Dversion=1.2.16 -Dpackaging=bundle -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=log4j -DartifactId=log4j -Dversion=1.2.16 -Dpackaging=bundle -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.mycompany:myapp:pom:pom:0.0.1
2) log4j:log4j:bundle:1.2.16
So whats the point of this dependency thing?
It cant even find something as widespread as log4j?