Configuring Eclipse Permalink to " Configuring Eclipse"
Importing your JHipster application in Eclipse will require a few manual steps. You will need to do some configuration:
- on the Maven side (for Maven users)
1. Import your project as a Maven project Permalink to "1. Import your project as a Maven project"
- Select File -> Import
- Choose “Existing Maven Projects”
- Select your project
- Click on “Finish”
At the end of the import phase, you can expect to see the below dialog. “Maven plugin connectors” are an extension for m2eclipse. That one should be installed and Eclipse will need to restart after completion.
If you have installed it already, you will be good to go and do not need to do anything.
Note: if you already have an existing JHipster project and have not installed the corresponding connector, you should see the below error:
Plugin execution not covered by lifecycle configuration: org.bsc.maven:maven-processor-plugin:2.2.4:process (execution: process, phase: generate-sources)
Select Quick Fix/Ctrl+1 (Cmd+1 on Mac) on the error marker and select “Discover new m2e connectors”
2. Excluding generated static folders Permalink to "2. Excluding generated static folders"
Exclude the ‘node_modules’ folder Permalink to "Exclude the ‘node_modules’ folder"
- Right-click on Project -> Properties -> Resource -> Resource Filters
- Select: Exclude all, Applies to folders, Name matches node_modules
- Press “Ok”
Exclude ‘app’ from src/main/webapp Permalink to "Exclude ‘app’ from src/main/webapp"
- Click on the “source” tab and select your_project/src/main/webapp
- Select “Excluded: (None) -> Edit -> Add multiple
appand click “Ok”
- The following folders should have been automatically excluded (if not, exclude them manually):
Maven IDE profile Permalink to "Maven IDE profile"
If you are using Maven, you need to activate the
IDE profile in Eclipse. This is used for applying IDE-specific tweaks, which currently only includes applying the MapStruct annotation processor.
- Right click on Project -> Properties -> Maven
- In “Active Maven Profiles”, type
With this configuration, you will be using both the JHipster
Configuring MapStruct plugins Permalink to "Configuring MapStruct plugins"
In case for the IDE correctly recognize the mapstruct code generator some more things needs to be done.
You should use the plugin m2e-apt (https://marketplace.eclipse.org/content/m2e-apt). Installing the m2e-apt plugin, enable Eclipse to work along with mapstruct.
Also you can install the plugin MapStruct Eclipse Plugin (https://marketplace.eclipse.org/content/mapstruct-eclipse-plugin) for help and tips from the IDE.