Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6028

Sonar Failing to find pom.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Hudson 1.352
      Sonar Plugin 1.4

      In a recent Hudson update the Root POM location changed for my projects. Within the configuration I had to change the location to be "trunk/pom.xml" when I use to have just pom.xml. Once I changed to the "trunk/pom.xml" my sonar reports started failing stating that it can't find the POM. Below is the error.

      I do have another project where I have left the setting as "pom.xml" and it is running fine through sonar even though the Hudson config page is stating that there is an error. As such I am not sure if this is specifically a Sonar issue or Hudson core.

      [trunk] $ /var/lib/hudson/tools/Maven_2.2.1/bin/mvn -f trunk/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=****** ******** ******** -Dsonar.host.url=******
      + Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'sonar'.
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Default Project
      [INFO]    task-segment: [sonar:sonar] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Cannot execute mojo: sonar. It requires a project with an existing pom.xml, but the build is not using one.
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute mojo: sonar. It requires a project with an existing pom.xml, but the build is not using one.
      

            Unassigned Unassigned
            tuatara tuatara
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: