question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

M2E Infinite Loop using 0.0.22

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:42 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
sergueimcommented, May 13, 2015

Adding m2e lifecycle-mapping plugin solved the problem. In pom.xml:

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
            <version>1.0.0</version>
            <configuration>
                <lifecycleMappingMetadata>
                   <pluginExecutions>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>com.github.eirslett</groupId>
                                <artifactId>frontend-maven-plugin</artifactId>
                                <versionRange>[0.0.23,)</versionRange>
                                <goals>
                                    <goal>npm</goal>
                                    <goal>bower</goal>
                                    <goal>gulp</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                               <execute>
                                 <runOnIncremental>false</runOnIncremental>
                               </execute >
                             </action>
                        </pluginExecution>
                    </pluginExecutions>
                </lifecycleMappingMetadata>
            </configuration>
        </plugin>
    </plugins>
</pluginManagement>

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 ?

  • No.

Thank you.

0reactions
matteopeluccocommented, Feb 1, 2017

Hi guys, still not clear to me how to stop infinite looping (I have it… Neon 2, simple maven project).

This is my folder structure

<project> /html /src/main/java /src/main/resources

I am using grunt. Source files are in /html and after min, concat, … all ‘dist’ files are copied to /src/main/resources

If I run Eclipse with automatic project build disabled, of course, loop does not happen. But as soon as I re-enable automatic project build, loop is back.

I tried to play with @sergueim solution, but nothing…

I attach the pom.xml (omitting some project infos… but it is completed).

frontend-maven-plugin-loop.txt

Any help is appreciated, thanks…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eclipse loops endlessly: Invoking 'Maven Project Builder'
Ugh! My Eclipse is stuck in an endless loop: ... The building workspace never gets past 58%. Details: Google's GWT provides a sample...
Read more >
[m2e-users] Often get into infinite loop with "Associate sources ...
If I restart Eclipse, this goes away, until the next time it gets into this state. I would guess that this is m2e...
Read more >
Infinite loop | Amazon CodeGuru Reviewer, Detector Library
Infinite loop Medium​​ Use loop control flow to ensure that loops are exited, even if exceptional behaviors are encountered. If an operation is...
Read more >
DrJava / Support Requests / #22 Infinite Loop Halting
infinite loop or just something that runs too long? I'm using WinXP and right now I'm using task manager and killing Dr.Java, ...
Read more >
Infinite loop - Wikipedia
In computer programming, an infinite loop (or endless loop) is a sequence of instructions that, as written, will continue endlessly, unless an external ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found