Maven error in plugin org.scijava:scijava-maven-plugin:1.1.0

Hi SciJava and maven enthusiasts,

I was just updating my pom-scijava parent pom and can’t build clijs parent pom anymore. I think the issue is related to changing this:

    <parent>
        <groupId>org.scijava</groupId>
        <artifactId>pom-scijava</artifactId>
        <version>28.0.0</version>
    </parent>

to this:

    <parent>
        <groupId>org.scijava</groupId>
        <artifactId>pom-scijava</artifactId>
        <version>29.2.0</version>
    </parent>

I’m now retrieving this error message (full log below):

[ERROR] Could not find goal 'populate-app' in plugin org.scijava:scijava-maven-plugin:1.1.0 among available goals bump, copy-jars, eclipse-helper, help, install-artifact, set-rootdir, verify-no-snapshots -> [Help 1]

How can one debug these kinds of issues? Any hint is appreciated!

Cheers,
Robert

Full error log:

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\structure\code\clij-parent-pom "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\lib\idea_rt.jar=52456:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version2019.1 install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building clij-parent-pom 2.1.3.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.474 s
[INFO] Finished at: 2020-09-13T09:30:09+02:00
[INFO] Final Memory: 10M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'populate-app' in plugin org.scijava:scijava-maven-plugin:1.1.0 among available goals bump, copy-jars, eclipse-helper, help, install-artifact, set-rootdir, verify-no-snapshots -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException

Process finished with exit code 1

Do you override the version of scijava-maven-plugin anywhere in your ecosystem? As far as I can tell, the copy-jars goal was renamed to populate-app with scijava-maven-plugin-2.0.0, and any current version of pom-scijava is using that. So when you have an incompatible version of that plugin on your classpath, it might explain the errors you see.

1 Like

Hey Jan,

thanks for your reply!

“My ecosystem” in this context is just this single pom.xml file. As the bug goes away when switching back to pom-scijava 28.0.0, I conclude that issue is in the scijava ecosystem :wink:

I’ll try again with the next pom-scijava release.

Thanks again!

Cheers,
Robert

This is what I meant when asking “do you override the managed version?”:

Can you try removing this line, so that the version managed by latest pom-scijava (29.2.1) is used?

1 Like

Wow, thanks for spotting this!

However, it seem the suggested change leads us even deeper down the rabbit hole.

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\structure\code\clij-parent-pom "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\lib\idea_rt.jar=51734:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version2019.1 install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building clij-parent-pom 2.1.3.1
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.475 s
[INFO] Finished at: 2020-09-14T08:52:27+02:00
[INFO] Final Memory: 10M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.scijava:scijava-maven-plugin:2.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.scijava:scijava-maven-plugin:jar:2.0.0: Failure to find org.scijava:pom-scijava:pom:28.0.0 in https://dl.bintray.com/haesleinhuepf/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of bintray-haesleinhuepf-snapshots has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Process finished with exit code 1

It seems you are running the Maven build from within IntelliJ, right?

Can you try if it works from the command line?

For me, running mvn clean install from your maven_bugfix branch works just fine.

1 Like

Hey Jan,

thanks for staying with me.

Aside from solving this particular issue (no hurry, I can live with pom-scijava-28.0.0), I wonder if there is a good maven teaching resource that I could use to learn how to debug these kinds of issues myself. The maven website is a bit over-full with technical details. Did you read any good book about maven by chance?

Thanks!

Cheers,
Robert