You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Thomas-FM&T <Pa...@bbc.co.uk> on 2009/09/17 18:09:06 UTC

Maven SNAPSHOT dependencies are not treated as snapshots

Hi all,

I have a problem that maven does not appear to be treating dependencies that
are specified as snapshots (i.e. Have a version that ends with ³-SNAPSHOT²)
as snapshots.  

Even when the snapshot does appear in a remote repository within my
organisation, using a timestamp based filename, with a metadata file
describing the correct one.  It seems that maven makes no attempt to work
out the actual snapshot to download and just attempts to download an
artifact with the exact version specified.

I have specified the repository in my pom that specifies snapshots ->
enabled -> true 

I have seen the same pom file working on someone elses machine in the
company.  I have upgraded from maven version 2.0.9 to 2.2.1 and it has made
no difference.  I have no particular settings in  my local settings file.  I
am running OS X 10.5.8.

Here is an example of the output:

INFO] Scanning for projects...
[INFO] 
------------------------------------------------------------------------
[INFO] Building XXX Security
[INFO]    task-segment: [package]
[INFO] 
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] File encoding has not been set, using platform encoding MacRoman,
i.e. build is platform dependent!
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
Downloading: 
file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository internal
(file:///Volumes/XXX_Dev/Maven/repository)
Downloading: 
http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository maven
(http://repo2.maven.org/maven2)
Downloading: 
http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
T/XXX-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository JBoss
Repository (http://repository.jboss.org/maven2)
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] File encoding has not been set, using platform encoding MacRoman,
i.e. build is platform dependent!
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 7 resources
[INFO] Copying 2 resources
Downloading: 
file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository internal
(file:///Volumes/XXX_Dev/Maven/repository)
Downloading: 
http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository maven
(http://repo2.maven.org/maven2)
Downloading: 
http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
T/XXX-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository JBoss
Repository (http://repository.jboss.org/maven2)
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT

I hope you can help, as I have run out of ideas.

Thanks,
Paul Thomas


Re: Maven snapshot dependencies are not treated as snapshots

Posted by Paul Thomas-FM&T <Pa...@bbc.co.uk>.
Hi Brett,

Thankyou for your reply.  It seems that the metadata was incorrectly created
locally at some point and clearing it out and using -U fixed the problem.

Thanks again, much appreciated.

Paul Thomas



On 24/09/2009 01:00, "Brett Porter" <br...@apache.org> wrote:

> In your local repository, do you have maven-metadata*.xml files in the
> 1.0-SNAPSHOT directory for the artifact? Do they match the ones on the
> remote server? Do they correctly specify the build number and timestamp?
> 
> If they are incorrect locally, a once off run with -U might help.
> 
> You might also check mvn help:effective-pom and see what Maven thinks
> the updatePolicy is for snapshots on that repository.
> 
> - Brett
> 
> On 21/09/2009, at 8:36 PM, Paul Thomas-FM&T wrote:
> 
>> Sorry to ask again, but does anyone have any ideas?  Is the question
>> clear
>> enough/have enough info?  I cannot get snapshots to work...
>> 
>> Thanks in advance,
>> Paul
>> 
>> ------ Forwarded Message
>> From: Paul Thomas-FM&T <Pa...@bbc.co.uk>
>> Reply-To: Maven Users List <us...@maven.apache.org>
>> Date: Thu, 17 Sep 2009 17:09:06 +0100
>> To: Maven Users List <us...@maven.apache.org>
>> Subject: Maven snapshot dependencies are not treated as snapshots
>> 
>> Hi all,
>> 
>> I have a problem that maven does not appear to be treating
>> dependencies that
>> are specified as snapshots (i.e. Have a version that ends with ³-
>> SNAPSHOT²)
>> as snapshots.
>> 
>> Even when the snapshot does appear in a remote repository within my
>> organisation, using a timestamp based filename, with a metadata file
>> describing the correct one.  It seems that maven makes no attempt to
>> work
>> out the actual snapshot to download and just attempts to download an
>> artifact with the exact version specified.
>> 
>> I have specified the repository in my pom that specifies snapshots ->
>> enabled -> true
>> 
>> I have seen the same pom file working on someone elses machine in the
>> company.  I have upgraded from maven version 2.0.9 to 2.2.1 and it
>> has made
>> no difference.  I have no particular settings in  my local settings
>> file.  I
>> am running OS X 10.5.8.
>> 
>> Here is an example of the output:
>> 
>> INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building XXX Security
>> [INFO]    task-segment: [package]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [resources:resources {execution: default-resources}]
>> [WARNING] File encoding has not been set, using platform encoding
>> MacRoman,
>> i.e. build is platform dependent!
>> [WARNING] Using platform encoding (MacRoman actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] Copying 2 resources
>> Downloading:
>> file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
>> NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.pom
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository
>> internal
>> (file:///Volumes/XXX_Dev/Maven/repository)
>> Downloading:
>> http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
>> -Unit-Test-1.0-SNAPSHOT.pom
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository maven
>> (http://repo2.maven.org/maven2)
>> Downloading:
>> http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
>> T/XXX-Unit-Test-1.0-SNAPSHOT.pom
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository JBoss
>> Repository (http://repository.jboss.org/maven2)
>> [INFO] [compiler:compile {execution: default-compile}]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources {execution: default-testResources}]
>> [WARNING] File encoding has not been set, using platform encoding
>> MacRoman,
>> i.e. build is platform dependent!
>> [WARNING] Using platform encoding (MacRoman actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] Copying 1 resource
>> [INFO] Copying 7 resources
>> [INFO] Copying 2 resources
>> Downloading:
>> file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
>> NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.jar
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository
>> internal
>> (file:///Volumes/XXX_Dev/Maven/repository)
>> Downloading:
>> http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
>> -Unit-Test-1.0-SNAPSHOT.jar
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository maven
>> (http://repo2.maven.org/maven2)
>> Downloading:
>> http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
>> T/XXX-Unit-Test-1.0-SNAPSHOT.jar
>> [INFO] Unable to find resource
>> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository JBoss
>> Repository (http://repository.jboss.org/maven2)
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failed to resolve artifact.
>> 
>> Missing:
>> ----------
>> 1) com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT
>> 
>> I hope you can help, as I have run out of ideas.
>> 
>> Thanks,
>> Paul Thomas
>> 
>> 
>> ------ End of Forwarded Message
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


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


Re: Maven snapshot dependencies are not treated as snapshots

Posted by Brett Porter <br...@apache.org>.
In your local repository, do you have maven-metadata*.xml files in the  
1.0-SNAPSHOT directory for the artifact? Do they match the ones on the  
remote server? Do they correctly specify the build number and timestamp?

If they are incorrect locally, a once off run with -U might help.

You might also check mvn help:effective-pom and see what Maven thinks  
the updatePolicy is for snapshots on that repository.

- Brett

On 21/09/2009, at 8:36 PM, Paul Thomas-FM&T wrote:

> Sorry to ask again, but does anyone have any ideas?  Is the question  
> clear
> enough/have enough info?  I cannot get snapshots to work...
>
> Thanks in advance,
> Paul
>
> ------ Forwarded Message
> From: Paul Thomas-FM&T <Pa...@bbc.co.uk>
> Reply-To: Maven Users List <us...@maven.apache.org>
> Date: Thu, 17 Sep 2009 17:09:06 +0100
> To: Maven Users List <us...@maven.apache.org>
> Subject: Maven snapshot dependencies are not treated as snapshots
>
> Hi all,
>
> I have a problem that maven does not appear to be treating  
> dependencies that
> are specified as snapshots (i.e. Have a version that ends with “- 
> SNAPSHOT”)
> as snapshots.
>
> Even when the snapshot does appear in a remote repository within my
> organisation, using a timestamp based filename, with a metadata file
> describing the correct one.  It seems that maven makes no attempt to  
> work
> out the actual snapshot to download and just attempts to download an
> artifact with the exact version specified.
>
> I have specified the repository in my pom that specifies snapshots ->
> enabled -> true
>
> I have seen the same pom file working on someone elses machine in the
> company.  I have upgraded from maven version 2.0.9 to 2.2.1 and it  
> has made
> no difference.  I have no particular settings in  my local settings  
> file.  I
> am running OS X 10.5.8.
>
> Here is an example of the output:
>
> INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building XXX Security
> [INFO]    task-segment: [package]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] File encoding has not been set, using platform encoding  
> MacRoman,
> i.e. build is platform dependent!
> [WARNING] Using platform encoding (MacRoman actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 2 resources
> Downloading:
> file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
> NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.pom
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository  
> internal
> (file:///Volumes/XXX_Dev/Maven/repository)
> Downloading:
> http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
> -Unit-Test-1.0-SNAPSHOT.pom
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository maven
> (http://repo2.maven.org/maven2)
> Downloading:
> http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
> T/XXX-Unit-Test-1.0-SNAPSHOT.pom
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository JBoss
> Repository (http://repository.jboss.org/maven2)
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] File encoding has not been set, using platform encoding  
> MacRoman,
> i.e. build is platform dependent!
> [WARNING] Using platform encoding (MacRoman actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 1 resource
> [INFO] Copying 7 resources
> [INFO] Copying 2 resources
> Downloading:
> file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
> NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.jar
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository  
> internal
> (file:///Volumes/XXX_Dev/Maven/repository)
> Downloading:
> http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
> -Unit-Test-1.0-SNAPSHOT.jar
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository maven
> (http://repo2.maven.org/maven2)
> Downloading:
> http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
> T/XXX-Unit-Test-1.0-SNAPSHOT.jar
> [INFO] Unable to find resource
> 'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository JBoss
> Repository (http://repository.jboss.org/maven2)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT
>
> I hope you can help, as I have run out of ideas.
>
> Thanks,
> Paul Thomas
>
>
> ------ End of Forwarded Message
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Maven snapshot dependencies are not treated as snapshots

Posted by Paul Thomas-FM&T <Pa...@bbc.co.uk>.
Sorry to ask again, but does anyone have any ideas?  Is the question clear
enough/have enough info?  I cannot get snapshots to work...

Thanks in advance,
Paul

------ Forwarded Message
From: Paul Thomas-FM&T <Pa...@bbc.co.uk>
Reply-To: Maven Users List <us...@maven.apache.org>
Date: Thu, 17 Sep 2009 17:09:06 +0100
To: Maven Users List <us...@maven.apache.org>
Subject: Maven snapshot dependencies are not treated as snapshots

Hi all,

I have a problem that maven does not appear to be treating dependencies that
are specified as snapshots (i.e. Have a version that ends with ³-SNAPSHOT²)
as snapshots.  

Even when the snapshot does appear in a remote repository within my
organisation, using a timestamp based filename, with a metadata file
describing the correct one.  It seems that maven makes no attempt to work
out the actual snapshot to download and just attempts to download an
artifact with the exact version specified.

I have specified the repository in my pom that specifies snapshots ->
enabled -> true 

I have seen the same pom file working on someone elses machine in the
company.  I have upgraded from maven version 2.0.9 to 2.2.1 and it has made
no difference.  I have no particular settings in  my local settings file.  I
am running OS X 10.5.8.

Here is an example of the output:

INFO] Scanning for projects...
[INFO] 
------------------------------------------------------------------------
[INFO] Building XXX Security
[INFO]    task-segment: [package]
[INFO] 
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] File encoding has not been set, using platform encoding MacRoman,
i.e. build is platform dependent!
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
Downloading: 
file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository internal
(file:///Volumes/XXX_Dev/Maven/repository)
Downloading: 
http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository maven
(http://repo2.maven.org/maven2)
Downloading: 
http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
T/XXX-Unit-Test-1.0-SNAPSHOT.pom
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:pom:1.0-SNAPSHOT' in repository JBoss
Repository (http://repository.jboss.org/maven2)
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] File encoding has not been set, using platform encoding MacRoman,
i.e. build is platform dependent!
[WARNING] Using platform encoding (MacRoman actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 7 resources
[INFO] Copying 2 resources
Downloading: 
file:///Volumes/XXX_Dev/Maven/repository/com/package/xxx/XXX-Unit-Test/1.0-S
NAPSHOT/XXX-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository internal
(file:///Volumes/XXX_Dev/Maven/repository)
Downloading: 
http://repo2.maven.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHOT/XXX
-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository maven
(http://repo2.maven.org/maven2)
Downloading: 
http://repository.jboss.org/maven2/com/package/xxx/XXX-Unit-Test/1.0-SNAPSHO
T/XXX-Unit-Test-1.0-SNAPSHOT.jar
[INFO] Unable to find resource
'com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT' in repository JBoss
Repository (http://repository.jboss.org/maven2)
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.package.xxx:XXX-Unit-Test:jar:1.0-SNAPSHOT

I hope you can help, as I have run out of ideas.

Thanks,
Paul Thomas


------ End of Forwarded Message


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