This is purely speculation, but the properties that *made* are available to
the checkstyle plugin are most likely limited. So checkstyle is handed only
selected properties and not all (including the system properties). I can't
say anymore than this being speculation, but it would explain the situation.

Either checkout the src, or wait for someone who can more than speculate.


On Feb 14, 2008 12:38 AM, Silvio Arcangeli <[EMAIL PROTECTED]> wrote:

> Thanks a lot Andrew,
> that gave me some more idea.
> In my case i'm running maven manually, no daemon.
>
> I tested my JVM (Sun 1.5.0_13) with a very simple Java class that
> prints all the system properties, and user.home is indeed there:
> user.home = /home/silvio
>
> So the JVM system property is present and correct. I have no clue why
> checkstyle doesn't see it, seems like it gets overridden somewhere, or
> maybe the plugin looks for the property somewhere else than System?
>
> ciao,
> Silvio
>
> On Wed, Feb 13, 2008 at 12:20 PM, Andrew Hughes <[EMAIL PROTECTED]>
> wrote:
> > Unless it's a linux daemon running the maven process, I dont know what
> that
> >  would do to this property.....
> >
> >
> >
> >  On Feb 13, 2008 8:14 PM, Silvio Arcangeli <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi all,
> >  > I'm running Maven 2.0.8 on Linux (Ubuntu 7.10), and I'm having the
> >  > following error when i run mvn site on all of my projects:
> >  >
> >  > [INFO] Generating "Checkstyle" report.
> >  > [INFO]
> >  >
> ------------------------------------------------------------------------
> >  > [ERROR] BUILD ERROR
> >  > [INFO]
> >  >
> ------------------------------------------------------------------------
> >  > [INFO] Error during page generation
> >  >
> >  > Embedded error: Error rendering Maven report: Failed during
> checkstyle
> >  > configuration
> >  > Property ${user.home} has not been set
> >  > [INFO]
> >  >
> ------------------------------------------------------------------------
> >  > [INFO] Trace
> >  > org.apache.maven.lifecycle.LifecycleExecutionException: Error during
> >  > page generation
> >  >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> >  > (DefaultLifecycleExecutor.java:564)
> >  >        at
> >  >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> >  > (DefaultLifecycleExecutor.java:480)
> >  >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> >  > DefaultLifecycleExecutor.java:459)
> >  >        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
> :333)
> >  >        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java
> :126)
> >  >        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
> >  >        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: Error
> >  > during page generation
> >  >        at org.apache.maven.plugins.site.SiteMojo.execute(
> SiteMojo.java
> >  > :101)
> >  >        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> >  > DefaultPluginManager.java:447)
> >  >        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> >  > (DefaultLifecycleExecutor.java:539)
> >  >        ... 16 more
> >  > Caused by: org.apache.maven.doxia.siterenderer.RendererException:
> >  > Error rendering Maven report: Failed during checkstyle configuration
> >  >        at
> >  > org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(
> >  > ReportDocumentRenderer.java:149)
> >  >        at
> >  > org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(
> >  > DefaultSiteRenderer.java:269)
> >  >        at
> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(
> >  > DefaultSiteRenderer.java:101)
> >  >        at org.apache.maven.plugins.site.SiteMojo.renderLocale(
> >  > SiteMojo.java:129)
> >  >        at org.apache.maven.plugins.site.SiteMojo.execute(
> SiteMojo.java:96)
> >  >        ... 18 more
> >  > Caused by: org.apache.maven.reporting.MavenReportException: Failed
> >  > during checkstyle configuration
> >  >        at
> >  > org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(
> >  > CheckstyleReport.java:488)
> >  >        at org.apache.maven.reporting.AbstractMavenReport.generate(
> >  > AbstractMavenReport.java:98)
> >  >        at
> >  > org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(
> >  > ReportDocumentRenderer.java:139)
> >  >        ... 22 more
> >  > Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
> >  > unable to parse
> >  > /opt/SUI75/Workbench7.5/workspace/JMSConnector/target/checkstyle-
> >  > checker.xml
> >  > - Property ${user.home} has not been set
> >  >        at
> >  > com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration
> (
> >  > ConfigurationLoader.java:319)
> >  >        at
> >  > com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration
> (
> >  > ConfigurationLoader.java:267)
> >  >        at
> >  > org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(
> >  > CheckstyleReport.java:482)
> >  >        ... 24 more
> >  > Caused by: org.xml.sax.SAXException: Property ${user.home} has not
> been
> >  > set
> >  >        at
> >  >
> com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.startElement
> >  > (ConfigurationLoader.java:149)
> >  >        at
> >  >
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(
> >  > AbstractSAXParser.java:533)
> >  >        at
> >  >
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement
> >  > (AbstractXMLDocumentParser.java:220)
> >  >        at
> >  >
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(
> >  > XMLDTDValidator.java:819)
> >  >        at
> >  >
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
> >  > (XMLNSDocumentScannerImpl.java:322)
> >  >        at
> >  >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
> >  > (XMLDocumentFragmentScannerImpl.java:1693)
> >  >        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.ConfigurationLoader.parseInputStream(
> >  > ConfigurationLoader.java:254)
> >  >        at
> >  > com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration
> (
> >  > ConfigurationLoader.java:301)
> >  >        ... 26 more
> >  > [INFO]
> >  >
> ------------------------------------------------------------------------
> >  > [INFO] Total time: 18 seconds
> >  > [INFO] Finished at: Wed Feb 13 10:37:56 GMT+01:00 2008
> >  > [INFO] Final Memory: 28M/51M
> >  > [INFO]
> >  >
> ------------------------------------------------------------------------
> >  >
> >  >
> >  >
> >  > All other mvn commands I normally use (clean, install, package) are
> >  > working fine. In the .m2 subdir of my home directory i have a
> >  > checkstyle.properties file with the following properties:
> >  > checkstyle.cache.file=target/checkstyle-cache
> >  >
> >  > user.home=/home/silvio
> >  >
> >  > what am i missing? why does it complain about {user.home}? i even
> >  > tried running the following command:
> >  > mvn -Duser.home=/home/silvio site
> >  >
> >  > but it yelds to the same error. Any idea?
> >  >
> >  > thanks a lot!
> >  > Silvio
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to