allegro / grunt-maven-plugin

Grunt + Maven integration done right
Other
213 stars 32 forks source link

Tell maven-grunt what task to run #61

Closed dbclkclk closed 9 years ago

dbclkclk commented 9 years ago

I have a number of registered task and I wanted a way of telling the grunt goal to run a specific task. How can I achieve this?

adamdubiel commented 9 years ago

You mean tasks like npm or grunt? If yest, then:

mvn grunt:<taskName>
mvn grunt:npm
dbclkclk commented 9 years ago

@adamdubiel thanks for the reply. I was thinking about specifying it to coincide with my maven build profile.

Sort of like this:

     <gruntOptions>
    <gruntOption>--verbose</gruntOption>
         <gruntOption>qa</gruntOption>
  </gruntOptions>

Where the grunt option qa specify the task. Would this work?

adamdubiel commented 9 years ago

Ah, you mean grunt task - sure, you can do it by specifying target parameter:

mvn grunt:grunt -Dtarget=myGruntTask

Or if you need it in build:

<configuration>
    <target>myGruntTask</target>
</configuration>

Where configuration is grunt-maven-plugin config of course.

dbclkclk commented 9 years ago

@adamdubiel thanks again!

adamdubiel commented 9 years ago

Happy to help :)