Your [fleXive] project comes with basic project files for the Eclipse and IntelliJ IDEA Java IDEs.
If this is your first Eclipse project with [fleXive], first you have to define a new user library that includes the JAR files of your [fleXive] distribution. We also could include these files in the individual project classpath, but this way is much cleaner and easier to work with especially for multiple projects.
Please go to → → → →
Click
and enter
flexive
for the library name. Press
Select the created library entry, and press the button.
Go to your [fleXive] distribution directory, and select all JAR files
in the
lib/
folder (you can use shift-select here).
Repeat the last two steps and add all JAR files of the
extlib/
folder and the
flexive-plugin-jsf-core.jar
from the
applications/
folder to the user library.
In the User Libraries page, click OK. You have now defined a global flexive library that includes all required JAR files for a [fleXive] application. Note that this is only available within the IDE, the actual build files do not use the IDE-specific library definitions.
Assuming that both your
flexive-dist
directory and the newly created project reside in your current Eclipse workspace directory,
you can add the project following these steps:
Open → + →
Select the project root directory.
Press Eclipse should now open the project in the workspace. To build the project EAR file using Ant, execute →
To check if the project and library has been loaded correctly, try to open
the
EJBExampleBean
class using
→ (
Shift+Ctrl+T
)
Eclipse should display the source code without errors.
We start with creating a new project for the
flexive-test
application directory.
Open →
Select and press
Choose your [fleXive] project directory in Project file location.
Click
Uncheck Create module and click
Let IDEA open the project. Next we add the template module file in the IDEA project settings dialog:
Add a new module by clicking on the "+" button at the top of the screen.
Choose
Import existing module
and select the IDEA module file
(flexive-test.iml) in your project directory.
Press Finish.
If this is your first IntelliJ IDEA project with [fleXive], please perform the following setup steps. Similar to Eclipse, we use a shared library definition to include [fleXive] in the project classpath.
Open →
Click on
On the left-hand-side, click on →
Add a new library by clicking on the "+" button at the top of the screen.
Enter
flexive-dist
as the library name.
Select your project module in the next screen and press
In the library overview screen, select the flexive-dist library and add the
flexive-dist/applications,
flexive-dist/lib
and
flexive-dist/extlib
directories using the
button.
Now you should have all [fleXive] classes available in your project. You can
test this by opening the example EJB (
EJBExampleBean)
using
→ (
Ctrl+N
)
IDEA should not display any errors like missing classes.