Troubleshooting Viewing and Running Samples from IntelliJ IDE

To view and build within IntelliJ, either set M2_HOME as an environment variable, or configure IntelliJ.

Perform this task from the command line.
Before you beginEnsure that M2_HOME is the location of your Maven installation. It should look something like the following.
/opt/maven/apache-maven-3.x.y 

You must have administrative privileges.

    Procedure
  1. Determine where Maven is installed.
    On Linux or Windows, type mvn -version.
    On a Mac, edit /etc/launchd.conf to add the following line:
    setenv M2_HOME <maven_home>