eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.26k stars 870 forks source link

The property "skip.grunt" doesn't skip execution #173

Open cameroncan opened 9 years ago

cameroncan commented 9 years ago

I tried to create a separate execution of the plugin to run a grunt task specific for testing:

<execution>
    <id>grunt-test</id>
    <goals>
        <goal>grunt</goal>
    </goals>
    <phase>test</phase>
    <configuration>
        <arguments>test --frontendSrcDir="${frontendSrcDir}" --frontendTestDir="../src/test/javascript/unit/" --non-minified-test=${non-minified-test}</arguments>
    </configuration>
</execution>

I found in the grunt mojo the property "grunt.skip", however when I set that property to true, it has no effect, the grunt task is still run. I tried both adding true</skip.grunt> to the above execution's configuration element in the pom and adding -Dskip.grunt (definitely not what I really want to do, as it is supposed to skip all grunt executions). Neither of these seemed to have any effect.

I know it isn't documented, but is this or something else supposed to be available? I noticed that karma respects the maven skipTests property. I am considering moving these tests to karma, but thought I'd better get these working first.

eirslett commented 9 years ago

It should work, but you might have been using an old version of the plugin, where the functionaly wasn't merged yet? Does it work with the newest version, 0.0.23?