gephi / gephi-plugins

Repository for Gephi Plugins maintained by the team. Each plugin has it's branch.
269 stars 620 forks source link

Maven reports lifecycle config issue in generated POM.XML #248

Closed BoiseStateCS410 closed 2 years ago

BoiseStateCS410 commented 2 years ago

Building gephi-plugin on windows 11 w eclipse 4.22. and m2e v1.19.0, gephi-plugins 0.9.3, and gephi-maven-plugin v1.3. cloned gephi-plugins cloned gephi-maven-plugin in gephi-plugins folder, ran gephi-maven-plugin Generate It produced a pom.xml file. Here is a clip from that file (pseudonym added):

\<build>
       \<plugins>
            \<plugin>
                \<groupId>org.apache.netbeans.utilities\</groupId>
                \<artifactId>nbm-maven-plugin\</artifactId>
                \<configuration>
                    \<licenseName>Apache 2.0\</licenseName>
                    \<author>Wyatt Earp\</author>
                    \<authorEmail>WyattEarp9999@TombStoneSaloon.com\</authorEmail>
                    \<authorUrl>\</authorUrl>
                    \<sourceCodeUrl>https://github.com/gephi/gephi-plugins\</sourceCodeUrl>
                    \<publicPackages>
                        \<!-- Insert public packages -->
                    \</publicPackages>
                \</configuration>
            \</plugin>
        \</plugins>
    \</build>

At the third line, this fatal error is displayed: "Plugin execution not covered by lifecycle configuration: org.apache.netbeans.utilities:nbm-maven-plugin:4.5:manifest (execution: default-manifest, phase: process-classes)"

Guidance?

mbastian commented 2 years ago

Hi @BoiseStateCS410, can you provide a few more details as I'm not able reproduce the issue. What do you mean by third line exactly?

BoiseStateCS410 commented 2 years ago

Thanks for replying. Wasn't sure where to post the issue. The error is attached to the third line of the displayed code, the \ line. I've attached the following files. Each file name is prefixed with "I248" to link them with this issue:

I248Eclipse project outline.png A snapshot of the project tree.

I248Eclipse project outline

I248pomxml.txt The pom.xml file I248pomxml.txt

I248Snapshot of error report.png Showing the error report from eclipse

I248Snapshot of error report

I248manifestmf.txt The manifest.mf file I248manifestmf.txt

I hope these help. Sorry about the clumsy account name. I'm Mike.

BoiseStateCS410 commented 2 years ago

Possible resolution SOentrry I chose the solution proposed by Vedran in 2013, and applied the QuickFix.

Taking that step generated another errror: "Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project... from the project context menu or use Quick Fix. " I applied that QuickFix as well. Here is the resulting pom.xml fixed-pom-dot-xml-by-quick-fix-choice3.txt

These steps made the error go away. I'm not sure that I'm finished with this issue. As I understand it, these changes will now tell Maven to ignore this plugin, which can't be the correct solution. Reading further in the SO Entry I see that there are recommendations to change \\ to \\. A certain "M Bastian" further suggests that one add "\false|true\" as well. I will review these options as I progress.

Any comments or recommendations?

Might it be appropriate to add a revised and annotated version of the "Quick Fix" text to the generated pom.xml code? It would have saved me two days' delay.

mbastian commented 2 years ago

Hi, I tried it with Eclipse and I'm not able to reproduce this issue. I tried on a Mac so maybe it has to do with the OS but could also be the JRE or the maven version I'm not sure.

BoiseStateCS410 commented 2 years ago

This has been resolved. I built a "parent" gephi-plugins repository / project using gephi-maven-plugin, and added a layout plugin module using the GridLayout samples from gephi-plugins-bootcamp. I added build/plugin references in the GridLayout "child" plugin pom.xml file, which produced the error I reported. Those references appear to have conflicted with the references in the parent pom.xml file. I spent some time trying to fix this situation, following a number of leads and posts. In the end, the solution came from removing those build/plugin references, after which the "mvn package" command worked and I was able to execute gephi with the GridLayout plugin (using the "mvn org.gephi ... run" command noted in the documentation. I'm now working on refining the operation of the GridLayout plugin. After that I will continue to extend it. I'm confident I will be raising more questions here.