Unable to compile snap on linux

I am trying to compile snap-engine and desktop 6.0 on linux. But facing following issue:

snap-ui does not seem to jar the class files. Issue being stale object.
This seems to get solved somehow on another machine.

Now after solving all the dependencies, when I reach the last module in snap-desktop,
snap desktop application, it is giving following error:

We could not find org-netbeans-bootstrap among the modules in the appliation. Launcher could not be found.

Just one more thing, I am now compiling it in offline mode with all the repos downloaded from internet to my local repository.

Kindly guide.

Ghansham

In general this should work. Our daily build are running on linux.
But why are you compiling version 6.0? Do you have special needs for it?
Have you checked out a certain tag or branch?
Can you provide the maven output, at least the interesting part?

As per your advice, I just pulled the latest master branch from


After that, I cleaned my local repository I compiled using maven (allowed maven to pull the jars to my local repo) using following command.

mvn install -DskipTests=true

When I was compiling, snap-engine. following jars I had to download manually from the maven central as the poms seem to be outdated:

ajt-2.11.jar
commons-net-3.3.jar
gt-coverage-17.1.jar
gt-main-17.1.jar
gt-render-17.1.jar
imageio-ext-geocore-1.3.2.jar
jama-1.0.3.jar
jhdf5.jar
jscience-4.3.1.jar
udunits-4.3.22.jar
commons-codec-1.9.jar
geoapi-2.2.0.jar
gt-data-17.1.jar
gt-metadata-17.1.jar
gt-shapefile-17.1.jar
imageio-ext-tiff-1.2.2.jar
javaml-0.1.7.jar
jhdf.jar
netcdf-4.3.22.jar
commons-io-2.5.jar
gt-api-17.1.jar
gt-epsg-hsql-17.1.jar
gt-referencing-17.1.jar
gt-xsd-gml3-17.1.jar
jai_imageio-1.1.jar
jcoord-1.0.jar
jpy-0.8.jar
nujan-1.4.1.1.jar

After this I am able to compile snap-engine successfully. But when I compiled snap-desktop.
I again encounter errors. And I had to download many jars again to compile some of the modules in snap-desktop. Following were the jars:

org-netbeans-api-annotations-common-RELEASE82.jar
org-openide-explorer-RELEASE82.jar
org-openide-util-lookup-RELEASE82.jar
org-openide-util-ui-RELEASE82.jar
org-netbeans-modules-options-api-RELEASE82.jar
org-openide-nodes-RELEASE82.jar
org-openide-util-RELEASE82.jar
org-openide-windows-RELEASE82.jar

Please see the stack trace below:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /data1/giwrk/nightly_build/snap-desktop/snap-ui/src/main/java/org/esa/snap/ui/SnapFileChooser.java:[29,40] package org.esa.snap.vfs.ui.file.chooser does not exist
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SNAP Desktop Project 8.0.0-SNAPSHOT ā€¦ SUCCESS [ 1.595 s]
[INFO] SNAP Desktop NB Branding 8.0.0-SNAPSHOT ā€¦ SUCCESS [ 3.689 s]
[INFO] SNAP Desktop Tango Icons 8.0.0-SNAPSHOT ā€¦ SUCCESS [ 4.467 s]
[INFO] SNAP Virtual File System UI 8.0.0-SNAPSHOT ā€¦ SUCCESS [ 4.051 s]
[INFO] SNAP User Interface Library 8.0.0-SNAPSHOT ā€¦ FAILURE [ 1.364 s]
[INFO] tiled-editors 1.0 ā€¦ SKIPPED
[INFO] doc-windows 1.0 ā€¦ SKIPPED
[INFO] Java NetBeans Launcher 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Main 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Desktop Rich Client Platform 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Graph Processing Framework (GPF) GUI 8.0.0-SNAPSHOT SKIPPED
[INFO] SNAP Remote Execution GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Graph Builder 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Classification UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Digital Elevation Models UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Help 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Land Cover UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Product Library UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Raster Operators UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Level-3 Binning GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Collocation GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Spectral Unmixing GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Watermask Operator GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Pixel Extraction Tool UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Virtual File System Preferences UI 8.0.0-SNAPSHOT SKIPPED
[INFO] SNAP WorldWind 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Standalone Tool Adapter GUI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Smart Configurator UI 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] SNAP Desktop NB Application 8.0.0-SNAPSHOT ā€¦ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.764 s
[INFO] Finished at: 2019-10-01T14:37:25+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project snap-ui: Compilation failure
[ERROR] /data1/giwrk/nightly_build/snap-desktop/snap-ui/src/main/java/org/esa/snap/ui/SnapFileChooser.java:[29,40] package org.esa.snap.vfs.ui.file.chooser does not exist

I would suggest you to check once by just flushing the local repository and pulling the master branch from github. Or there is any other source from where it can be downloaded.? Kindly guide.

The official version is 7.0, Iā€™d suggest you start with that.

@oana_hogoiu Could one of you check why this happens? Maybe, some dependency issue which only occurs when compiling the first time?

This error is coming because the expected vfs jar that is installed in local repo doesnt have classes. It shows stale message in maven compilation. Kindly help and guide.

Any update on this issue?

I have tried with snap 6.0, 7.0 and nightly builds. All have similar behavior. Someone should try a to clone the git repo in a fresh account and see most of the maven jars are not up to date for whatever reason it may be.

1 Like