Skip to content
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

mvn -Papp fixes #293

Closed
wants to merge 2 commits into from
Closed

Conversation

Grimler91
Copy link
Contributor

@Grimler91 Grimler91 commented Sep 10, 2021

Hi,

These commits fixes two build failures (tested with tag 2.2.0) on linux when building with mvn -Papp.

imagej-launcher-${imagej-launcher.version}.jar does not exist anymore, and was removed in a similar way from pom.xml in c3562b1. That commit also added net.imagej as a dependency, is that necessary for application.xml as well?

Currently, mvn -Dapp fails with something like:

    [INFO] --- maven-assembly-plugin:3.2.0:single (make-assembly) @ imagej ---
    [INFO] Reading assembly descriptor: src/main/assembly/zip.xml
    [WARNING] The assembly descriptor contains a *nix-specific root-relative reference (starting with slash). This is not portable and might fail on Windows: /Contents/Resources/
    [WARNING] The assembly descriptor contains a *nix-specific root-relative reference (starting with slash). This is not portable and might fail on Windows: /images/
    [WARNING] The assembly descriptor contains a *nix-specific root-relative reference (starting with slash). This is not portable and might fail on Windows: /images/
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  15.826 s
    [INFO] Finished at: 2021-09-10T13:43:20+02:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.2.0:single (make-assembly) on project imagej: Failed to create assembly: Error adding file to archive: /home/grimler/imagej2/src/imagej2-imagej-2.2.0/target/imagej-launcher-6.0.1.jar -> [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/MojoExecutionException

The same error (I think) was fixed for pom.xml in c3562b1 ("Fix
imagej-launcher dependency").
Currently, mvn -Papp fails with something like:

    [INFO] --- maven-assembly-plugin:3.2.0:single (make-assembly) @ imagej ---
    [INFO] Reading assembly descriptor: src/main/assembly/zip.xml
    [WARNING] The assembly descriptor contains a *nix-specific root-relative reference (starting with slash). This is not portable and might fail on Windows: /Contents/Resources/
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  16.036 s
    [INFO] Finished at: 2021-09-10T13:56:32+02:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.2.0:single (make-assembly) on project imagej: Failed to create assembly: Error adding file to archive: /home/grimler/imagej2/src/imagej2-imagej-2.2.0/./logo/ImageJ.icns -> [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/MojoExecutionException

The paths to the images was changed in d02516a ("ImageJ logo
update"), but the paths in application.xml not updated.
@Grimler91 Grimler91 changed the title mvn -Dapp fixes mvn -Papp fixes Sep 10, 2021
@ctrueden ctrueden closed this in 4bc751d Sep 10, 2021
@ctrueden
Copy link
Member

@Grimler91 Thanks for the fix! I ended up doing a more thorough cleanup of the icons, then cherry-picked your application.xml fix removing the explicit ImageJ Launcher JAR handling, since it is a regular dependency now with the rest. In my tests, mvn -Papp works again to generate the application zip; let me know if it doesn't work for you. I also filed #294 as a reminder to integrate the non-default Maven build profiles into the CI, so that we can catch when these things break more quickly next time.

@Grimler91
Copy link
Contributor Author

Great, thanks for the quick feedback! I can confirm that your commits as well, and the warnings seen in my commits are gone.

@Grimler91 Grimler91 deleted the application-fixes branch September 10, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants