Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forking with skip #79

Open
ekoepfle opened this issue Feb 1, 2020 · 2 comments
Open

forking with skip #79

ekoepfle opened this issue Feb 1, 2020 · 2 comments

Comments

@ekoepfle
Copy link

ekoepfle commented Feb 1, 2020

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.

@ekoepfle
Copy link
Author

ekoepfle commented Feb 1, 2020

maybe a good way to express this is, what might be a possible config to skip all test lifecycle bindings, including scoverage. proxy them all behind additionalForkedProjectProperties and either start the fork regardless, or rebind scoverage to phase none?

@chetanmeh
Copy link
Contributor

Same issue here. It would be good to have a way where scoverage.skip also skips the forking itself so as to give a fast path to run test locally for the developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants