After creating a new project, it won’t open because the build.gradle script is missing some repositories. If I edit the script and add the missing ones, the project then opens.
Could you share the build.gradle file from the created project?
Could you answer a couple of questions?
Did Studio report any errors during the project creation?
Which version of Studio do you use?
When you created the project which repository you chose in the “Repository” field?
I’m also getting this error message after adding the repositories manually:
[09:20:13.182] Task ‘updateDb, setupTomcat, deploy, start’ failed
org.gradle.api.UncheckedIOException: Could not HEAD ‘https://repo.cuba-platform.com/content/groups/premium/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.pom’. Received status code 401 from server: Unauthorized
I’m using Cuba studio 6.7
Removing my registration information and adding it in again solved the Gradle errors. Not sure why my registration is becoming invalid intermittently.
In prior cuba studio versions, the cuba work repository was added to build.gradle automatically, but build 6.7 has changed this convention to where you have to manually add it, which is a bit annoying since you can’t really do anything without the basics. My issue with the project not opening was caused by my not adding the work repository manually at project creation, my premium repository is added automatically, but not the work one which is a fundamental repo
Could you share the screenshot of repositories list of your project?
Open project properties and click the “gears” icon near the Repository field.
Platform artifacts are available not only in work (https://repo.cuba-platform.com/content/groups/work) repository but also in bintray(https://dl.bintray.com/cuba-platform/main).
Moreover, user can use private/proxy repository. So that is why we have implemented repository selection during a project creation.
If you have incorrect repository settings, you can bring them to defaults by deleting the ~/.haulmont/studio/cache/base-projects.xml. Bintray and work with correct credentials will be available for selection afterward.
There is no need to add premium repository to the “Known repositories list”, Studio will automatically write it to build.gradle, if required.