Set up IntelliJ IDEA
Optional
This step is optional, but Elastic Path recommends it. You can build and run Self-Managed Commerce from the command line without an IDE.
Elastic Path recommends IntelliJ IDEA.
Import the Source Code
- In the IntelliJ menu, select File > Open.
- Go to the root directory of the source code, for example
~/git/ep-commerce. - Click Open.
- Wait for the project to load and for indexing to complete.
Set the Project SDK
IntelliJ must use the Java 21 JDK. If IntelliJ uses a different JDK, Java classes do not resolve and you see this error:
Unable to provision, see the following errors:
1) Error in custom provider, java.lang.TypeNotPresentException: Type org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant not present
at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:4.0.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5c29bfd] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
while locating org.apache.maven.AbstractMavenLifecycleParticipant annotated with @com.google.inject.name.Named(value="TychoMavenLifecycleListener")
1 error
- Right-click the root project,
ep-commerce [commerce-parent]. - Click Open Module Settings.
- Go to Project Settings > Project.
- Set SDK to
zulu-21. - Right-click the root
pom.xmland select Maven > Reload Project.
Configure Maven in IntelliJ
- In the IntelliJ menu, select IntelliJ IDEA > Settings.
- Go to Build, Execution, Deployment > Build Tools > Maven.
- Set Maven home path to Bundled (Maven 3). Make sure that the Version field shows 3.9.1 or later.
- Go to Importing.
- Set VM Options for importer to
-Xmx3G. - Set JDK for importer to
zulu-21.
Turn off Deprecation Warnings
Deprecation warnings can cause build errors in IntelliJ.
- In the IntelliJ menu, select IntelliJ IDEA > Settings.
- Go to Build, Execution, Deployment > Compiler > Java Compiler.
- Under Javac Options, clear Report use of deprecated features.
Import the Code Style
The Elastic Path code style formats code to the Elastic Path standard.
- In the IntelliJ menu, select IntelliJ IDEA > Settings.
- Go to Editor > Code Style.
- Click the gear icon next to the scheme and select Import Scheme > IntelliJ IDEA code style XML.
- Select
devops/intellij/code-style.xmlin theep-commercesource code.

Install the Cucumber Plugins
Self-Managed Commerce tests use Cucumber feature files.
- In the IntelliJ menu, select IntelliJ IDEA > Settings.
- Go to Plugins.
- Make sure that Cucumber for Java and Gherkin are on the Installed tab. If a plugin is missing, find it on the Marketplace tab and click Install.
- Select File > Invalidate Caches and click Invalidate and Restart.
- Select File > File Properties > Associate with File Type.
- Enter the file pattern
*.feature, select Cucumber Scenario, and click OK.