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/08/18 16:36:00 UTC
[jira] [Comment Edited] (MBUILDCACHE-103) Unable to optimally reconcile maven-surefire-plugin 'groups' property
[ https://issues.apache.org/jira/browse/MBUILDCACHE-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874686#comment-17874686 ]
Réda Housni Alaoui edited comment on MBUILDCACHE-103 at 8/18/24 4:35 PM:
-------------------------------------------------------------------------
Alas, {{-Dmaven.build.cache.alwaysRunPlugins=maven-surefire-plugin:test}} neither populates the remote cache nor makes use of a cached test execution (obviously ^^).
On tracked property value mismatch, it looks lile the whole cache entry is not reused. Couldn’t it be reused partially?
If I run 'mvn clean package -DskipTests' then 'mvn clean package', I’d like the second execution to reuse the first’s result until maven-surefire-plugin:test. This would allow the second one to benefit from the compilation output of the first one.
was (Author: ralaoui):
Alas, {{-Dmaven.build.cache.alwaysRunPlugins=maven-surefire-plugin:test}} neither populate the remote cache nor makes use of a caches test execution (obviously ^^).
On tracked property value mismatch, it looks lile the whole cache entry is not reused. Couldn’t it be reused partially?
If I run 'mvn clean package -DskipTests' then 'mvn clean package', I’d like the second execution to reuse the first’s result until maven-surefire-plugin:test. This would allow the second one to benefit from the compilation output of the first one.
> Unable to optimally reconcile maven-surefire-plugin 'groups' property
> ---------------------------------------------------------------------
>
> Key: MBUILDCACHE-103
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-103
> Project: Maven Build Cache Extension
> Issue Type: Improvement
> Reporter: Réda Housni Alaoui
> Priority: Major
>
> Property {{groups}} of {{maven-surefire-plugin}} allows to run a subset of tests matching the property value. E.g. {{groups=foo}} will only execute tests tagged with 'foo'.
> If I run a build with {{groups=foo}}, and if a cache entry exists for {{groups=null}} (i.e. no test filter), I want the cache entry to be reused as much as possible and the {{maven-surefire-plugin}} to be run on top of that.
> I think I need to specify that every non null value for groups should be considered as a skip value.
> Following this, what I need is the ability to declare a reconcile entry in xml config file looking like this:
> {code:xml}
> <cache>
> <executionControl>
> <reconcile>
> <plugins>
> <plugin artifactId="maven-surefire-plugin" goal="test">
> <reconciles>
> <reconcile propertyName="groups" skipValueRegex=".+"/>
> </reconciles>
> </plugin>
> </plugins>
> </reconcile>
> </executionControl>
> </cache>
> {code}
> Could we introduce this {{skipValueRegex}} that would allow to match multiple skip values and fix my issue?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)