Skip to content

2.1.1. Creating and running a new project

chaschev edited this page Jan 18, 2014 · 5 revisions

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 $PROJECT_HOME/.bear/pom.xml.

|-- my-project            <-- $PROJECT_HOME
    |-- .bear             <-- bear home directory
        |-- MyProject.groovy
        |-- pom.xml
    |-- project-file1.txt
    |-- project-file2.txt
  1. 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.

  2. 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 pom.xml:

  1. Import the bear module:

  1. 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+F10 to run it. This will do two things: create a running configuration and then run it (3.):


You can’t perform that action at this time.