yeroc opened a new pull request, #493:
URL: https://github.com/apache/maven-build-cache-extension/pull/493

   Fixes #492
   
   ## Description
   
   `restoreProjectArtifacts` only wires up `project.getArtifact()` to a 
restored artifact when the cached file is a regular jar. For compile-only 
cached builds the primary cached artifact is the `target/classes` directory, 
which falls through that condition unset. In a multi-module reactor that leaves 
downstream modules unable to resolve the upstream as a reactor artifact on a 
subsequent `mvn clean compile`, and they fall through to remote repositories 
with `Could not find artifact ...:jar:...-SNAPSHOT`.
   
   For the directory case this PR sets the file on the existing project 
artifact instead of replacing it with a `RestoredArtifact`. 
`RestoredArtifact.getFile` routes through `restoreToDiskConsumer` on every 
call, which would later break package-phase plugins (e.g. `jar:jar`) that 
update the file via `setFile`.
   
   Added `CompileOnlyReactorRestoreTest`, which reuses the existing 
`issue-393-compile-restore` reactor project to exercise two consecutive 
compile-only invocations. The test fails on master and passes with this change.
   
   ## Checklist
   
   - [x] Your pull request should address just one issue, without pulling in 
other changes.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Each commit in the pull request should have a meaningful subject line 
and body.
   - [x] Write unit tests that match behavioral changes, where the tests fail 
if the changes to the runtime are not applied.
   - [x] Run `mvn verify` to make sure basic checks pass.
   - [x] You have run the integration tests successfully (`mvn -Prun-its 
verify`).
   - [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to