scijava / pom-scijava

Friendly base POM for all SciJava-based software
https://imagej.net/BOM
The Unlicense
24 stars 33 forks source link

Build issue with scijava 28.0.0 #110

Closed haesleinhuepf closed 4 years ago

haesleinhuepf commented 4 years ago

Hi @ctrueden ,

I just updated some of my poms to parent pom-scijava 28.0.0 and replacing the image.app.directory with scijava.app.directory. I face some issues: Mvn install (I usually run -Dmaven.test.skip=true clean install) doesn't work anymore. It now brings this error (full log here)

[ERROR] Failed to execute goal org.scijava:scijava-maven-plugin:1.1.1:copy-jars (copy-jars) on project clijx_: Couldn't determine scijava.app.subdirectory for com.miglayout:miglayout:jar:swing:3.7.4: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id default @ line 138, column 18
[ERROR] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id default @ line 155, column 18
[ERROR] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id default @ line 172, column 18
[ERROR] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 232, column 21
[ERROR] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 243, column 21
[ERROR] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ line 383, column 21

Here is the pom file I'm trying to adapt.

Do I have to specify a scijava.app.subdirectory? If yes, what is it supposed to point at? If I add this line:

<scijava.app.subdirectory>C:/programs/fiji-win64/Fiji.app/</scijava.app.subdirectory>

The error message becomes:

[ERROR] Failed to execute goal org.scijava:scijava-maven-plugin:1.1.1:copy-jars (copy-jars) on project clijx_: Execution copy-jars of goal org.scijava:scijava-maven-plugin:1.1.1:copy-jars failed: Illegal char <:> at index 33: C:/programs/fiji-win64/Fiji.app/C:/programs/fiji-win64/Fiji.app/clijx_-0.26.1.jar -> [Help 1]

If I add instead

<scijava.app.subdirectory>scijava</scijava.app.subdirectory>

The error is again the original one.

Can you explain me, what this means? I'm a bit lost.

Thanks for your support!

Cheers, Robert

NicoKiaru commented 4 years ago

cf https://gitter.im/scijava/scijava-common?at=5e715c9e7037fe0c8d02809b

haesleinhuepf commented 4 years ago

Thanks, @NicoKiaru. I had a quick look. Does it mean there is no solution yet?

NicoKiaru commented 4 years ago

Not yet. I had to go back to 27.0.1

haesleinhuepf commented 4 years ago

Thanks @NicoKiaru 🙂

ctrueden commented 4 years ago

There is no full solution yet, but you probably don't have to go back to 27.0.1. Try setting <scijava-maven-plugin.version> to a previous version (try 1.1.0, and if that still fails, then try 1.0.0) in your <properties>.

You should not have to (and indeed should not ever) set the scijava.app.directory property in your POM—this is intended for local use only, and optional, for populating a local ImageJ/Fiji/SciJava application folder. It is orthogonal to the main build.

skalarproduktraum commented 4 years ago

Ups, didn't see this issue there, we have the same issue with deployment in sciview. Closing the dup. Thanks to @ctrueden for the better workaround than reverting to 27.0.1 👍

ctrueden commented 4 years ago

This issue is now fixed with scijava-maven-plugin 2.0.0 (IIRC, the fix was scijava/scijava-maven-plugin@90ba934437036ef92d78e29a8f461b2d1d4f973a), now available as part of pom-scijava 29.0.0-beta-1. However, I recommend waiting for pom-scijava 29.0.0 final release, to ensure all components are completely aligned. (There are a couple of remaining skewed versions in the beta-1 prerelease.)