String getDocumentationDir() {
        String baseDir = project.getBuild().getDirectory();
        if (baseDir == null || new File(baseDir).exists()) {
            baseDir = project.getBasedir().getAbsolutePath();
            baseDir = baseDir + "/target";
            if (!new File(baseDir).exists()) {
                //maven plugin declared in child module
                baseDir = project.getBasedir().getAbsolutePath();
            }
        }
        if (!baseDir.endsWith("/")) {
            baseDir = baseDir + "/";
        }

        if (outputDir == null) {
            outputDir = "cukedoctor/";
        }

        if (!outputDir.endsWith("/")) {
            outputDir = outputDir + "/";
        }

        return baseDir + outputDir;

    }
String getDocumentationDir ( ) { String baseDir = project . getBuild ( ) . getDirectory ( ) ; if ( baseDir == null || new File ( baseDir ) . exists ( ) ) { baseDir = project . getBasedir ( ) . getAbsolutePath ( ) ; baseDir = baseDir + "/target" ; if ( ! new File ( baseDir ) . exists ( ) ) { baseDir = project . getBasedir ( ) . getAbsolutePath ( ) ; } } if ( ! baseDir . endsWith ( "/" ) ) { baseDir = baseDir + "/" ; } if ( outputDir == null ) { outputDir = "cukedoctor/" ; } if ( ! outputDir . endsWith ( "/" ) ) { outputDir = outputDir + "/" ; } return baseDir + outputDir ; }
documentation is saved under ${buildDir}/cukedoctor folder