gleclaire / codenarc-maven-plugin

Maven Mojo Plug-In to generate reports based on the CodeNarc Analyzer
https://gleclaire.github.io/codenarc-maven-plugin/
Apache License 2.0
7 stars 17 forks source link

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory #20

Open valery93 opened 6 years ago

valery93 commented 6 years ago

Hello

I don't know why I getting this error. My setup:

pom.xml

<dependencies>
...
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.25</version>
    </dependency>
...
</dependencies>
...
<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>codenarc-maven-plugin</artifactId>
            <version>0.22-1</version>
            <configuration>
                <codeNarcVersion>1.0</codeNarcVersion>
                <groovyVersion>2.4.0</groovyVersion>
                <sourceDirectory>src/test/groovy</sourceDirectory>
                <testSourceRoots>src/test/groovy</testSourceRoots>
                <rulesetfiles>config/codenarc/codenarc.xml</rulesetfiles>
                <maxPriority1Violations>0</maxPriority1Violations>
                <maxPriority2Violations>0</maxPriority2Violations>
                <maxPriority3Violations>0</maxPriority3Violations>
            </configuration>
            <executions>
                <execution>
                    <id>validate</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>codenarc</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

I tried a different implementation of slf4j, running codenarc in different phase but always I got this same error. Any ideas?