2.1.1. Creating and running a new project
Make sure you have created a Bear project with
bear --create <project>, or else you might want to do this at the project page. From this point we assume that you have a project in your
$PROJECT_HOME directory and Bear Maven project in
projects |-- my-project <-- $PROJECT_HOME |-- .bear <-- bear home directory |-- MyProject.groovy |-- pom.xml |-- project-file1.txt |-- project-file2.txt
If you don't have Idea installed, you may download a free version of Intellij Idea (CE, Apache Licensed) at Jetbrains site and install it to your computer.
Start Intellij Idea and create a new project. Make sure you point to the project home dir. You could also point to bear home directory and in this case you would need to customize root folder each time your create new deployment.
With this setup you can also quickly edit your original project files by pressing
Ctrl+Shift+N and typing a part of it's name.
3. It is recommended to enable Maven auto-import after the project is created to instantly reflect changes made to
- Import the bear module:
- To run the
ls()method select your project file on the left (1.) and place cursor at the
main()method in the editing window (2.). Then press
Ctrl+Shift+F10to run it. This will do two things: create a running configuration and then run it (3.):