Ivan Pavlov

    1 year ago
    Hi! I'm trying to setup detekt in maven multimodule project without success. I hope there is a person here who already done it and can help. Details are in thread
    In the root pom.xml I add the following plugin configuration
    If I run
    mvn detekt:create-baseline -Ddetekt.config=detekt.yml -Ddetekt.baseline=detekt-baseline.xml
    I get Execution default-cli of goal com.github.ozsie:detekt-maven-plugin:1.17.1:create-baseline failed: Provided path 'projectDirectory/src' does not exist! I understand that I don't have src for the root project because it obviously has pom packaging, but is there a workaround? Ideally My goal is having single baseline file for all submodules and single report after detekt:check goal


    1 year ago
    We don't officially support Maven out of the box, so is a bit complicated to support you 😕

    Ivan Pavlov

    1 year ago
    I hoped that there is a person who already done it 🙂 BTW what is the proper setup for gradle for such case?


    1 year ago
    we have it set up in our parent-pom like: https://github.com/trib3/leakycauldron/blob/main/parent-pom/pom.xml#L1483-L1537 we put our detekt config in a small "build-resources" module that everything else can depend on