Grunt Maven Integration

You may want to integrate Grunt and Maven to be able to build frontend every time just before a Maven build.

For this purpose, I prefer to use exec plugin to invoke “grunt build” in the beginning of each Maven build.

My “Gruntfile.js” is under /WebContent directory so

<workingDirectory>WebContent</workingDirectory>

line is important.

Even if it works fine, there is also an error like
Plugin execution not covered by lifecycle configuration bla bla bla

So instead of this I started to use eirslett/frontend-maven-plugin with this configuration

It is a better choice!

[1] http://stackoverflow.com/questions/22393785/exec-maven-plugin-says-cannot-run-specified-program-even-though-it-is-on-the-pa

[2] http://stackoverflow.com/questions/3491937/i-want-to-execute-shell-commands-from-mavens-pom-xml

[3] http://stackoverflow.com/questions/27822050/using-maven-to-install-bower-components-with-bower-installed-globally​

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: