Hi,
Damn maven!
It seems the following dependency in lift is causing the Jersey-lift
module to fail (See end of my email for the error):
>> <dependency>
>> <groupId>javax.mail</groupId>
>> <artifactId>mail</artifactId>
>> <version>[1.4,1.5)</version>
>> </dependency>
And it cannot find:
javax.mail:mail:jar:1.4.3-rc1
I worked around by adding an explicit dependency to the jersey-lift
pom.xml:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.2</version>
</dependency>
It also works if i set the version to 1.4.3-rc1. Perhaps 1.4.3-
SNAPSHOT and 1.4.3-rc1 are in conflict?
There was some discussion in the lift alias but i am not much the
wiser for it (see forwarded email).
Paul.
[INFO] Failed to resolve artifact.
Missing:
----------
1) javax.mail:mail:jar:1.4.3-rc1
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=javax.mail -DartifactId=mail -
Dversion=1.4.3-rc1 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the
file there:
mvn deploy:deploy-file -DgroupId=javax.mail -DartifactId=mail -
Dversion=1.4.3-rc1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
DrepositoryId=[id]
Path to dependency:
1) com.sun.jersey.contribs:jersey-lift:jar:1.1.4-ea-SNAPSHOT
2) net.liftweb:lift-webkit:jar:1.1-SNAPSHOT
3) net.liftweb:lift-util:jar:1.1-SNAPSHOT
4) javax.mail:mail:jar:1.4.3-rc1
----------
1 required artifact is missing.
for artifact:
com.sun.jersey.contribs:jersey-lift:jar:1.1.4-ea-SNAPSHOT
from the specified remote repositories:
m.g.o-central (
http://maven.glassfish.org/content/repositories/central/
),
scala-tools.org (
http://scala-tools.org/repo-releases),
m2.dev.java.net (
http://download.java.net/maven/2),
scala-tools.snapshots (
http://scala-tools.org/repo-snapshots/),
m1.dev.java.net (
http://download.java.net/maven/1)
Begin forwarded message:
> From: Indrajit Raychaudhuri <indrajitr_at_gmail.com>
> Date: November 6, 2009 6:45:16 AM CEST
> To: liftweb_at_googlegroups.com
> Subject: [Lift] Re: javax.mail 1.4.3-SNAPSHOT
> Reply-To: liftweb_at_googlegroups.com
>
>
>
>
> On 06/11/09 2:24 AM, aw wrote:
>>
>> I upgraded to 1.1-M7 and was surprised to see that javax.mail-1.4.3-
>> SNAPSHOT is now appearing as a dependency. Generally speaking, we
>> don't want SNAPSHOT dependencies because they aren't re-creatable,
>> but
>> somehow, it sneaked into the Java.Net Maven 2 Repository:
>> http://download.java.net/maven/2/javax/mail/mail/
>>
>> It is being pulled in because the lift pom here:
>> http://scala-tools.org/repo-releases/net/liftweb/lift/1.1-M7/lift-1.1-M7.pom
>> declares the dependency:
>>
>> <dependency>
>> <groupId>javax.mail</groupId>
>> <artifactId>mail</artifactId>
>> <version>[1.4,1.5)</version>
>> </dependency>
>>
>> Normally, the above should be fine. Alas, I think the underlying
>> problem is really Java.Net's Maven 2 Repository -- the SNAPSHOT build
>> should not have made it to the repository...
>
> As you can see, the intention is to allow all 1.4.x series stable
> releases.
>
> Lift POM doesn't have any reference to Java.Net Maven 2 Repository.
> Therefore, within Lift, javax.mail.mail is always picked up from Maven
> central repository (repo1.maven.org/maven2) which isn't polluted with
> SNAPSHOT builds.
>
> I guess, your project has reference to Java.Net repository which wins
> over Maven central repository. This in turn results in 1.4.3-SNAPSHOT
> being pulled. See if it helps to have the release and snapshot
> policies
> set for the Java.Net repository node in your POM [0].
>
> Let us know how it goes, and we'll take it from there.
>
> [0]: http://maven.apache.org/pom.html#Repositories
>
>>
>> BTW... I noticed that the javax.activation dependency is explicitly
>> declared:
>>
>> <dependency>
>> <groupId>javax.activation</groupId>
>> <artifactId>activation</artifactId>
>> <version>[1.1,1.2)</version>
>> </dependency>
>>
>> but it should be a transitive dependency of javax,mail (so this could
>> be removed).
>
> Indeed. This was an oversight, thanks for sharing. As David mentioned,
> raise a ticket and I'll fix it.
>
>>
>> I'm not sure what I am going to do to resolve this -- probably add an
>> explicit dependency in my project to override it. Thought I'd
>> share...
>>
>>>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Lift" group.
> To post to this group, send email to liftweb_at_googlegroups.com
> To unsubscribe from this group, send email to liftweb+unsubscribe_at_googlegroups.com
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
> -~----------~----~----~----~------~----~------~--~---
>