Choose a Java integrated development environment (IDE) that supports Apache Maven and the Java Development Kit (JDK) required by your version of the ArcGIS Enterprise SDK. IntelliJ IDEA and Eclipse are supported examples used in the ArcGIS Enterprise SDK documentation. Other Java IDEs with compatible Maven and JDK support may also be suitable. You can use a compatible Java IDE to develop server object extensions and server object interceptors.

For the supported JDK, Maven, and IDE versions, see System requirements. Download and install your preferred IDE from its official website. For prerequisites and environment variable configuration, see Install Java and Maven.

The following instructions use IntelliJ IDEA. Other IDEs may provide different menus and Maven project configuration workflows.

IntelliJ troubleshooting tips

This section provides some tips on using IntelliJ IDEA to build and manage your Maven SOE or SOI project.

Configure the JDK in IntelliJ IDEA

Ensure that IntelliJ IDEA and Maven use a JDK supported by the target ArcGIS Enterprise SDK version. An incorrect JDK configuration can cause project import, compilation, or build failures.

1. Check the Maven project configuration

First, you must ensure the supported version of Java is configured for your custom extensions 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.

  1. Open the project's pom.xml file.
  2. Review the Java compiler settings in the <properties> section. The compiler release must be compatible with the target ArcGIS Server runtime and the SDK Maven archetype used to create the project.

For example, if the target project is configured to compile for Java 21, the properties can be written as follows:

Use dark colors for code blocksCopy
1
2
3
4
5
<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <maven.compiler.source>21</maven.compiler.source>
  <maven.compiler.target>21</maven.compiler.target>
</properties>

The JDK used to run Maven and the bytecode release specified in pom.xml are separate settings. Do not change the compiler target solely because a newer JDK is installed; follow the requirements for the SDK version and target ArcGIS Server release. For SDK 12.2, verify the compiler setting against the POM generated by the 12.2 Maven archetype before publishing this example as the default.

2. Check the Maven importer and runner JDKs

  1. In IntelliJ IDEA, open File > Settings.

  2. Go to Build, Execution, Deployment > Build Tools > Maven > Importing.

  3. Set JDK for importer to the supported JDK, or select Use JAVA_HOME if JAVA_HOME points to that JDK.

    install the java ide new1
  4. Go to Build, Execution, Deployment > Build Tools > Maven > Runner.

  5. Set JRE to the supported JDK. This setting controls the Java runtime used to execute Maven goals in IntelliJ IDEA.

    install the java ide new2

3. Check the project SDK

  1. Open the File menu and click Project Structure.

  2. Select Project under Project Settings.

  3. Set Project SDK to the supported JDK. Also verify the project's language level if it has been manually overridden.

    install the java ide new3

Configure Maven in IntelliJ IDEA

Before configuring Maven in IntelliJ IDEA, install a version supported by the ArcGIS Enterprise SDK. See System requirements for the supported version.

  1. Open File > Settings.

  2. Go to Build, Execution, Deployment > Build Tools > Maven.

  3. Set Maven home path (called Maven home directory in some IntelliJ IDEA versions) to a supported Maven installation.

    install the java ide new4
  4. Open a terminal and run:

    Use dark colors for code blocksCopy
    1
    2
    java -version
    mvn
  5. Confirm that the reported Java and Maven versions meet the SDK requirements. The mvn -version output also shows the Java runtime used by Maven from that terminal; IntelliJ IDEA's Maven runner may use a separately configured JDK.

Troubleshoot common errors

Maven cannot delete a generated JAR during clean

An error similar to the following may occur on Windows:

Use dark colors for code blocksCopy
1
2
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:...:clean
Failed to delete ...\target\example.jar

This usually indicates that another process has the generated file open or that the current user does not have permission to remove it.

  1. Stop any running process, test, or application that might be using the JAR file.
  2. Close file viewers or other tools that may be accessing the target directory.
  3. If the file is no longer in use, delete the generated file or the target directory, and rerun mvn clean.
  4. If the error persists, check file permissions and whether security software is locking the file.

You do not need to copy the entire project to a new directory as a routine troubleshooting step.

IntelliJ IDEA reports Cannot resolve symbol for ArcGIS Enterprise SDK classes

This can occur when IntelliJ IDEA cannot resolve the arcgis-enterprise-sdk dependency or when the project has not been imported correctly as a Maven project.

  1. Confirm that the ArcGIS Enterprise SDK is installed and that its required Maven artifacts have been installed in the local Maven repository. See Install the Maven artifacts.
  2. Check the SDK dependency in pom.xml, including its group ID, artifact ID, and version. The dependency version should match the installed SDK artifacts.
  3. In IntelliJ IDEA, open the Maven tool window and reload the Maven project to refresh dependencies.
  4. Run mvn clean compile in a terminal to determine whether the problem occurs in Maven or only in IntelliJ IDEA.
  5. If Maven builds successfully but IntelliJ IDEA still cannot resolve the SDK classes, try File > Invalidate Caches (or Invalidate Caches / Restart, depending on the IntelliJ IDEA version), and restart the IDE if prompted.

Also See

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.