Skip to content

forking with skip #79

@ekoepfle

Description

@ekoepfle

I understand the forking changes made recently, and they are great, ty ty. However, there is still one nuance I am not sure about.

It seems, that even if skip=true, the fork still occurs. Where this becomes an issue, is that the fork then kicks off its own test lifecycle, triggering any other executions bound to the lifecycle.

Despite the scoverage:test mojo skipping due to true, the fork still happens prior, and kicks off other plugin goals bound to to test. The fork ends, and they happen again on the main process.

Does this make sense? I can track it mostly via custom execution-ids. It will be the declared execution where skip=true, even with a top level skip.

For instance, a config (distilled):

<plugin>
    <groupId>org.scoverage</groupId>
    <artifactId>scoverage-maven-plugin</artifactId>
    <version>1.4.1</version>
    <configuration>
        <skip>true</skip>
    </configuration>
    <executions>
        <execution>
            <id>forked-scoverage-test</id>
            <goals>
                <goal>test</goal>
            </goals>
            <configuration>
                <skip>true</skip>
            </configuration>
        </execution>
    </executions>
</plugin>

outputs:

INFO] >>> scoverage-maven-plugin:1.4.1:test (forked-scoverage-test) > [scoverage]test @ redacted >>>
[INFO] 
...omission...
[INFO] 
[INFO] <<< scoverage-maven-plugin:1.4.1:test (forked-scoverage-test) < [scoverage]test @ redacted <<<
[INFO] 
[INFO] --- scoverage-maven-plugin:1.4.1:test (forked-scoverage-test) @ redacted ---
[INFO] Skipping Scoverage execution
[INFO] 

I could provide a more complete pom, the actual project is proprietary, so I have to recreate it for posting. Or I can put it under a debugger for more insight. But, before I commit time to that, I wanted to check and see if this is expected, or if there I am missing something.

For the time being, I get around it by skipping scoverage with an execution/phase variable scoverage.phase, that I set to none when I want to skip scoverage goals. This prevents the fork from starting.

Sorry if this is a repost or known issue too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions