The Maven Alfresco SDK is designed to work well with IntelliJ IDEA. This support includes the ability to import existing Alfresco projects created using the Alfresco SDK.
Importing the Alfresco project into Intellij IDEA
Starting from IntelliJ IDEA, select File >
Open from the main menu to open the Alfresco project.
Note: Alternatively, select Import Project if you're running IntelliJ IDEA for the first time in your development environment.
After the project is imported, you will see a window similar to the
Running the Alfresco project from IntelliJ IDEA
To run the Alfresco project in IntelliJ IDEA you need to correctly configure the environment.
Click Run Configurations in the top right as shown:
- Click on the green plus (in top left) and select Maven to add a new Maven configuration.
- Enter your preferred name for the configuration. For example, My first all in one project.
- In the Working directory field, enter your project path.
Enter the Command line, for example
clean install alfresco:run.
- In the Runner tab, deselect the Use project settings checkbox.
Enter the VM Options and
- VM Options: -Xms256m -Xmx2G
- JRE: select 'Use JAVA_Home' (for example, /usr/lib/jvm/java-8-oracle)
The project is reorganized to represent the correct Maven structure as shown in your IDE.
To run your project, click on the green arrow on the top right of the window.
A new panel appears at the bottom of the window. In this panel you can check the log messages describing the Alfresco launch, as shown in your IDE.
- To stop the execution, click on the red button on the top right of the window.