You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jan Torben Heuer <jt...@mail2003.dnsalias.org> on 2008/03/07 12:03:49 UTC

Failed to resolve artifact - jar of pomfile

Hi,

I have a project with a dependency to a pom file:

But maven always want to download the corresponding jar-file - although
<packaging>pom</.. is specified in dependency's pom-file.

How does maven determine if it is a pom or jar (or war) or whatever? Could
the metadata.xml be wrong?


Here the details:
<dependency>
        <groupId>org.openrdf.elmo</groupId>
        <artifactId>elmo</artifactId>
        <version>1.0-SNAPSHOT</version>
</dependency>

Repository:
http://repo.aduna-software.org/maven2/snapshots/org/openrdf/elmo/elmo/1.0-SNAPSHOT/

metadata:
<?xml version="1.0" encoding="UTF-8"?>

<metadata>
  <groupId>org.openrdf.elmo</groupId>
  <artifactId>elmo</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <buildNumber>0</buildNumber>
    </snapshot>
    <lastUpdated>20080303184953</lastUpdated>
  </versioning>
</metadata>



Any ideas? I could specify <type>pom</type> in the dependency, but then the
problem occurs with transitive dependencies...

Jan


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


Re: Failed to resolve artifact - jar of pomfile

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Jan Torben Heuer schrieb:
> Hi,
>
> I have a project with a dependency to a pom file:
>
> But maven always want to download the corresponding jar-file - although
> <packaging>pom</.. is specified in dependency's pom-file.
>
> How does maven determine if it is a pom or jar (or war) or whatever? Could
> the metadata.xml be wrong?
>
>
> Here the details:
> <dependency>
>         <groupId>org.openrdf.elmo</groupId>
>         <artifactId>elmo</artifactId>
>         <version>1.0-SNAPSHOT</version>
> </dependency>
>
> Repository:
> http://repo.aduna-software.org/maven2/snapshots/org/openrdf/elmo/elmo/1.0-SNAPSHOT/
>
> metadata:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <metadata>
>   <groupId>org.openrdf.elmo</groupId>
>   <artifactId>elmo</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <buildNumber>0</buildNumber>
>     </snapshot>
>     <lastUpdated>20080303184953</lastUpdated>
>   </versioning>
> </metadata>
>
>
>
> Any ideas? I could specify <type>pom</type> in the dependency, but then the
> problem occurs with transitive dependencies...
>
>   
<quote>problem occurs with transitive dependencies</quote>

What transitive dependencies? Your elmo.pom file doesn't declare any
dependencies.

It does declare some dependencyManagement stuff, but as far as I know,
dependencyManagement only has effects within a pom and its children, and
is ignored when in a pom that is a *dependency*.

Regards,
Simon


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


Re: Failed to resolve artifact - jar of pomfile

Posted by Stuart McCulloch <st...@jayway.net>.
On 07/03/2008, Jan Torben Heuer <jt...@mail2003.dnsalias.org> wrote:
>
> Hi,
>
> I have a project with a dependency to a pom file:
>
> But maven always want to download the corresponding jar-file - although
> <packaging>pom</.. is specified in dependency's pom-file.
>
> How does maven determine if it is a pom or jar (or war) or whatever? Could
> the metadata.xml be wrong?
>
>
> Here the details:
> <dependency>
>         <groupId>org.openrdf.elmo</groupId>
>         <artifactId>elmo</artifactId>
>         <version>1.0-SNAPSHOT</version>
> </dependency>


afaik maven assumes the type of the dependency is jar unless you specify
otherwise
so you would need to use <type>pom</type> to add a dependency to a pom
project

Repository:
>
> http://repo.aduna-software.org/maven2/snapshots/org/openrdf/elmo/elmo/1.0-SNAPSHOT/
>
> metadata:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <metadata>
>   <groupId>org.openrdf.elmo</groupId>
>   <artifactId>elmo</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <versioning>
>     <snapshot>
>       <buildNumber>0</buildNumber>
>     </snapshot>
>     <lastUpdated>20080303184953</lastUpdated>
>   </versioning>
> </metadata>
>
>
>
> Any ideas? I could specify <type>pom</type> in the dependency, but then
> the
> problem occurs with transitive dependencies...


if so then they also need to be updated to use the correct <type> in their
dependencies

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


-- 
Cheers, Stuart