maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter F. Peterson (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MCHECKSTYLE-78) Suppression filter is ignored
Date Fri, 19 Oct 2007 02:03:52 GMT

    [ http://jira.codehaus.org/browse/MCHECKSTYLE-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_110395
] 

Peter F. Peterson commented on MCHECKSTYLE-78:
----------------------------------------------

I've determined what was generating the error. It appears that the change in checkstyle between
2.0 and 2.1 is that it is now using validation when parsing. The offending line:
<!DOCTYPE suppressions PUBLIC  "-//Puppy Crawl/DTD Suppressions 1.0//EN" "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
is now
<!DOCTYPE suppressions PUBLIC  "-//Puppy Crawl//DTD Suppressions 1.0//EN" "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">

In case you can't see it, "Puppy Crawl/DTD" became "Puppy Crawl//DTD". The misdiagnoses is
a result of a poor error message

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.

Embedded error: failed to load suppressions location: /SNS/users/pf9/eclipse-workspace/sns-translation-core/src/checkstyle/suppressions.xml
Connection timed out

Which was not clear enough.

> Suppression filter is ignored
> -----------------------------
>
>                 Key: MCHECKSTYLE-78
>                 URL: http://jira.codehaus.org/browse/MCHECKSTYLE-78
>             Project: Maven 2.x Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Redhat Enterprise Linux, maven 2.0.6
>            Reporter: Peter F. Peterson
>             Fix For: 2.1
>
>
> Inside my pom I have 
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-checkstyle-plugin</artifactId>
>       <configuration>
> <!--
>         <configLocation>sns_checkstyle_config.xml</configLocation>
> -->
> <!--
>         <configLocation>config/sun_checks.xml</configLocation>
> -->
>         <suppressionsLocation>${basedir}/src/checkstyle/suppressions.xml</suppressionsLocation>
>         <headerLocation>LICENSE.txt</headerLocation>
>         <xrefLocation>xref</xrefLocation>
>       </configuration>
>     </plugin>
> And checkstyle fails to find the suppression file which is in the specified location.
Here is the abbreviated build messages
> [DEBUG] resolveLocation(null, checkstyle-packages.xml)
> [DEBUG] resolveLocation(/SNS/users/pf9/eclipse-workspace/sns-translation-core/src/checkstyle/suppressions.xml,
checkstyle-suppressions.xml)
> [DEBUG] Location is not a URL.
> [DEBUG] Potential File: /SNS/users/pf9/eclipse-workspace/sns-translation-core/src/checkstyle/suppressions.xml
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] An error has occurred in Checkstyle report generation.
> Embedded error: failed to load suppressions location: /SNS/users/pf9/eclipse-workspace/sns-translation-core/src/checkstyle/suppressions.xml
> Connection timed out
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in Checkstyle
report generation.
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:903)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:739)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:510)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Checkstyle
report generation.
>         at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         ... 19 more
> Caused by: org.apache.maven.reporting.MavenReportException: failed to load suppressions
location: /SNS/users/pf9/eclipse-workspace/sns-translation-core/src/checkstyle/suppressions.xml
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getSuppressions(CheckstyleReport.java:990)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeCheckstyle(CheckstyleReport.java:680)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(CheckstyleReport.java:484)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
>         ... 21 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read /SNS/users/pf9/eclipse-workspace/sns-translation-core/target/checkstyle-suppressions.xml
>         at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:159)
>         at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:128)
>         at org.apache.maven.plugin.checkstyle.CheckstyleReport.getSuppressions(CheckstyleReport.java:986)
>         ... 25 more
> Caused by: java.net.ConnectException: Connection timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:304)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:316)
>         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)
>         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)
>         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
>         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
>         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
>         at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
>         at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>         at com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(AbstractLoader.java:96)
>         at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:145)
>         ... 27 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 3 minutes 11 seconds
> [INFO] Finished at: Wed Oct 17 16:53:11 EDT 2007
> [INFO] Final Memory: 9M/299M
> [INFO] ------------------------------------------------------------------------
> This became a problem when checkstyle-plugin went to 2.1. Before then I had the suppression
file specified in the checkstyle configuration. The way to stop this error is to turn off
the suppression file, but then I get lots of StrictDuplicateCode errors due to a license being
repeated in every file (~100 files, ~16,000 duplicate code errors).

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

        

Mime
View raw message