Unable to build SNAP from source - Failure on ZNAP Product Reader/Writer

Hi there,

I have followed the cookbook to build SNAP from source. So far, I have done:
mkdir snap
cd snap
git clone https://github.com/senbox-org/snap-engine.git
cd snap-engine
mvn clean install

The process ran for about 10 minutes, but failed when trying to complete ZNAP Product Reader/Writer


[INFO] ESA GlobCover Worldmap … SUCCESS [ 11.430 s]
[INFO] SNAP Smart Configurator … SUCCESS [ 5.403 s]
[INFO] SNAP Standalone Tool Adapter … SUCCESS [ 5.487 s]
[INFO] ZNAP Product Reader/Writer … FAILURE [ 7.124 s]

Upon this failure there was the error:

[ERROR] Failed to execute goal on project snap-znap: Could not resolve dependencies for project org.esa.snap:snap-znap:nbm:11.0.0-SNAPSHOT: The following artifacts could not be resolved: edu.ucar:udunits:jar:5.3.3 (absent), edu.ucar:httpservices:jar:5.3.3 (absent): Could not transfer artifact edu.ucar:udunits:jar:5.3.3 from/to snap-repo-public (Repository - Sonatype Nexus Repository): No PSK available. Unable to resume.

I was wondering if this error has been reproduced, if it is fixable, or if the SNAP build from source can be completed without ZNAP.

Thanks for any help! Will of course provide any additional information if needed.

I have:

  • apache-maven-3.9.6
  • jdk-22

[SOLVED] The build was successful after I added apache-maven-3.9.6 and jdk-22 to my paths in my .bashrc

export PATH=“<home_dir>/apache-maven-3.9.6/bin:$PATH”
export PATH=“<home_dir>/jdk-22/bin:$PATH”

Dear egreatrix,

you were building SNAP from the master branch, which is the development version. Although it should compile correctly - it does on all my development systems - it is more advisable to use a released branch.
You should check out the “10.x” branch, which we’re about to be releasing.

The Java specification for SNAP > 9 is JDK 11, so using JDK 22 might be a reason for the problems.
Please check also the developers documentation on building SNAP:
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/10879039/How+to+build+SNAP+from+sources

I will have more time after SNAP 10 release to dive into those problems …

With best regards,

Tom

2 Likes