[ 
https://issues.apache.org/jira/browse/MCHECKSTYLE-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996464#comment-16996464
 ] 

Benjamin Marwell edited comment on MCHECKSTYLE-373 at 12/14/19 4:53 PM:
------------------------------------------------------------------------

[~vmoittie] you can do this already.

 

{{In your {color:#0747a6}pom.xml{color}}}{{, use this:}}

{{<properties>}}
 {{  {color:#c1c7d0}<!-- declare a default -->{color}}}
 {{  <checkstyle.version>8.19</checkstyle.version>}}
 {{</properties>}}
 {{<dependencyManagement>}}
 {{  <dependencies>}}
 {{    <dependency>}}
 {{      <groupId>com.puppycrawl.tools</groupId>}}
 {{      <artifactId>checkstyle</artifactId>}}
 {{      <version>${checkstyle.version}</version>}}
 {{  </dependency>}}
 {{</dependencyManagement>}}

 

Now you can build the way you described. Without, it would take the property 
from the {color:#0747a6}{{pom.xml}}{color}. With 
{color:#0747a6}{{-Dcheckstyle.version=8.24}}{color} it would use 
{color:#0747a6}{{8.24}}{color}.

Did this resolve your issue?

 


was (Author: mampf86):
[~vmoittie] you can do this already.

 

{{In your {{pom.xml}}}}{{, use this:}}



{{<properties>}}
 {{  <!-- declare a default -->}}
 {{  <checkstyle.version>8.19</checkstyle.version>}}
 {{</properties>}}
 {{<dependencyManagement>}}
 {{  <dependencies>}}
 {{    <dependency>}}
 {{      <groupId>com.puppycrawl.tools</groupId>}}
 {{      <artifactId>checkstyle</artifactId>}}
 {{      <version>${checkstyle.version}</version>}}
 {{  </dependency>}}
 {{</dependencyManagement>}}

 

Now you can build the way you described. Without, it would take the property 
from the pom.xml. With {{-Dcheckstyle.version=8.24}} it would use {{8.24}}.

Did this resolve your issue?

 

> Checkstyle version as properties
> --------------------------------
>
>                 Key: MCHECKSTYLE-373
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-373
>             Project: Maven Checkstyle Plugin
>          Issue Type: Improvement
>          Components: checkstyle:checkstyle
>    Affects Versions: 3.0.0
>            Reporter: Vincent Moittie
>            Priority: Major
>
> Hi,
>  
> As we can see in your documentation, the only way to choose specific 
> checkstyle version is to modify the pom.xml.
> So it will be nice to have a property to manage this in command line.
> Example :
> {code:java}
> -Dcheckstyle-version=8.18{code}
> So, from QA point of view, we can manage checkstyle version over all our java 
> projects, and there is no need to change project specific settings which are 
> still pom file.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to