[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Réda Housni Alaoui updated MBUILDCACHE-91:
------------------------------------------
    Description: 
I have a multi module project where module1 is used as a dependency of 
{{maven-dependency-plugin:unpack}} declared in module2.

The plugin configuration in module2 pom.xml looks like this:
{code:xml}
 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-webstart-resources</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              
<outputDirectory>${project.build.directory}/generated-resources/com/aqme/module1</outputDirectory>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>module1</artifactId>
                  <version>${project.version}</version>
                  <classifier>blob</classifier>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

The effective pom computed by version 1.1.0 of this extension contains 
{{project.version}} of artifactItem#version expanded to its effective value 
instead of {{cache-extension-version}}. This leads to cache miss when the only 
difference is {{project.version}} effective value.

  was:
I have a multi module project where module1 is used as a dependency of 
{{maven-dependency-plugin:unpack}} declared in module2.

The plugin configuration in module2 pom.xml looks like this:
{code:xml}
 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-webstart-resources</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              
<outputDirectory>${project.build.directory}/generated-resources/com/aqme/module1</outputDirectory>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>module1</artifactId>
                  <version>${project.version}</version>
                  <classifier>blob</classifier>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

The effective pom computed by version 1.1.0 of this extension contains 
{{project.version}} expanded to its effective value instead of 
{{cache-extension-version}}. This leads to cache miss when the only difference 
is {{project.version}} effective value.


> maven-dependency-plugin:unpack reactor artifactItems have their versions 
> expanded instead of being replaced by  'cache-extension-version'
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MBUILDCACHE-91
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-91
>             Project: Maven Build Cache Extension
>          Issue Type: Improvement
>            Reporter: Réda Housni Alaoui
>            Priority: Major
>
> I have a multi module project where module1 is used as a dependency of 
> {{maven-dependency-plugin:unpack}} declared in module2.
> The plugin configuration in module2 pom.xml looks like this:
> {code:xml}
>  <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>unpack-webstart-resources</id>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>             <phase>generate-resources</phase>
>             <configuration>
>               
> <outputDirectory>${project.build.directory}/generated-resources/com/aqme/module1</outputDirectory>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>${project.groupId}</groupId>
>                   <artifactId>module1</artifactId>
>                   <version>${project.version}</version>
>                   <classifier>blob</classifier>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
> {code}
> The effective pom computed by version 1.1.0 of this extension contains 
> {{project.version}} of artifactItem#version expanded to its effective value 
> instead of {{cache-extension-version}}. This leads to cache miss when the 
> only difference is {{project.version}} effective value.



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

Reply via email to