You can now choose and install the Java integrated development environment (IDE) for your development environment. Most Java IDEs that support the Maven framework and JDK17 can be used to develop service interceptors, because IDEs like Eclipse and IntelliJ IDEA offer different Maven wizards and user interfaces, the specific steps for creating and managing SOE, SOI, or service-interceptor projects can differ slightly between environments.
Enterprise SDK documentation only demonstrates using Eclipse and IntelliJ IDEA.
You can download the Java IDE from the IDE's website and install the IDE.
IntelliJ troubleshooting tips
This section provides some tips on using IntelliJ IDEA to build and manage your Maven service interceptors project.
JDK settings in IntelliJ
First, you must ensure the supported version of Java is configured for your service interceptors project. Failure to do so will cause project compile errors and build failures. Before you continue, ensure you have the Java environment set up properly. You can refer to Install Java and Maven for more details. The following tips can be used to troubleshoot JDK-related errors in IntelliJ.
- From the project's POM
- Open the project's
pom.xmlfile. - Ensure the following properties are set:
Use dark colors for code blocks Copy <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> </properties>
- From Settings
-
Open the File menu and click Settings.
-
Browse to Build, Execution, Deployment > Build Tools > Maven on the left side of the Settings window.
-
Click Importing under the Maven menu. Ensure the supported version of Java is configured for JDK for importer.
-
Click Runner under the Maven menu. Ensure the supported version of Java is configured for JRE.
- From Project Structure
-
Open the File menu and click Project Structure.
-
Browse to Project Settings > Project on the left side of the Project Structure window.
-
Ensure the supported version of Java is configured for Project JDK.
Maven settings in IntelliJ
Before you configure the Maven settings at IntelliJ, you must ensure the supported version of Maven is installed correctly. Then, you can follow these steps to configure the supported version of Maven with your project in IntelliJ:
-
Open the File menu and click Settings.
-
Browse to Build, Execution, Deployment > Build Tools > Maven on the left.
-
Ensure the supported version of Maven is configured for Maven home directory.
Typical errors
-
"Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.9.9:clean (default-clean) on project xxx: Failed to clean project: Failed to delete C:\Users\xxx\IdeaProjects\xxx\target\xxx.jar"
This error indicates that IntelliJ is unable to delete the generated jar file from the
targetfolder. It usually happens when you do a Maven clean or a clean install of the project. You can try closing all the IntelliJ windows to completely shut down IntelliJ, and then either manually delete the jar file or reopen the project to do a Maven clean. If this doesn't work, you can copy and paste the entire project to a different location and try again with the copied project. -
"Cannot resolve symbol …" error for all the Java classes from ArcGIS Enterprise SDK (arcgis-enterprise-sdk.jar)
Try the following:
In IntelliJ, click the File menu > choose Invalidate Caches/Restart... > click Invalidate and Restart in the prompted dialog box.