You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Réda Housni Alaoui (Jira)" <ji...@apache.org> on 2024/04/15 09:07:00 UTC

[jira] [Created] (MBUILDCACHE-85) Changing cache configuration `attachedOutputs` still leads to cache hit instead of a miss

Réda Housni Alaoui created MBUILDCACHE-85:
---------------------------------------------

             Summary: 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


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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)