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

Plugin can't be run from a parent multi-module project #13

Closed
reubenfirmin opened this issue Nov 21, 2018 · 7 comments
Closed

Plugin can't be run from a parent multi-module project #13

reubenfirmin opened this issue Nov 21, 2018 · 7 comments
Assignees

Comments

@reubenfirmin
Copy link

The plugin works when run on each module, but you can't run it on the parent module directly.

It fails with:

[ERROR] Failed to execute goal com.github.ozsie:detekt-maven-plugin:1.0.0.RC9.2:check (default-cli) on project parent: Execution default-cli of goal com.github.ozsie:detekt-maven-plugin:1.0.0.RC9.2:check failed: Provided path '/x/y/z/javaapis/src' does not exist! -> [Help 1]
[ERROR]

@reubenfirmin
Copy link
Author

This also prevents mvn verify from being run on the parent project.

@Ozsie
Copy link
Owner

Ozsie commented Dec 4, 2018

I will look into it.

@Ozsie Ozsie self-assigned this Dec 4, 2018
@robinkanters
Copy link

I'm running into this as well. Would be enough if I could specify the input paths but the config documentation seems scarce to me on this subject

@reubenfirmin
Copy link
Author

I found a solution of sorts; adding a profile which ignores the plugin when on the parent module.

    <profiles>
        <profile>
            <id>kotlin</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.ozsie</groupId>
                        <artifactId>detekt-maven-plugin</artifactId>
                        <version>1.0.0.RC9.2</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <activation>
                <file>
                    <exists>${basedir}/src/main/kotlin</exists>
                </file>
            </activation>
        </profile>
    </profiles>

@blakemorgan
Copy link

I am having this same problem as well.

@Ozsie
Copy link
Owner

Ozsie commented Apr 10, 2019

This is an issue with how detekt works by default, though it makes no real sense to fail because of this in this case. I will try to implement some work around

@Ozsie
Copy link
Owner

Ozsie commented Apr 10, 2019

This should be working in detekt-maven-plugin 1.0.0-RC14

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

4 participants