Sentinel-2 Reader problem on development

Hello there,

When I try to “mvn clean install” module “s2tbx-s2msi-reader” it says

[ERROR] Project uses classes from transitive module org.esa.snap:snap-engine-utilities:jar:6.0.0 which will not be accessible at runtime.

So I add snap-engine-utilities as dependent jar and “mvn clean install” works fine.

But in runtime, when I tried to open an Sentinel-2 product it gives an error as following

java.lang.ClassNotFoundException: Will not load class org.apache.commons.io.IOUtils arbitrarily from one of ModuleCL@72952b88[org.esa.snap.snap.engine.utilities] and ModuleCL@9bd4cb3[org.esa.snap.snap.core] starting from ModuleCL@7cdf6f33[org.esa.s2tbx.s2tbx.s2msi.reader];

It is clear that both newly added snap-engine-utilities and snap-core defined “org.apache.commons.*” as public package and in runetime it gives error. But when I do not add snap-engine-utilities as dependent module to s2msi-reader it does not install.

Can anybody help me about that?

Hi,

which branch are you trying to build? Are you synchronized with git (https://github.com/senbox-org/s2tbx)?

I tried that at version 6.0.0 for all modules (snap-engine, snap-desktop, s2tbx)

It is working properly on my PC. What version of maven are you using?

It is “Apache Maven 3.3.9”.

Could you “mvn clean install” s2tbx-s2msi-reader without making module dependent on snap-engine-utilities?

Yes, I can. It should work without any modification by following this:

https://senbox.atlassian.net/wiki/spaces/SNAP/pages/10879039/How+to+build+SNAP+from+sources

I cleared all jars from maven repo *.\m2 and started to build and install from the beginning then it worked without any modifications on pom.xml