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

Réda Housni Alaoui updated MBUILDCACHE-92:
------------------------------------------
    Description: 
I have the following case:
{code:xml}
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <executions>
    <execution>
            <id>yarn-build-dev</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <phase>prepare-package</phase>
            <configuration>
              <skip>${build-dev.skip}</skip>
              <arguments>build:dev</arguments>
            </configuration>
          </execution>
          <execution>
            <id>yarn-build-prod</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <phase>prepare-package</phase>
            <configuration>
              <skip>${build-prod.skip}</skip>
              <arguments>build:prod</arguments>
            </configuration>
          </execution>
  </executions>
</plugin>
{code}

{{yarn-build-prod}} produce a more complete than {{yarn-build-dev}} but it also 
takes more time to execute:
- on a dev environment (build-prod.skip=true and build-dev.skip=false) using a 
cache produced with build-prod.skip=false and build-dev.skip=true should lead 
to a cache hit
- on a CI environement (build-prod.skip=false and build-dev.skip=true)  using a 
cache produced with build-prod.skip=true and build-dev.skip=false should lead 
to a cache miss

The only way I can think of implementing this is to track property {{skip}} 
only for execution id {{yarn-build-prod}}, but not for execution id 
{{yarn-build-dev}}.

But I can't, because as of now, this extension allows to track plugin property 
with reconcile at plugin goal level, not execution level.

  was:
I have the following case:
{code:xml}
<plugin>
  <groupId>com.github.eirslett</groupId>
  <artifactId>frontend-maven-plugin</artifactId>
  <executions>
    <execution>
            <id>yarn-build-dev</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <phase>prepare-package</phase>
            <configuration>
              <skip>${build-dev.skip}</skip>
              <arguments>build:dev</arguments>
            </configuration>
          </execution>
          <execution>
            <id>yarn-build-prod</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <phase>prepare-package</phase>
            <configuration>
              <skip>${build-prod.skip}</skip>
              <arguments>build:prod</arguments>
            </configuration>
          </execution>
  </executions>
</plugin>
{code}

{{yarn-build-prod}} is a more complete {{yarn-build-dev}} but it also takes 
more time to execute:
- on a dev environment (build-prod.skip=true and build-dev.skip=false) using a 
cache produced with build-prod.skip=false and build-dev.skip=true should lead 
to a cache hit
- on a CI environement (build-prod.skip=false and build-dev.skip=true)  using a 
cache produced with build-prod.skip=true and build-dev.skip=false should lead 
to a cache miss

The only way I can think of implementing this is to track property {{skip}} 
only for execution id {{yarn-build-prod}}, but not for execution id 
{{yarn-build-dev}}.

But I can't, because as of now, this extension allows to track plugin property 
with reconcile at plugin goal level, not execution level.


> Allow to define 'reconciles' at plugin execution level
> ------------------------------------------------------
>
>                 Key: MBUILDCACHE-92
>                 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-92
>             Project: Maven Build Cache Extension
>          Issue Type: Improvement
>    Affects Versions: 1.1.0
>            Reporter: Réda Housni Alaoui
>            Priority: Major
>
> I have the following case:
> {code:xml}
> <plugin>
>   <groupId>com.github.eirslett</groupId>
>   <artifactId>frontend-maven-plugin</artifactId>
>   <executions>
>     <execution>
>             <id>yarn-build-dev</id>
>             <goals>
>               <goal>yarn</goal>
>             </goals>
>             <phase>prepare-package</phase>
>             <configuration>
>               <skip>${build-dev.skip}</skip>
>               <arguments>build:dev</arguments>
>             </configuration>
>           </execution>
>           <execution>
>             <id>yarn-build-prod</id>
>             <goals>
>               <goal>yarn</goal>
>             </goals>
>             <phase>prepare-package</phase>
>             <configuration>
>               <skip>${build-prod.skip}</skip>
>               <arguments>build:prod</arguments>
>             </configuration>
>           </execution>
>   </executions>
> </plugin>
> {code}
> {{yarn-build-prod}} produce a more complete than {{yarn-build-dev}} but it 
> also takes more time to execute:
> - on a dev environment (build-prod.skip=true and build-dev.skip=false) using 
> a cache produced with build-prod.skip=false and build-dev.skip=true should 
> lead to a cache hit
> - on a CI environement (build-prod.skip=false and build-dev.skip=true)  using 
> a cache produced with build-prod.skip=true and build-dev.skip=false should 
> lead to a cache miss
> The only way I can think of implementing this is to track property {{skip}} 
> only for execution id {{yarn-build-prod}}, but not for execution id 
> {{yarn-build-dev}}.
> But I can't, because as of now, this extension allows to track plugin 
> property with reconcile at plugin goal level, not execution level.



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

Reply via email to