New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wisdom in Eclipse #67

Closed
nicolas-rempulski opened this Issue Jan 9, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@nicolas-rempulski
Member

nicolas-rempulski commented Jan 9, 2014

I was playing with wisdom in Eclipse while I got bored with m2e "plugin lifecycle not covered" errors.

For those interested, a very good m2e problems overview can be read here.
tl;dr : m2e requires another layer on top of maven plugins to know which goals to launch when Eclipse wants to build the workspace.

3 solutions :

  • Create a m2e connector for wisdom-maven-plugin and wisdom-asciidoc-maven-plugin. Basically, write an Eclipse plugin (nope)
  • Add in the plugins pom (very very verbose)
  • Add a local lifecyclemapping file in eclipse to tell m2e to ignore those plugins. Full compilation is then not handled by Eclipse automatic build (as it is now without a m2e connector). You can still build projects with Run as Maven ... source

Here is the content of the lifecycle mapping file for wisdom (Preferences > Maven > Lifecycle Mappings):

<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
    <pluginExecutions>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>initialize</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>copy-configuration</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>copy-resources</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>copy-assets</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>copy-templates</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>compile-coffeescript</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>compile-less</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>compile-javascript</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-maven-plugin</artifactId>
                <goals>
                    <goal>compile</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>  

        <pluginExecution>
            <pluginExecutionFilter>
                    <groupId>org.wisdom-framework</groupId>
                    <artifactId>wisdom-asciidoc-maven-plugin</artifactId>
                <goals>
                    <goal>compile-asciidoc</goal>
                </goals>
                <versionRange>[0.0,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore/>
            </action>
        </pluginExecution>

    </pluginExecutions>
</lifecycleMappingMetadata>

I don't know where to put it, so i'll leave it here for the time being !

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Jan 9, 2014

Member

All these solutions are not suitable as the number of mojo to ignore can be extended. For instance, you forgot the myth plugin.

Anyway, could you contribute this to the documentation ?

On 9 janv. 2014, at 17:23, Nicolas Rempulski notifications@github.com wrote:

I was playing with wisdom in Eclipse while I got bored with m2e "plugin lifecycle not covered" errors.

For those interested, a very good m2e problems overview can be read here.
tl;dr : m2e requires another layer on top of maven plugins to know which goals to launch when Eclipse wants to build the workspace.

3 solutions :

Create a m2e connector for wisdom-maven-plugin and wisdom-asciidoc-maven-plugin. Basically, write an Eclipse plugin (nope)
Add in the plugins pom (very very verbose)
Add a local lifecyclemapping file in eclipse to tell m2e to ignore those plugins. Full compilation is then not handled by Eclipse automatic build (as it is now without a m2e connector). You can still build projects with Run as Maven ...
Here is the content of the lifecycle mapping file for wisdom (Preferences > Maven > Lifecycle Mappings):

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>initialize</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-configuration</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-assets</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-templates</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-coffeescript</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-less</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-javascript</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>  

    <pluginExecution>
        <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-asciidoc-maven-plugin</artifactId>
            <goals>
                <goal>compile-asciidoc</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

</pluginExecutions>
I don't know where to put it, so i'll leave it here for the time being !


Reply to this email directly or view it on GitHub.

Member

cescoffier commented Jan 9, 2014

All these solutions are not suitable as the number of mojo to ignore can be extended. For instance, you forgot the myth plugin.

Anyway, could you contribute this to the documentation ?

On 9 janv. 2014, at 17:23, Nicolas Rempulski notifications@github.com wrote:

I was playing with wisdom in Eclipse while I got bored with m2e "plugin lifecycle not covered" errors.

For those interested, a very good m2e problems overview can be read here.
tl;dr : m2e requires another layer on top of maven plugins to know which goals to launch when Eclipse wants to build the workspace.

3 solutions :

Create a m2e connector for wisdom-maven-plugin and wisdom-asciidoc-maven-plugin. Basically, write an Eclipse plugin (nope)
Add in the plugins pom (very very verbose)
Add a local lifecyclemapping file in eclipse to tell m2e to ignore those plugins. Full compilation is then not handled by Eclipse automatic build (as it is now without a m2e connector). You can still build projects with Run as Maven ...
Here is the content of the lifecycle mapping file for wisdom (Preferences > Maven > Lifecycle Mappings):

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>initialize</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-configuration</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-assets</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>copy-templates</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-coffeescript</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-less</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile-javascript</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

    <pluginExecution>
        <pluginExecutionFilter>
            <groupId>org.wisdom-framework</groupId>
            <artifactId>wisdom-maven-plugin</artifactId>
            <goals>
                <goal>compile</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>  

    <pluginExecution>
        <pluginExecutionFilter>
                <groupId>org.wisdom-framework</groupId>
                <artifactId>wisdom-asciidoc-maven-plugin</artifactId>
            <goals>
                <goal>compile-asciidoc</goal>
            </goals>
            <versionRange>[0.0,)</versionRange>
        </pluginExecutionFilter>
        <action>
            <ignore/>
        </action>
    </pluginExecution>

</pluginExecutions>
I don't know where to put it, so i'll leave it here for the time being !


Reply to this email directly or view it on GitHub.

@nicolas-rempulski

This comment has been minimized.

Show comment
Hide comment
@nicolas-rempulski

nicolas-rempulski Jan 9, 2014

Member

I entered the minimal set of plugins to ignore to stop m2e from whining. For some reasons, it still recongize some goals as valid...

I agree with you that neither of these solutions is suitable :

  • Writing a connector is very time consuming and enabling a very very strange maven integration in eclipse
  • Adding metadata in wisdom's poms will just add an enormous amount of lines for little or no use
  • Local lifecycile file is the worst solution, except all the others ;)

Anyway, I'll add this to the documentation as a tip to clear Eclipse errors due to poms

Member

nicolas-rempulski commented Jan 9, 2014

I entered the minimal set of plugins to ignore to stop m2e from whining. For some reasons, it still recongize some goals as valid...

I agree with you that neither of these solutions is suitable :

  • Writing a connector is very time consuming and enabling a very very strange maven integration in eclipse
  • Adding metadata in wisdom's poms will just add an enormous amount of lines for little or no use
  • Local lifecycile file is the worst solution, except all the others ;)

Anyway, I'll add this to the documentation as a tip to clear Eclipse errors due to poms

@cescoffier cescoffier closed this Jan 14, 2014

@cescoffier cescoffier added this to the 0.4.0 milestone Apr 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment