Unexpected behaviour of local repository

Hello, forum! I Set up Nexus on an “online computer” and built an empty project, as well as a project with bpm premium module. On a computer in an isolated network i set up Nexus and copied full repository from “online computer”, gained current user all rights to use repo folder. Created a project in CUBA Studio, it is built without any problem, but as i try to run it it throws a list of errors:

  • For an empty project:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app-core:deploy'.
> Could not resolve all files for configuration ':app-core:runtime'.
   > Could not find mybatis.jar (org.mybatis:mybatis:3.2.7).
     Searched in the following locations:
http://localhost:8081/nexus/content/groups/cuba-group/org/mybatis/mybatis/3.2.7/mybatis-3.2.7.jar

 - For a project with additional premium modules:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app-core:deploy'.
> Could not resolve all files for configuration ':app-core:runtime'.
   > Could not find commons-lang3.jar (org.apache.commons:commons-lang3:3.3.2).
     Searched in the following locations:
         http://localhost:8081/nexus/content/groups/cuba-group/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar
   > Could not find jcl-over-slf4j.jar (org.slf4j:jcl-over-slf4j:1.7.6).
     Searched in the following locations:
         http://localhost:8081/nexus/content/groups/cuba-group/org/slf4j/jcl-over-slf4j/1.7.6/jcl-over-slf4j-1.7.6.jar
   > Could not find jackson-core.jar (com.fasterxml.jackson.core:jackson-core:2.2.3).
     Searched in the following locations:
         http://localhost:8081/nexus/content/groups/cuba-group/com/fasterxml/jackson/core/jackson-core/2.2.3/jackson-core-2.2.3.jar
   > Could not find jackson-databind.jar (com.fasterxml.jackson.core:jackson-databind:2.2.3).
     Searched in the following locations:
         http://localhost:8081/nexus/content/groups/cuba-group/com/fasterxml/jackson/core/jackson-databind/2.2.3/jackson-databind-2.2.3.jar
   > Could not find jackson-annotations.jar (com.fasterxml.jackson.core:jackson-annotations:2.2.3).
     Searched in the following locations:
         http://localhost:8081/nexus/content/groups/cuba-group/com/fasterxml/jackson/core/jackson-annotations/2.2.3/jackson-annotations-2.2.3.jar

Selected *.jar files are sure to be in repository, I can access them from browser or from a local folder.

Hello Ivan,

Seems that your local Nexus did not cache the binaries.
Let’s check local Nexus repositories configuration.
As described in the manual Configure the Proxy Repository - CUBA Platform. Developer’s Manual , the repositories ‘cuba-work’ and ‘cuba-premium’ should be configured as a proxy. Then both repositories should be assembled to a group ‘cuba-group’.
public://attachments/17785816c2ce5fd85a40911d5b0f2dd4.png

Also, ensure that you removed all external repositories from your build.gradle.

Best regards,
Ivan Rabkesov
Haulmont

17785816c2ce5fd85a40911d5b0f2dd4

Hi,
Also, take note that Nexus caches binaries at the moment they are requested. And if you make the repository offline some of components which were not requested before might be unavailable.

Let me bring the example:

  1. When your nexus was online you worked with the project which had only web interface.
  2. After you have made the nexus offline you are trying to open and run a project with the desktop module. It is clear that you will not be able to work with that project as the required artifacts are missed in the repository and could not be downloaded.