On Thu, Jan 22, 2015 at 5:29 AM, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> Le mercredi 21 janvier 2015 14:44:27 Dennis Lundberg a écrit :
>> There is some piece of code in Checkstyle 5.9 that uses Java 6+
>> classes/methods. I don't remember where, but it isn't covered by our
>> integration tests.
> since our ITs use the 3 integrated rulesets, I suppose this is in a rule that
> isn't used by these rulesets
> Notice: the animalsniffer check you added doesn't check dependency jars full
> content?

No, and I don't think we can get that from our end. We had newer Java
versions leaking into Apache Rat, and I solved those by adding a
combination of animal-sniffer and enforcer plugin. But I don't think
that can check the sources of the dependencies. It's a mystery to me
how they managed to build Checkstyle 5.9 at all. When I check out the
5.9 tag from git and try to build it using Java 1.5 I get these
errors:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project checkstyle: Compilation failure:
Compilation failure:
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\DeclarationCollector.java:[29,17]
cannot find symbol
[ERROR] symbol  : class Deque
[ERROR] location: package java.util
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\DeclarationCollector.java:[99,37]
cannot find symbol
[ERROR] symbol  : class Deque
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.DeclarationCollector
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\coding\VariableDeclarationUsageDistanceCheck.java:[21,29]
java.util.AbstractMap.SimpleEntry is not public in
java.util.AbstractMap; cannot be accessed from outside package
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:[23,17]
cannot find symbol
[ERROR] symbol  : class NavigableMap
[ERROR] location: package java.util
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:[188,12]
cannot find symbol
[ERROR] symbol  : class NavigableMap
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:[244,12]
cannot find symbol
[ERROR] symbol  : class NavigableMap
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\whitespace\EmptyLineSeparatorCheck.java:[208,30]
cannot find symbol
[ERROR] symbol  : method isEmpty()
[ERROR] location: class java.lang.String
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:[119,14]
cannot find symbol
[ERROR] symbol  : class NavigableMap
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:[190,14]
cannot find symbol
[ERROR] symbol  : class NavigableMap
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\DeclarationCollector.java:[55,14]
cannot find symbol
[ERROR] symbol  : class Deque
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.DeclarationCollector
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\coding\VariableDeclarationUsageDistanceCheck.java:[348,36]
cannot find symbol
[ERROR] symbol  : method isEmpty()
[ERROR] location: class java.lang.String
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\coding\VariableDeclarationUsageDistanceCheck.java:[353,45]
cannot find symbol
[ERROR] symbol  : method isEmpty()
[ERROR] location: class java.lang.String
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\coding\VariableDeclarationUsageDistanceCheck.java:[453,19]
cannot find symbol
[ERROR] symbol  : class SimpleEntry
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\coding\VariableDeclarationUsageDistanceCheck.java:[544,19]
cannot find symbol
[ERROR] symbol  : class SimpleEntry
[ERROR] location: class
com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck
[ERROR] 
\Users\dlg01\git\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\imports\CustomImportOrderCheck.java:[616,30]
cannot find symbol
[ERROR] symbol  : method isEmpty()
[ERROR] location: class java.lang.String

>
>> I'll have a look at it tomorrow evening, and see if
>> I can produce an IT that catches it.
> yes, and if we find it, we'll open an issue to Checkstyle since that was not
> supposed to happen: that's what's told on release notes for Checkstyle 6.0

There's not much they can do about it at this time.

>>
>> Another thing that I have been thinking about is whether we should
>> move maven_checks.xml out of maven-checkstyle-plugin and into a
>> separate resource jar. The rationale being that we (the Maven project)
>> will probably be stuck using maven-checkstyle-plugin 2.14 (for Java 5
>> projects) and 2.15 (for Java 6 projects)
> just for sake of discussion about minimum Maven and Java requirements, I'd say
> it as:
> - maven-checkstyle-plugin 2.14 for projects built with Maven 2.2.1+Java 5
> requirements
> - maven-checkstyle-plugin 2.15 (or 3.0) for projects built with Maven 3+Java 6
> requirement, which is our next plugin requirement level (and associated
> numbering)

Sounds good

>> . What happens when 2.16 is
>> released and we want to change maven_checks.xml?
> I don't like the idea to have a plugin forcing Java requirement upgrade,
> especially when mostly a reporting plugin (since not everybody do Checkstyle
> checked builds)
> But that's another discussion: to be done later

I agree, let's have that discussion later on.

> yes, moving maven_checks.xml out of the plugin would be a solution.
> For our Maven projects, moving the file to Maven parent POM would be IMHO a
> good target: that's what others are supposed to do when they write their own
> ruleset, then why don't we do the same?
> Since Checkstyle 6.2 provides Sun (and Google) rulesets (see MCHECKSTYLE-268),
> removing maven_checks while removing sun_checks would fit, IMHO

Yes I see those fitting together nicely.

> And this could even fix my previous comment on 2.16: IMHO, our plugin should
> stay with Checkstyle 6.1 as default since it is the last with Java 6
> requirement, and end-users can upgrade Checkstyle independently as they want

I'm starting to lean towards this as well.

> then definitely, yes, moving maven_checks.xml out of maven-checkstyle-plugin 
> is
> definitely a good plan to me
> Just avoid a new resource jar: just use Maven parent POM.

But Maven parent POM has type=pom so we cannot add any files to it...
I was thinking of putting it into
http://maven.apache.org/shared/maven-shared-resources/
which is an existing resource project used for this purpose.

> Regards,
>
> Hervé
>
>>
>> On Wed, Jan 21, 2015 at 9:04 AM, Hervé BOUTEMY <herve.bout...@free.fr>
> wrote:
>> > Le vendredi 9 janvier 2015 13:29:06 Dennis Lundberg a écrit :
>> >> I've started going through the open issues and have found a problem
>> >> that I need som help with. It turns out that Checkstyle 5.9 uses Java
>> >> 6 classes, even though it is not mentioned in the release notes. How
>> >> do we want to handle this? I see two possible options:
>> >>
>> >> 1. Make version 2.14 of the plugin require Java 6, and update it to
>> >> use the latest available version of Checkstyle that runs on Java 6.
>> >>
>> >> 2. Revert the plugin back to Checkstyle 5.8 and release 2.14 of the
>> >> plugin with a Java 5 requirement. After that release 2.15 of the
>> >> plugin fairly straight away with a Java 6 requirement, and using the
>> >> latest available version of Checkstyle that runs on Java 6. It should
>> >> be noted that Checkstyle 5.8 does NOT work on Java 8 source code.
>> >>
>> >> Perhaps there are other alternatives? What do you think?
>> >
>> > I just built and ran ITs with Checkstyle 5.9 on JDK5 without any issue:
>> > can
>> > you check too? Since Checkstyle 5.9 supports Java 8 syntax, upgrading
>> > would be really great while keeping our plan for minimum Java version
>> > This is key before releasing
>> >
>> > Everyting else I wanted to fix/improve for the next release is done
>> > I'll be happy to vote on a release I'm not managing myself :)
>> >
>> > Regards,
>> >
>> > Hervé
>> >
>> >> On Thu, Jan 8, 2015 at 3:51 PM, Dennis Lundberg <denn...@apache.org>
> wrote:
>> >> > Hi,
>> >> >
>> >> > I'd like to release version 2.14 of Maven Checkstyle Plugin. The main
>> >> > motive for 2.14 is the ability to check Java 8 source code.
>> >> >
>> >> > According to the road map there are 5 unresolved issues scheduled for
>> >> > 2.14.
>> >> >
>> >> > https://jira.codehaus.org/browse/MCHECKSTYLE#selectedTab=com.atlassian.
>> >> > jir
>> >> > a.plugin.system.project%3Aroadmap-panel
>> >> >
>> >> > If anyone is interested in fixing one or more of these for 2.14 now
>> >> > would be a good time to do it. Just reply here with an estimated time
>> >> > frame. If noone has the time for this now, I'll reschedule those
>> >> > issues for 2.15, which will require Java 6.
>> >> >
>> >> > --
>> >> > Dennis Lundberg
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> > For additional commands, e-mail: dev-h...@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>



-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to