Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.2.1
-
None
-
None
-
None
-
Windows, linux
Description
I'm having an issue with marking my repository as <updatePolicy>never</updatePolicy>. It seems as though even with the never parameter, the first time an artifact is referenced, an initial check to the remote repo happens. After that, the metadata.xml is created locally and further checks for updates don't occur.
Situation:
artifactB depends on artifactA
Procedure:
1) install artifactA locally
2) build artifactB locally, with repo updatepolicy never. The hope would be that the locally installed artifactA will be used, without ever contacting the remote repository.
Result:
Maven goes to the remote repository to get info on artifactA ("checking for updates") If there is a newer than local version, it is downloaded. metadata.xml is created locally with name metada-<repoid>.xml
updatePolicy=never should never check for updates if there is a local copy.
Sample and log attached. Notice in the log this section:
[DEBUG] Connecting to repository: 'crib-snap' with url: 'http://9.44.169.102:8888/nexus/content/repositories/crib-snap'.
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG] repository metadata for: 'snapshot enf.test:artifactA:1.0.0-SNAPSHOT' could not be found on repository: crib-snap
[DEBUG] Skipping disabled repository central
[DEBUG] artifactA: using locally installed snapshot
[DEBUG] enf.test:artifactA:jar:1.0.0-SNAPSHOT:compile (selected for compile)
[DEBUG] artifactA: using locally installed snapshot
It should never connect to the repository, since this artifact is local.
A few other things:
1) this happens for each defined repository that has never been visited.
2) a metadata file is created in the repo for each repo after this occurs.
Version experience:
With maven 2.2.1 it behaves as I posted, always doing one initial check and pulling down the newer version if available.
With maven 3.0.1 it behaves correctly and does not go to the remote repository at all.
Attachments
Attachments
Issue Links
- duplicates
-
MNG-4326 Maven should not check snapshot repositories for dependencies in the reactor
- Closed