Uploaded image for project: 'Maven Checkstyle Plugin'
  1. Maven Checkstyle Plugin
  2. MCHECKSTYLE-324

cleanup debug "error messages" when using inline checkstyle rules (on windows)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Seems

      configLocation = rulesFiles.getAbsolutePath();
      

      should be

      configLocation = rulesFiles.toURI().toURL().toExternalForm();
      

      should use a URI instead of a file path for windows otherwise you get

      [DEBUG] URLResourceLoader: Exception when looking for 'C:\cygwin\drone\src\github.com\rmannibucau\crest\target\checkstyle-rules.xml' at ''
      
      java.net.MalformedURLException: unknown protocol: c
      
      	at java.net.URL.<init>(URL.java:600)
      
      	at java.net.URL.<init>(URL.java:490)
      
      	at java.net.URL.<init>(URL.java:439)
      
      	at org.codehaus.plexus.resource.loader.URLResourceLoader.getResource(URLResourceLoader.java:71)
      
      	at org.codehaus.plexus.resource.DefaultResourceManager.getResource(DefaultResourceManager.java:159)
      
      	at org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:91)
      
      	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.getConfigFile(DefaultCheckstyleExecutor.java:822)
      
      	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.getConfiguration(DefaultCheckstyleExecutor.java:378)
      
      	at org.apache.maven.plugin.checkstyle.exec.DefaultCheckstyleExecutor.executeCheckstyle(DefaultCheckstyleExecutor.java:217)
      
      	at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:538)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              romain.manni-bucau Romain Manni-Bucau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: