Compilation error - ant/taskdefs/Ant

I have a project made with Cuba Studio Browser Edition (6) and now I’ve tried to build with Cuba Application(7).
Unfortunately I have this error:
…Import project from external model (Gradle)

image

or

…Create project from existing sources

image

What is the difference between application (7) and browser edition (6)?
Please advise.

Hello @neutrino

Projects that use CUBA 6.* should be opened as IDEA Project.

So you have to create IDEA project files via CUBA Studio

image

or with Gradle task: gradlew idea

and then open *.ipr file with IJ IDEA.

Regards,
Daniil.

Thank you Daniil.
So the clue is that with Cuba Application we can use use Cuba Project like IDEA project, right?
Which are advantages (disadvantages)?

You have to import CUBA 6.* based projects as an Intellij IDEA project. But we’ve supported Gradle based import for projects that use 7 version of platform.

The main disadvantage of importing a project as an IDEA project is worse support for Gradle tools integrated into IJ IDEA.

1 Like

Hi @tsarev, opening an old (6.10) project by simply doing File -> Open -> .ipr file works but there is no CUBA menu.

Is it expected? Are there other methods to convert an old project, maybe involving some tweaks in the build files?

I ask this because if I decide to port an existing (production) project from 6.10 to 7, I want full support from the IDE from that moment on…

The actual conversion of old (maybe deprecated) code to the new APIs is another story, and it will be a much longer process, but the IDE should work at its full potential from the beginning IMHO.

Please advice, thank you very much.
Paolo

Hello @pfurini

I should add more details to be more clear:

If you’re using old CUBA plugin you should open a project as IDEA project.

If you’re using new CUBA plugin you should open a project as Gradle project, but only 6.10 version is supported in new plugin.

So there’s something I’m missing here too…

To try the new CUBA Studio with an existing project, I cloned a copy of the sample-account repo, and I simply opened it with the IDE.
Then I migrated it to 7.0 and that error started to pop out. I suspect it’s the same that happened to the OP of this thread: Error:org/apache/tools/ant/taskdefs/Ant - CUBA.Platform

So to clear all the confusion, what’s the correct and recommended way to convert a project built for CUBA 6.x to 7.x and at the same time being able to use all the features of the new CUBA plugin/Studio?

Unfortunately there are too “rough edges” in the new Studio to be used in production, and the fact that I cannot use my Ultimate IDEA (yet) will postpone the adoption of the new framework for my projects.
Honestly, I’d have preferred an updated Studio SE for CUBA 7.0, released in parallel with the new IDEA plugin, but I fear it’s too late to vote for that…

Could you clarify what distribution do you use and how project is imported?

As I can see the sample-akkount project can be successfully opened as Gradle project in our bundled version or in Intellij IDEA with new plugin and upgraded to the latest platform version (despite some code fixes):

  • open project build.gradle file and wait until project is imported
  • open project properties dialog and choose platform-7.0.1 option in Platform version field
  • click “OK” and proceed migration process

Since new Studio supports only 6.10 version of CUBA it is recommended to migrate a project to 6.10 version with old Studio, and then upgrade it to 7.0 with new Studio.

Studio SE was initially announced as experimental distribution and no support for CUBA 7 will be added, because Intellij IDEA integration brings a lot of benefits for our instrument.

Regards,
Daniil

I wonder if Cuba framework 7 is web based or only standalone application?

So I’ve probably missed something when opening it for the first time, I’ll try again ASAP. Regarding the code fixes, they’re in my fork here and I was going to open a PR, but I wanted to clarify this issue before, I didn’t want to PR something wrong in the first place…

Yes I know what you mean, IDEA is a powerful platform (despite being heavy and memory hungry) but I love the stability of the old SE, and I’m a bit worried about the time needed to achieve the same in the new plugin.

Thanks for your time,
P.

CUBA Platform (or Framework) is the actual application framework, it is based on several tech stacks like Spring, Vaadin, EclipseLink ORM and so on…
CUBA Studio is an (optional) RAD platform to create and develop applications based on the CUBA Platform/Framework.

Please see the FAQ here and follow the various links, it will help clarify your doubts: High productivity application development platform

NOTE: if your question was actually “does the new Studio offer a web based version?” the answer is NO, only the IntelliJ IDEA plugin will be developed/supported going forward

1 Like