[JIRA] Created: (HUDSON-7105) Sonar plugin does not resolve "alternate settings file" correctly for Maven project

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-7105) Sonar plugin does not resolve "alternate settings file" correctly for Maven project

Hudson issues mailing list
Sonar plugin does not resolve "alternate settings file" correctly for Maven project
-----------------------------------------------------------------------------------

                 Key: HUDSON-7105
                 URL: http://issues.hudson-ci.org/browse/HUDSON-7105
             Project: Hudson
          Issue Type: Bug
          Components: sonar
    Affects Versions: current
            Reporter: allenservedio
            Assignee: sonarteam


The Sonar plugin does not resolve the alternate settings file configured for a Maven project properly.

I configured my Maven project with an "Alternate settings file" in the "Build" section. When the Sonar part of the build runs, it says that the settings file is invalid. I believe this is because it does not resolve the path to the settings file as the Maven build does (relative to the workspace) and so it cannot find the file.

Here is how the Maven build resolves the settings file called CRSReservationService-settings.xml:

Executing Maven:  -B -f /common/build/sdkhudsonhome/.hudson/jobs/CRSReservationService-trunk-sonar/workspace/trunk/pom.xml -s /common/build/sdkhudsonhome/.hudson/jobs/CRSReservationService-trunk-sonar/workspace/trunk/etc/hudson/CRSReservationService-settings.xml clean install

Here is how the Sonar part of the build tries to resolve it (as you can see, it uses a relative path and so is not correct):

[trunk] $ /common/build/tools/maven/apache-maven-2.0.10/bin/mvn -f pom.xml -s trunk/etc/hudson/CRSReservationService-settings.xml -e -B sonar:sonar -Dsonar.jdbc.driver=oracle.jdbc.driver.OracleDriver -Dsonar.jdbc.url=jdbc:oracle:thin:@server:0000:DB ******** ******** -Dsonar.host.url=http://localhost:8080/sonar/ -Dsonar.branch=trunk
+ Error stacktraces are turned on.
WARNING: Alternate user settings file: trunk/etc/hudson/CRSReservationService-settings.xml is invalid. Using default path.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-7105) Sonar plugin does not resolve "alternate settings file" correctly for Maven project

Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-7105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141294#action_141294 ]

sslavic commented on HUDSON-7105:
---------------------------------

I believe this is related to or even caused by HUDSON-4693.

> Sonar plugin does not resolve "alternate settings file" correctly for Maven project
> -----------------------------------------------------------------------------------
>
>                 Key: HUDSON-7105
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-7105
>             Project: Hudson
>          Issue Type: Bug
>          Components: sonar
>    Affects Versions: current
>            Reporter: allenservedio
>            Assignee: sonarteam
>
> The Sonar plugin does not resolve the alternate settings file configured for a Maven project properly.
> I configured my Maven project with an "Alternate settings file" in the "Build" section. When the Sonar part of the build runs, it says that the settings file is invalid. I believe this is because it does not resolve the path to the settings file as the Maven build does (relative to the workspace) and so it cannot find the file.
> Here is how the Maven build resolves the settings file called CRSReservationService-settings.xml:
> Executing Maven:  -B -f /common/build/sdkhudsonhome/.hudson/jobs/CRSReservationService-trunk-sonar/workspace/trunk/pom.xml -s /common/build/sdkhudsonhome/.hudson/jobs/CRSReservationService-trunk-sonar/workspace/trunk/etc/hudson/CRSReservationService-settings.xml clean install
> Here is how the Sonar part of the build tries to resolve it (as you can see, it uses a relative path and so is not correct):
> [trunk] $ /common/build/tools/maven/apache-maven-2.0.10/bin/mvn -f pom.xml -s trunk/etc/hudson/CRSReservationService-settings.xml -e -B sonar:sonar -Dsonar.jdbc.driver=oracle.jdbc.driver.OracleDriver -Dsonar.jdbc.url=jdbc:oracle:thin:@server:0000:DB ******** ******** -Dsonar.host.url=http://localhost:8080/sonar/ -Dsonar.branch=trunk
> + Error stacktraces are turned on.
> WARNING: Alternate user settings file: trunk/etc/hudson/CRSReservationService-settings.xml is invalid. Using default path.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]