You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Kapil Gupta(CT)" <ka...@quark.com> on 2006/07/29 13:09:13 UTC

Dependencies not getting resolved even after install

Hi,

I have installed my thirdparty jar files in maven local repository using
install:install-file goal. 

While compiling my module, I receive following errors

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Error building POM (may not be this project's POM).

 

 

Project ID: commons-logging:commons-logging-api

 

Reason: Error getting POM for 'commons-logging:commons-logging-api' from
the repository: Error transferring file

  commons-logging:commons-logging-api:pom:1.1 from the specified remote
repositories:  central (http://repo1.maven.org/maven2)

 

The error goes if I Install my jar using -DgeneratePom=true

 

As per the documentation, generatedPom flag is optional then why I have
to install jars using this flag?

 

Thanks,

Kapil


Re: Dependencies not getting resolved even after install

Posted by Wayne Fay <wa...@gmail.com>.
Maven uses poms to tell it information about an artifact -- its
version, dependencies, etc. So Maven "always" needs a pom for all
artifacts.

Installing a third-party artifact with install-file will *only* copy
the jar file to the proper directory in your local Maven repo. Then
when you run Maven the next time and reference that jar, Maven will
look at the poms in its local repo, see that it does not have a pom
for the artifact, and go out to the Internet to find it. It does this
*before* it even looks to see if it has the jar in its repo. Only once
it resolves all the poms for all direct and transitional dependencies
does Maven start looking at the jars themselves in the repo, to decide
what else needs to be downloaded etc.

Thus, when installing third-party artifacts, you should use
generatePom unless you already have a pom for the artifact which you
will copy to the local repo. Maven will generate an "empty" pom for
the file and it will not bother looking out on the Internet for it the
next time you reference the artifact.

Finally, I have to wonder why you're installing commons-logging-api
manually into your local repo. Isn't that already available in the
Central repo? (Perhaps not version 1.1, I don't know...)

Wayne

On 7/29/06, Kapil Gupta(CT) <ka...@quark.com> wrote:
> Hi,
>
> I have installed my thirdparty jar files in maven local repository using
> install:install-file goal.
>
> While compiling my module, I receive following errors
>
> [ERROR] BUILD ERROR
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Error building POM (may not be this project's POM).
>
>
>
>
>
> Project ID: commons-logging:commons-logging-api
>
>
>
> Reason: Error getting POM for 'commons-logging:commons-logging-api' from
> the repository: Error transferring file
>
>  commons-logging:commons-logging-api:pom:1.1 from the specified remote
> repositories:  central (http://repo1.maven.org/maven2)
>
>
>
> The error goes if I Install my jar using -DgeneratePom=true
>
>
>
> As per the documentation, generatedPom flag is optional then why I have
> to install jars using this flag?
>
>
>
> Thanks,
>
> Kapil
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org