frontend-maven-plugin: M2E Infinite Loop using 0.0.22
I have a working configuration of the plugin in Eclipse using version 0.0.16. This is the POM entry (I have left out the DownloadRoot entries for security reasons):
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.16</version>
<configuration>
<workingDirectory>src/main/resources/static</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v0.10.33</nodeVersion>
<npmVersion>1.4.21</npmVersion>
<nodeDownloadRoot>http://internal/proxy/here/</nodeDownloadRoot>
<npmDownloadRoot>http://internal/proxy/here/</npmDownloadRoot>
</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>grunt build</id>
<goals>
<goal>grunt</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
When upgrading to version 0.0.22 M2E gets stuck building the workspace. Same POM, different version. I have seen this happen before with previous plugins. Is this a known issue?
When using 0.0.16 the execution steps get flagged by M2E as errors but the project builds and runs perfectly fine. Even integrates with Jenkins perfectly.
Any ideas?
Cheers for a great plugin!
About this issue
- Original URL
- State: open
- Created 9 years ago
- Comments: 42 (8 by maintainers)
Adding m2e lifecycle-mapping plugin solved the problem. In pom.xml:
May 12/2015 update: I guess I owe an explanation.
Consider gulp goal, as one. Essentially we allow gulp to go outside of the context and do whatever: like format C: or rm recursively. One can ‘achieve’ similar effects with other maven plugins as well, e.g.: Ant run or alike. It is possible then (in eclipse) to modify the file system while in the mid of maven’s Debug/Install. What would we expect from eclipse then?
Note: there is no such issue if running from command line: mvn clean install
I see 2 solutions (eclipse): (1) ‘save/hide your gold in a cave’, that is place your resources into a ‘safe place’; (2) stick to eclipse’s strategy - disable eclipse’s incremental build in case we expect fs modifications from an outside: gulp/grunt/ant, etc.
I decided on (2). It worked for me. Sorry for pasting an invalid XML and thanks to Philip to correct it.
Any of the above two solutions is perfect ?
Thank you.