This action will force synchronization from Jmix/CUBA 平台中国团队/cuba, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
These instructions are for contributing code to the core framework.
If you want to discuss your problem or ask something please use our forum: https://www.cuba-platform.com/discuss. Search through existing issues before adding a new one - there is a good chance someone has already faced the same problem. Comment on existing issues to let us know that it is relevant to you or to add more details.
All our projects accept contributions as GitHub pull requests. The first time you create a pull request, you will be asked to electronically sign a contribution agreement.
https://yangsu.github.io/pull-request-tutorial/ has instructions on how to create a pull request.
Remember to check the "Allow edits from maintainers" so we can rebase the PR or make small changes if necessary.
Usually, we create an issue for the PR in our internal bug tracker (YouTrack) and add the issue number to the PR title.
CUBA Platform consist of two main projects:
Let's assume that you have cloned CUBA Gradle Plugin and CUBA into the following directories:
work/ cuba/ cuba-gradle-plugin/
All CUBA build process details and Gradle tasks are implemented in cuba-gradle-plugin.
Open terminal in the work directory and run the following command to build and install the plugin into your local Maven repository (~/.m2):
> cd cuba-gradle-plugin > gradlew install
It will build and install -SNAPSHOT version of cuba-gradle-plugin required to build the platform.
After that, go to the CUBA directory and build and install it with the same command:
> cd ../cuba > gradlew install
If there are any errors during the compilation please check our public build status at https://travis-ci.org/cuba-platform Do not hesitate to report us any problems with build!
We use IntelliJ IDEA IDE for development.
In order to work on CUBA it has to be imported as a project in IntelliJ IDEA. To do that execute the following steps:
File > Open > CUBA root directory > build.gradle
See more details on how to import a project into IntelliJ IDEA.
CUBA itself can be running as an application with in-memory HSQL database. It is really handy if you want to check changes in the standard UI functionality, so you don’t need to create additional sample projects.
Start in-memory DB first:
> gradlew startDb createDb
Extract local tomcat instance (tomcat will be extracted to work directory on the same level as cuba and cuba-gradle-plugin directories):
> gradlew setupTomcat
Deploy and start cuba:
> gradlew deploy start
CUBA web UI will be available at http://localhost:8080/cuba/
Use the following command to deploy and restart application after small changes:
> gradlew restart
CUBA includes standard unit tests and integration tests that require in-memory database and Spring context. See this documentation section: https://doc.cuba-platform.com/manual-latest/testing.html
To start all the tests use the following command:
> gradlew startDb createTestDb test
Also, you can easily start particular test from IntelliJ Idea, but remember to start HSQL DB and create test database before running middleware integration tests.
Start the following command to run static code analysis:
> gradlew javadoc findbugsMain
We are looking forward to getting your contributions!