[ 
http://jira.codehaus.org/browse/MNG-3314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138858#action_138858
 ] 

Marc Harris commented on MNG-3314:
----------------------------------

I too see this issue. It happens for me when attempting to depend on a snapshot 
version of a module downloaded from a repository. If the snapshot version of 
the module is built and installed locally, the problem goes away.

I will attach two projects (in a tar file) that have minimal external 
dependencies, and the debug output of trying to build. Here are the steps to 
reproduce:

Environment:
Maven 2.0.8
Linux 2.6.18
Artifactory 1.2.5 (rev. 1154)

Preliminary steps:
1) Modify the pom files to refer to your repository instead of 
http://localhost:8081/artifactory/jumptap-snapshots
2) Build maven-test-project1
3) Upload the pom and jar for maven-test-project1 to your repository.

Steps that cause the error to happen:
1) Delete maven-test-project1 from the local repository.
2) Build maven-test-project2 without the offline flag (mvn install). This build 
is successful (and downloads maven-test-project1 to the local repository).
3) Build maven-test-project2 with the offline flag (mvn -o install). This build 
fails, unable to resolve the maven-test-project1 artifact.

Steps that cause the error not to happen
1) Build maven-test-project1 locally. This build is successful.
2) Build maven-test-project2 without the offline flag (mvn install). This build 
is successful.
3) Build maven-test-project2 with the offline flag (mvn -o install). This build 
is successful. 

> offline build not running, when having SNAPSHOT dependencies
> ------------------------------------------------------------
>
>                 Key: MNG-3314
>                 URL: http://jira.codehaus.org/browse/MNG-3314
>             Project: Maven 2
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.7
>            Reporter: Matthias Weßendorf
>            Assignee: John Casey
>            Priority: Critical
>             Fix For: 2.0.10
>
>
> am having troubles with
> mvn ... -o
> (with maven 2.0.7)
> says not able to download (but, really, the file is in my local repo)
> The dependency is a -SNAPSHOT (for what's worth)
> Luckily, when traveling by train, I had maven 2.0.4 on my box as well.
> A change to use 2.0.4 works fine.
> So, is this an already know bug in 2.0.7 ?
> To my understanding it is a bug, since offline just shouldn't try to get a 
> newer
> SNAPSHOT, perhaps I am wrong.
> I know that relying on SNAPSHOTs can be dangerous, but from -o I would expect
> just not checking for new stuff.
> and... for some reasons, sometimes,
> it just downloads a new SNAPSHOT.
> That is a pain, when you are "maintaining" the same snapshot on your
> box, but the build just goes ahead and actually downloads a version.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to