You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Dangel (JIRA)" <ji...@codehaus.org> on 2012/02/06 19:41:03 UTC

[jira] (MPMD-123) Add a custom ruleset file via command line

     [ https://jira.codehaus.org/browse/MPMD-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Dangel updated MPMD-123:
--------------------------------

    Attachment: 0001-Adding-possibility-to-specify-pmd.rulesets-as-a-comm.patch

Adds the expression to set the rulesets property.

However - this solution will only work with maven 3 (and break maven2!!).

Works for me with maven 3.0.3 at least.
                
> Add a custom ruleset file via command line
> ------------------------------------------
>
>                 Key: MPMD-123
>                 URL: https://jira.codehaus.org/browse/MPMD-123
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Improvement
>          Components: PMD
>         Environment: All
>            Reporter: Olivier Ribardière
>         Attachments: 0001-Adding-possibility-to-specify-pmd.rulesets-as-a-comm.patch
>
>
> I have plenty of maven projects and cannot really change their pom.xml, however my continuous integration tool runs pmd so I need to be able to specify my custom ruleset file (c:/toto/myrulesetfile.xml) directly in the maven command line. 
> Would be great if we could run "mvn pmd:pmd -Dpmd.rulesetfile=c:/toto/myrulesetfile.xml"
> (Of course if I could change the pom.xml I would have added 
> <configuration>
>           <rulesets>
>             <ruleset>d:\rulesets\strings.xml</ruleset>
> ... but I cannot change the pom.xml and via command line it is not possible to set a string[] parameter)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira