Here’s what happened (I’m using premium version of studio):
I have this “accounts” project. Already install as app components.
I have this “sales” project, and I want to use “accounts” as component of this project.
I realized that I have to use local maven repository, in order to use “accounts” project as component.
When I add local maven as repository, everything is work. Premium repo and local repo is working together. But whenever I add the project as component, the studio execute “Clean” and then only left me with local repo (IT AUTOMATICALLY DELETE THE PREMIUM REPO I HAVE MADE).
So, in this case. what should I do? And anothe rquestion is, after I add the component, I should be able to use the Entity in the component module in my primary ServiceBean right?
Sorry, I guess my question in the beginning is very confusing. Here it is, I’m trying to explain.
Whenever you want to use a CUBA app as component, you need to install them as app component right? And when you install that, it will be on the local maven repository, so you can get that later as dependency.
But on the other hand, you need cuba-plugin, etc, and you got that from online premium repository. Which means you need 2 repositories. One from local, one from online.
I can use local maven repository and online premium repository just fine. But, using studio, when I try to add app components from registered applications (which is one I already made, and already installed), studio execute gradle clean. And when it completes, it removes the online premium repository, leaves me with just local maven repo, and that’s why I cannot use cuba-plugin.
I already try to edit the build.gradle, and add the repository by myself. But if I do that, somehow the studio doesn’t recognize it. And it will be either I don’t have my app components as dependency (although the build.gradle already mention it) or that it will remove one of the repository from build.gradle again.
The premium repo is used for premium add-ons (reports, FTS, charts, BPM ). It means if you enable one of them in your project the ‘‘premium repo’’ is added to repositories. And we can see it in the build.gradle file.
Yes. I understand that what you’ve explained should be the logic that suppose to be done.
Maybe before I’d answer the questions first:
Studio version 6.3.4.
Both the project and components are using platform 6.3.6
I use the premium add-ons on the app (or main project, you call it as extension?).
After a lot of workaround, I’m rewrite the build.gradle by myself. By adding the mavenLocal() and premium repo by itself, and also it’s dependencies referring to the components. For now, I can run the application and it will create the database and I can use screens from the components.
But if I make changes through studio, it will automatically remove the premium repo again, (giving me only the local maven repository). So I guess, right now it’s a bug on studio. And I hope it can be fixed soon.
And another question, why although no error was found when running or assembling the application, but IDE (IntelliJ IDEA 2016.3 latest) still shows error on the class using the Entity from component. Although when build nothing goes error. This make me cannot use the services or Entity in my main project’s service bean. Do you have any idea about that?