mavenplexuswro4j

Wro4j maven plugin - required class is missing


I'm trying to run wro4j maven plugin according to the documentation

I add the plugin to my pom.xml:

<plugin>
    <groupId>ro.isdc.wro4j</groupId>
    <artifactId>wro4j-maven-plugin</artifactId>
    <version>1.5.0</version>
</plugin>

and run the goal:

mvn wro4j:run -Dminimize=true -DtargetGroups=all

However the build fails with error:

org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl
ugin manager executing goal 'ro.isdc.wro4j:wro4j-maven-plugin:1.5.0:run': Unable
to load the mojo 'ro.isdc.wro4j:wro4j-maven-plugin:1.5.0:run' in the plugin 'ro
.isdc.wro4j:wro4j-maven-plugin'. A required class is missing: org/codehaus/plexu
s/util/Scanner

Do you know how to avoid this error?


Solution

  • Since wro4j-1.5.0, the maven 3.0 is required to run the plugin. The reason is a feature called incremental build support which depends on a library which is not available on older version of maven by default.