[ https://issues.apache.org/jira/browse/MBUILDCACHE-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Réda Housni Alaoui updated MBUILDCACHE-85: ------------------------------------------ Description: I have made a first build without configuring `attachedOutputs` that produced an entry in the local build cache. After realizing that my project requires {{.class}} files to be restored to target folders, I configured {{attachedOutputs}} as follow: {code:xml} <attachedOutputs> <dirNames> <dirName>classes</dirName> <dirName>test-classes</dirName> <dirName>maven-status</dirName> </dirNames> </attachedOutputs> {code} Despite the configuration change, new builds use the cache populated by the old configuration. The .class are still not restored. The only way to fix the issue is to manually remove old cache entries. I think that a build using cache configuration v2 should not use the cache produced by cache configuration v1. Said differently, 2 different cache configurations should lead to 2 different cache entries. was: I have made a first build without configuring `attachedOutputs` that produced an entry in the local build cache. After realizing that my project requires {{.class}} files to be restored to target folders, I configured {{attachedOutputs}} as follow: {code:xml} <attachedOutputs> <dirNames> <dirName>classes</dirName> <dirName>test-classes</dirName> <dirName>maven-status</dirName> </dirNames> </attachedOutputs> {code} Despite the configuration change, new builds use the cache populated by the old configuration. The .class are still not restored. The only way to fix the issue is to manually remove old cache entries. I think that a build using cache configuration v2 should not use the cache configuration v1. Said differently, 2 different cache configurations should lead to 2 different cache entries. > Changing cache configuration `attachedOutputs` still leads to cache hit > instead of a miss > ----------------------------------------------------------------------------------------- > > Key: MBUILDCACHE-85 > URL: https://issues.apache.org/jira/browse/MBUILDCACHE-85 > Project: Maven Build Cache Extension > Issue Type: Bug > Reporter: Réda Housni Alaoui > Priority: Major > > I have made a first build without configuring `attachedOutputs` that produced > an entry in the local build cache. > After realizing that my project requires {{.class}} files to be restored to > target folders, I configured {{attachedOutputs}} as follow: > {code:xml} > <attachedOutputs> > <dirNames> > <dirName>classes</dirName> > <dirName>test-classes</dirName> > <dirName>maven-status</dirName> > </dirNames> > </attachedOutputs> > {code} > Despite the configuration change, new builds use the cache populated by the > old configuration. The .class are still not restored. The only way to fix the > issue is to manually remove old cache entries. > I think that a build using cache configuration v2 should not use the cache > produced by cache configuration v1. Said differently, 2 different cache > configurations should lead to 2 different cache entries. -- This message was sent by Atlassian Jira (v8.20.10#820010)