imagej / imagej-maven-plugin

[OBSOLETE] All goals migrated to scijava/scijava-maven-plugin
Other
4 stars 6 forks source link

Multi-module projects do not work(?) #30

Closed ctrueden closed 6 years ago

ctrueden commented 6 years ago

Try building BoneJ2 with an imagej.app.directory set and pom-scijava >= 21.0.0. (Specifically: imagej-maven-plugin 0.7.0 rather than 0.6.0.) The build fails with the following error:

[ERROR] Failed to execute goal net.imagej:imagej-maven-plugin:0.7.0:copy-jars (copy-jars) on project pom-bonej2: Couldn't resolve dependencies for artifact: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.bonej:pom-bonej2:jar:0.4.0-SNAPSHOT in imagej.public (http://maven.imagej.net/content/groups/public) -> [Help 1]

Running mvn -DskipTests clean install first does not alleviate the issue.

See also this conversation on Gitter.

rimadoma commented 6 years ago

More specifically the build runs with pom-scijava-20.1.0 but not with pom-scijava-20.2.0 or newer. However if I explicitly depend on imagej-maven-plugin-0.6.0, I can build with pom-scijava-21.0.0 as well.

rimadoma commented 6 years ago

Wait! Is the error just that the plug-in is now trying to look for aggregates whose packaging is JAR? pom-bonej2 has packaging pom. If that's the case, then I suspect the error was introduced in commit: https://github.com/imagej/imagej-maven-plugin/commit/a50d17e034ed110c0a6a318cf0f1653da8c2a12f. How would I debug the plug-in if I wanted to make a PR for the bug-fix?

ctrueden commented 6 years ago

@rimadoma wrote:

How would I debug the plug-in if I wanted to make a PR for the bug-fix?

If you have time to debug it, that would be fantastic. It should be as simple as building a SNAPSHOT version of the imagej-maven-plugin, and then using that version from the CLI:

cd imagej-maven-plugin
mvn clean install
cd ../my-project-for-testing
mvn net.imagej:imagej-maven-plugin:0.7.1-SNAPSHOT:copy-jars

Where 0.7.1-SNAPSHOT is the version you installed.

stelfrich commented 6 years ago

@rimadoma @ctrueden Sorry, this has been sitting for so long! This issue will be fixed with #35.