Hi

I'm trying to use the Checkstyle plugin with one central checkstyle.xml
configuration for all projects.
I set up a web server which has the file at
http://buildconfig.ipie.ch/checkstyle/checkstyle.xml

I configured this in my POM:
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <configuration>
 
<configLocation>http://buildconfig.ipie.ch/checkstyle/checkstyle.xml</co
nfigLocation>
            <enableRSS>false</enableRSS>
 
<includeTestSourceDirectory>true</includeTestSourceDirectory>
          </configuration>
        </plugin>

Then I used 'mvn -e -X checkstyle:checkstyle' on my project, but it
seems that the configLocation is read, but then ignored (?)

[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-checkstyle-plugin:2.2:checkstyle' -->
[DEBUG]   (f) cacheFile =
/ige/temp/continuous_integration/ipi-utils/time-util/target/checkstyle-c
achefile
[DEBUG]   (f) configLocation =
http://buildconfig.ipie.ch/checkstyle/checkstyle.xml
[DEBUG]   (f) consoleOutput = false
[DEBUG]   (f) enableFilesSummary = true
[DEBUG]   (f) enableRSS = false
[DEBUG]   (f) enableRulesSummary = true
[DEBUG]   (f) enableSeveritySummary = true
[DEBUG]   (f) encoding = UTF-8
[DEBUG]   (f) failsOnError = false
[DEBUG]   (f) format = sun
[DEBUG]   (f) headerFile =
/ige/temp/continuous_integration/ipi-utils/time-util/LICENSE.txt
[DEBUG]   (f) headerLocation = LICENSE.txt
[DEBUG]   (f) includeTestSourceDirectory = true
[DEBUG]   (f) includes = **/*.java
[DEBUG]   (f) linkXRef = true
[DEBUG]   (f) outputDirectory =
/ige/temp/continuous_integration/ipi-utils/time-util/target/site
[DEBUG]   (f) outputFile =
/ige/temp/continuous_integration/ipi-utils/time-util/target/checkstyle-r
esult.xml
[DEBUG]   (f) outputFileFormat = xml
[DEBUG]   (f) project = MavenProject: ch.ipi:time-util:1.0.0-SNAPSHOT @
/ige/temp/continuous_integration/ipi-utils/time-util/pom.xml
[DEBUG]   (f) skip = false
[DEBUG]   (f) sourceDirectory =
/ige/temp/continuous_integration/ipi-utils/time-util/src/main/java
[DEBUG]   (f) suppressionsFileExpression = checkstyle.suppressions.file
[DEBUG]   (f) testSourceDirectory =
/ige/temp/continuous_integration/ipi-utils/time-util/src/test/java
[DEBUG]   (f) xrefLocation =
/ige/temp/continuous_integration/ipi-utils/time-util/target/site/xref
[DEBUG] -- end configuration --
[INFO] [checkstyle:checkstyle]
[DEBUG] URLResourceLoader: Found
'http://buildconfig.ipie.ch/checkstyle/checkstyle.xml' at ''
[DEBUG] The resource
'http://buildconfig.ipie.ch/checkstyle/checkstyle.xml' found using the
[EMAIL PROTECTED]
[DEBUG] The resource 'LICENSE.txt' found using the
org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader
@58648016.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.

Embedded error: Failed during checkstyle configuration
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(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
...
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has
occurred in Checkstyle report generation.
        at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:79)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed
during checkstyle configuration
        at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:648)
        at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
ort.java:98)
        at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:73)
        ... 18 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
unable to read
/ige/temp/continuous_integration/ipi-utils/time-util/target/checkstyle-c
hecker.xml - unable to read from stream
        at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:309)
        at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:268)
        at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:607)
        ... 20 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
unable to read from stream
        at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:361)
        at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:298)
        ... 22 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)
...


>From what I understand, the configuration file is read and then copied
into the project, but I have no clue why Maven can't read it from there,
because it exists and I can read it (with the same user). Any ideas?

Btw, I since read that checkstyle:check should be used (since I'm not
using the 'site' goal). I tried that too, but it doesn't work either.

Best regards,
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to