Having issue while analyzing java

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

  • what are you trying to achieve:
    Trying to analyze java

what have you tried so far to achieve this:

  1. sonarqube docker running
  2. project created
  3. token created
  4. trying to do it through maven project
  5. wget the apache maven on /opt/
  6. export the PATH
  7. getting the following error while running the sonnar scanner command line:
    [INFO] Scanning for projects…
    [INFO] ------------------< org.apache.maven:standalone-pom >-------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] --------------------------------[ pom ]---------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.215 s
    [INFO] Finished at: 2020-04-20T21:29:00Z
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli): Goal requires a project to execute but there is no POM in this directory.
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException


The error is pretty explicit:

Since you’re apparently not using a Maven project, perhaps you want to use SonarScanner and provide a sonar-project.properties file.