I am using gulp with frontend-maven-plugin. All my tasks defined in gulp are working one. There is just one BIG issue. After gulp task executes the cmd waits in an infinite loop or rather GULP watches over the file for changes as I am using Browserify.
I want the gulp to stop watching after my tasks are execute and let the remaining subprojects with Maven execute their tasks.
My Project is an AEM project managed by maven. Here is a snipped of the POM file
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<!-- NB! Set <version> to the latest released version of frontend-maven-plugin,
like in README.md -->
<version>1.6</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v6.10.0</nodeVersion>
<npmVersion>1.4.21</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<!-- Optional configuration which provides for running any npm
command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>gulp build</id>
<goals>
<goal>gulp</goal>
</goals>
<configuration>
<arguments>aemBuild</arguments>
</configuration>
</execution>
gulp.task('aemBuild',gulp.series('clean','browserify','copyToAEM','endGulp'));
Gulp usually ends after all tasks are completed. I found out that in my browserify task there was a watchify task added which was causing the infinite wait.
So removing the watchify for maven build resolved the issue.