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

   Before this change, a restore put each file back at the path recorded by the 
build that saved the entry, named after that build's version (e.g. 
`target/probe-1-sources.jar` restored in a build of version `2`). When a mojo 
ran again after the restore (here a `runAlways` 
`maven-source-plugin:jar-no-fork`), it attached `target/probe-2-sources.jar` 
under the coordinates already bound to the restored file, and Maven failed with:
   
   ```
   Artifact …:probe:java-source:sources:2 already attached to a file 
target/probe-1-sources.jar: attach to target/probe-2-sources.jar should be done 
with another classifier
   ```
   
   This change makes a restore put a file named `<artifactId>-<savedVersion>…` 
back under `<artifactId>-<currentVersion>…`, so a mojo running again attaches 
the same file, which Maven accepts. Paths not named after the version 
(`target/classes`, generated sources) are restored unchanged. 
`RestoreUnderCurrentVersionTest` fails without the change.
   
   ---
   
    - [X] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://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