maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Letrouit <julien.letro...@gmail.com>
Subject Re: Re: Maven can not fetch dependencies of type "POM"
Date Mon, 07 Feb 2011 14:19:32 GMT
> I have to admit that I'm lost as to what exactly you're trying to do
> but I've added a few comments below.

Thanks for your answer and sorry for the confusion. I understand that
Maven is not telephatic, but it could download the pom file, look at
the packaging, and know from there how to treat the dependency
(whether to download the .jar or just look at dependencies
transitively).

That way, if for some reasons (for example, splitting a jar) some
projects are deciding to switch from <packaging>jar</packaging> to
<packaging>pom</packaging>, all the projects depending on them would
need no modification in their own pom file (they would not need to add
<type>pom</type>).

That said, for my particular case, I am trying to use:

http://www.scalablesolutions.se/akka/repository/se/scalablesolutions/akka=
/akka-persistence-mongo/1.0-RC3/akka-persistence-mongo-1.0-RC3.pom


and no, com.mongodb.casbah:casbah_2.8.1 is not a jar, it is a pom,
there is no jar for

com.mongodb.casbah:casbah_2.8.1

So looking at your answer, I guess I should ask the owners of

akka-persistence-mongo-1.0-RC3 to modify their pom file?



>>
http://www.scalablesolutions.se/akka/repository/se/scalablesolutions/akka=
/akka-persistence-mongo/1.0-RC3/akka-persistence-mongo-1.0-RC3.pom
>>
>> is referencing:
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0<dependency>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0<groupId>com.mongodb.casbah</gro=
upId>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0<artifactId>casbah_2.8.1</artifa=
ctId>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<version>2.0.1</version>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<scope>compile</scope>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0</dependency>
>>
>> without specifying the type. Which means I can't reference
>> akka-persistence-mongo, because I will get a similar error.
>> Is not maven supposed to look at the POM file for the type instead of
>> assuming a default of "jar"?
>
>Maven isn't telepathic. How is it to know exactly which artifact
(.jar, -sources.jar, -javadoc.jar, .war, .pom, etcetera) you want?




2011/2/4 Julien Letrouit <julien.letrouit@gmail.com>:
>   Hi,
>
>   I am pretty new to maven, so this is probably a silly question.
>  My problem is I can't fetch any dependencies of type "POM".
>   For example, if I try to compile:
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>test.pom</groupId>
>     <artifactId>some-pom</artifactId>
>     <version>1.0-SNAPSHOT</version>
>
>     <dependencies>
>         <dependency>
>             <groupId>org.mortbay.jetty</groupId>
>             <artifactId>jetty-parent</artifactId>
>             <version>7</version>
>         </dependency>
>     </dependencies>
> </project>
>
>   I get:
>
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
------------------------------------------------------------------------
> [INFO] Building some-pom 1.0-SNAPSHOT
> [INFO]
------------------------------------------------------------------------
> [INFO]
------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
------------------------------------------------------------------------
> [INFO] Total time: 0.215s
> [INFO] Finished at: Fri Feb 04 16:53:00 EST 2011
> [INFO] Final Memory: 3M/121M
> [INFO]
------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project some-pom: Could not resolve
> dependencies for project test.pom:some-pom:jar:1.0-SNAPSHOT: Failure
> to find org.mortbay.jetty:jetty-parent:jar:7 in
> http://repo1.maven.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of
> central has elapsed or updates are forced -> [Help 1]
>
>    org.mortbay.jetty:jetty-parent is a parent pom file, but for some
> reason maven tries to find org.mortbay.jetty:jetty-parent:jar.
>
>    If I add <type>pom</type>, it is working fine, but the trouble is
> lot of projects don't do that. For example:
>
>
http://www.scalablesolutions.se/akka/repository/se/scalablesolutions/akka/akka-persistence-mongo/1.0-RC3/akka-persistence-mongo-1.0-RC3.pom
>
> is referencing:
>
>        <dependency>
>            <groupId>com.mongodb.casbah</groupId>
>            <artifactId>casbah_2.8.1</artifactId>
>            <version>2.0.1</version>
>            <scope>compile</scope>
>        </dependency>
>
> without specifying the type. Which means I can't reference
> akka-persistence-mongo, because I will get a similar error.
>
> I tried with Maven 3.0.1 and 3.0.2.
>
> Is not maven supposed to look at the POM file for the type instead of
> assuming a default of "jar"?
>
> Thank you in advance for any help!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message