maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Marwell (Jira)" <j...@apache.org>
Subject [jira] [Commented] (MCHECKSTYLE-373) Checkstyle version as properties
Date Sat, 14 Dec 2019 16:53:00 GMT

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

Benjamin Marwell commented on MCHECKSTYLE-373:
----------------------------------------------

[~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)

Mime
View raw message