Take the 2-minute tour ×

I have the following dependency in my pom.xml


I also have the anArtifact-aVersion.jar file in ~/.m2/repository/aGroup/anArtifact/aVersion directory.

When I start building the project, maven looks for a .pom file instead of using the .jar file and attempts to download the following


How can I configure maven to use the existing .jar file?

share|improve this question
Did you put that jar in your local repository (~/.m2/repository)? Or did Maven download it? –  Daniel Oct 17 '11 at 14:57
add comment

4 Answers

up vote 4 down vote accepted

Every jar needs to have a pom file describing it, you can just add something simple like this:

    <name>a Name</name>
share|improve this answer
Does it mean that in the repository there should be this kind of ".pom" file next to jar while there are already files pom.xml and plugin.xml inside the jar file itself? Should it be a copy of one of those? –  Dima Oct 17 '12 at 14:34
yes the pom needs to be there and yes I can be just a copy of an included pom. Local repositories like artifactory actually just extract an included pom if you upload a jar. –  HefferWolf Oct 19 '12 at 8:46
add comment

Run your build using the "-o" switch to use Maven in offline mode. In offline mode, Maven will not check for updates of snapshot dependencies in remote repositories.

share|improve this answer
add comment

the best way to install an artifact to the local repository which were not built by Maven ist to use

mvn install:install-file ...

have a look at the install:install goal.

share|improve this answer
add comment

It is looking for the pom to, among other things, resolve the transitive dependencies.

share|improve this answer
add comment

Your Answer


