You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hart, Leo" <Le...@FMR.COM> on 2008/04/24 23:56:13 UTC
maven-checkstyle-plugin basedir
I'm trying to migrating my build process from Ant to Maven and have been
struggling quite a bit so far.
I want to integrate CheckStyle into the build, so I've added the
following:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<failOnViolation>false</failOnViolation>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>config/CheckStyle Rules.xml</configLocation>
</configuration>
</plugin>
</plugins
</reporting>
My "CheckStyle Rules.xml" file is location in <project base
directory>/config.
I'm receiving the following error:
C:\workspace\shares>mvn checkstyle:check -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'checkstyle'.
[INFO]
------------------------------------------------------------------------
[INFO] Building shares
[INFO] task-segment: [checkstyle:check]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing checkstyle:check
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderRe
sourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
in any resource loader.
[INFO] Velocimacro : error using VM library template
VM_global_library.vm : org.apache.velocity.exception.Res
ourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
may NOT replace previous VM definition
s
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.
Embedded error: Failed during checkstyle configuration
Property ${basedir} has not been set
[INFO]
------------------------------------------------------------------------
[INFO] 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.forkProjectLifecycle
(DefaultLifecycleExecutor.j
ava:931)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul
tLifecycleExecutor.java:767
)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.
java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleEx
ecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.ja
va:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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 generati
on.
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)
... 19 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed
during checkstyle configuration
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:488)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
ort.java:98)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:73)
... 21 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
unable to parse C:\workspace\shares\target
\checkstyle-checker.xml - Property ${basedir} has not been set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:319)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:267)
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:482)
... 23 more
Caused by: org.xml.sax.SAXException: Property ${basedir} has not been
set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.start
Element(ConfigurationLoader
.java:149)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen
t(AbstractSAXParser.java:53
3)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
tyElement(AbstractXMLDocume
ntParser.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.scanSta
rtElement(XMLNSDocumentScan
nerImpl.java:322)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.di
spatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFrag
mentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1242)
at
com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(Abst
ractLoader.java:96)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(Con
figurationLoader.java:254)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:301)
... 25 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Apr 24 17:52:54 EDT 2008
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
C:\workspace\shares>
Now I'd assume ${basedir} is automatically set by Maven. Any idea why
I'm receiving this error? I've tried adding a project.properties file
next to pom.xml with the following:
maven.basedir=.
But that didn't help. I didn't see any mention of basedir problems on
the mailing list.
Thanks!
Leo
RE: maven-checkstyle-plugin basedir
Posted by "Hart, Leo" <Le...@FMR.COM>.
Brian,
I did as you suggested and changed configLocation to:
<configLocation>${basedir}/config/checkstyle-rules.xml</configLocation>
I'm getting the same message:
C:\workspace\shares>mvn checkstyle:check -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'checkstyle'.
[INFO]
------------------------------------------------------------------------
[INFO] Building shares
[INFO] task-segment: [checkstyle:check]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing checkstyle:check
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderRe
sourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
in any resource loader.
[INFO] Velocimacro : error using VM library template
VM_global_library.vm : org.apache.velocity.exception.Res
ourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
may NOT replace previous VM definition
s
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.
Embedded error: Failed during checkstyle configuration
Property ${basedir} has not been set
[INFO]
------------------------------------------------------------------------
[INFO] 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.forkProjectLifecycle
(DefaultLifecycleExecutor.j
ava:931)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul
tLifecycleExecutor.java:767
)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.
java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleEx
ecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.ja
va:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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 generati
on.
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)
... 19 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed
during checkstyle configuration
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:488)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
ort.java:98)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:73)
... 21 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
unable to parse C:\workspace\shares\target
\checkstyle-checker.xml - Property ${basedir} has not been set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:319)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:267)
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:482)
... 23 more
Caused by: org.xml.sax.SAXException: Property ${basedir} has not been
set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.start
Element(ConfigurationLoader
.java:149)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen
t(AbstractSAXParser.java:53
3)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
tyElement(AbstractXMLDocume
ntParser.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.scanSta
rtElement(XMLNSDocumentScan
nerImpl.java:322)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.di
spatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFrag
mentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1242)
at
com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(Abst
ractLoader.java:96)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(Con
figurationLoader.java:254)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:301)
... 25 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Apr 25 09:07:14 EDT 2008
[INFO] Final Memory: 5M/9M
[INFO]
------------------------------------------------------------------------
C:\workspace\shares>
Do I need to set ${basedir} explicitly somewhere?
_____
From: Hart, Leo
Sent: Thursday, April 24, 2008 5:56 PM
To: 'users@maven.apache.org'
Subject: maven-checkstyle-plugin basedir
I'm trying to migrating my build process from Ant to Maven and
have been struggling quite a bit so far.
I want to integrate CheckStyle into the build, so I've added the
following:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<failOnViolation>false</failOnViolation>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>config/CheckStyle
Rules.xml</configLocation>
</configuration>
</plugin>
</plugins
</reporting>
My "CheckStyle Rules.xml" file is location in <project base
directory>/config.
I'm receiving the following error:
C:\workspace\shares>mvn checkstyle:check -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix:
'checkstyle'.
[INFO]
------------------------------------------------------------------------
[INFO] Building shares
[INFO] task-segment: [checkstyle:check]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing checkstyle:check
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderRe
sourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound =>
'false'.
[INFO]
**************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using VM library template
VM_global_library.vm : org.apache.velocity.exception.Res
ourceNotFoundException: Unable to find resource
'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration
complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined
inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definition
s
[INFO] Velocimacro : allowInlineLocal = false : VMs defined
inline will be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.
Embedded error: Failed during checkstyle configuration
Property ${basedir} has not been set
[INFO]
------------------------------------------------------------------------
[INFO] 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.forkProjectLifecycle
(DefaultLifecycleExecutor.j
ava:931)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul
tLifecycleExecutor.java:767
)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.
java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleEx
ecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.ja
va:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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 generati
on.
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)
... 19 more
Caused by: org.apache.maven.reporting.MavenReportException:
Failed during checkstyle configuration
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:488)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
ort.java:98)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:73)
... 21 more
Caused by:
com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to parse
C:\workspace\shares\target
\checkstyle-checker.xml - Property ${basedir} has not been set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:319)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:267)
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:482)
... 23 more
Caused by: org.xml.sax.SAXException: Property ${basedir} has not
been set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.start
Element(ConfigurationLoader
.java:149)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen
t(AbstractSAXParser.java:53
3)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
tyElement(AbstractXMLDocume
ntParser.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.scanSta
rtElement(XMLNSDocumentScan
nerImpl.java:322)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.di
spatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFrag
mentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1242)
at
com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(Abst
ractLoader.java:96)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(Con
figurationLoader.java:254)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:301)
... 25 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Apr 24 17:52:54 EDT 2008
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
C:\workspace\shares>
Now I'd assume ${basedir} is automatically set by Maven. Any
idea why I'm receiving this error? I've tried adding a
project.properties file next to pom.xml with the following:
maven.basedir=.
But that didn't help. I didn't see any mention of basedir
problems on the mailing list.
Thanks!
Leo
Re: maven-checkstyle-plugin basedir
Posted by Dennis Lundberg <de...@apache.org>.
Are you using the text ${basedir} in your Checkstyle configuration file?
Hart, Leo wrote:
> I'm trying to migrating my build process from Ant to Maven and have been
> struggling quite a bit so far.
>
> I want to integrate CheckStyle into the build, so I've added the
> following:
>
> <reporting>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <configuration>
> <failOnViolation>false</failOnViolation>
> <enableRulesSummary>false</enableRulesSummary>
> <configLocation>config/CheckStyle Rules.xml</configLocation>
> </configuration>
> </plugin>
> </plugins
> </reporting>
>
> My "CheckStyle Rules.xml" file is location in <project base
> directory>/config.
>
> I'm receiving the following error:
>
> C:\workspace\shares>mvn checkstyle:check -e
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'checkstyle'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building shares
> [INFO] task-segment: [checkstyle:check]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing checkstyle:check
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderRe
> sourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] **************************************************************
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File:
> org\apache\velocity\runtime\defaults\velocity.properties
> [INFO] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated:
> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template :
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
> in any resource loader.
> [INFO] Velocimacro : error using VM library template
> VM_global_library.vm : org.apache.velocity.exception.Res
> ourceNotFoundException: Unable to find resource 'VM_global_library.vm'
> [INFO] Velocimacro : VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
> may NOT replace previous VM definition
> s
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
> be global in scope if allowed.
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [INFO] [checkstyle:checkstyle]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An error has occurred in Checkstyle report generation.
>
> Embedded error: Failed during checkstyle configuration
> Property ${basedir} has not been set
> [INFO]
> ------------------------------------------------------------------------
> [INFO] 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.forkProjectLifecycle
> (DefaultLifecycleExecutor.j
> ava:931)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul
> tLifecycleExecutor.java:767
> )
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:529)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
> l(DefaultLifecycleExecutor.
> java:512)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
> ifecycleExecutor.java:482)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Failures(DefaultLifecycleEx
> ecutor.java:330)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.ja
> va:291)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:142)
> at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.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 generati
> on.
> 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)
>
> ... 19 more
> Caused by: org.apache.maven.reporting.MavenReportException: Failed
> during checkstyle configuration
> at
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
> tyleReport.java:488)
> at
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
> ort.java:98)
> at
> org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
> rt.java:73)
> ... 21 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
> unable to parse C:\workspace\shares\target
> \checkstyle-checker.xml - Property ${basedir} has not been set
> at
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
> nfigurationLoader.java:319)
>
> at
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
> nfigurationLoader.java:267)
>
> at
> org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
> tyleReport.java:482)
> ... 23 more
> Caused by: org.xml.sax.SAXException: Property ${basedir} has not been
> set
> at
> com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.start
> Element(ConfigurationLoader
> .java:149)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen
> t(AbstractSAXParser.java:53
> 3)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
> tyElement(AbstractXMLDocume
> ntParser.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.scanSta
> rtElement(XMLNSDocumentScan
> nerImpl.java:322)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
> ragmentContentDispatcher.di
> spatch(XMLDocumentFragmentScannerImpl.java:1693)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
> canDocument(XMLDocumentFrag
> mentScannerImpl.java:368)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
> 1Configuration.java:834)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
> 1Configuration.java:764)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
> a:148)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
> actSAXParser.java:1242)
> at
> com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(Abst
> ractLoader.java:96)
> at
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(Con
> figurationLoader.java:254)
> at
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
> nfigurationLoader.java:301)
>
> ... 25 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Thu Apr 24 17:52:54 EDT 2008
> [INFO] Final Memory: 4M/8M
> [INFO]
> ------------------------------------------------------------------------
>
> C:\workspace\shares>
>
> Now I'd assume ${basedir} is automatically set by Maven. Any idea why
> I'm receiving this error? I've tried adding a project.properties file
> next to pom.xml with the following:
>
> maven.basedir=.
>
> But that didn't help. I didn't see any mention of basedir problems on
> the mailing list.
>
> Thanks!
> Leo
>
>
>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: maven-checkstyle-plugin basedir
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
That is a weird one, but try changing your configLocation to :
<configLocation>${basedir}/config/CheckStyle Rules.xml</configLocation>
This will give an absolute path to checkstyle. You also might want to
get rid of the space in the file name.
-----Original Message-----
From: Hart, Leo [mailto:Leo.Hart@FMR.COM]
Sent: Thursday, April 24, 2008 5:56 PM
To: users@maven.apache.org
Subject: maven-checkstyle-plugin basedir
I'm trying to migrating my build process from Ant to Maven and have been
struggling quite a bit so far.
I want to integrate CheckStyle into the build, so I've added the
following:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<failOnViolation>false</failOnViolation>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>config/CheckStyle Rules.xml</configLocation>
</configuration>
</plugin>
</plugins
</reporting>
My "CheckStyle Rules.xml" file is location in <project base
directory>/config.
I'm receiving the following error:
C:\workspace\shares>mvn checkstyle:check -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'checkstyle'.
[INFO]
------------------------------------------------------------------------
[INFO] Building shares
[INFO] task-segment: [checkstyle:check]
[INFO]
------------------------------------------------------------------------
[INFO] Preparing checkstyle:check
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderRe
sourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
in any resource loader.
[INFO] Velocimacro : error using VM library template
VM_global_library.vm : org.apache.velocity.exception.Res
ourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro : VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in
templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
may NOT replace previous VM definition
s
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
be global in scope if allowed.
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[INFO] [checkstyle:checkstyle]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.
Embedded error: Failed during checkstyle configuration
Property ${basedir} has not been set
[INFO]
------------------------------------------------------------------------
[INFO] 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.forkProjectLifecycle
(DefaultLifecycleExecutor.j
ava:931)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul
tLifecycleExecutor.java:767
)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:529)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.
java:512)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleEx
ecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.ja
va:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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 generati
on.
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)
... 19 more
Caused by: org.apache.maven.reporting.MavenReportException: Failed
during checkstyle configuration
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:488)
at
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenRep
ort.java:98)
at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:73)
... 21 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException:
unable to parse C:\workspace\shares\target
\checkstyle-checker.xml - Property ${basedir} has not been set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:319)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:267)
at
org.apache.maven.plugin.checkstyle.CheckstyleReport.executeReport(Checks
tyleReport.java:482)
... 23 more
Caused by: org.xml.sax.SAXException: Property ${basedir} has not been
set
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.start
Element(ConfigurationLoader
.java:149)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElemen
t(AbstractSAXParser.java:53
3)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emp
tyElement(AbstractXMLDocume
ntParser.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.scanSta
rtElement(XMLNSDocumentScan
nerImpl.java:322)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
ragmentContentDispatcher.di
spatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
canDocument(XMLDocumentFrag
mentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1242)
at
com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(Abst
ractLoader.java:96)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputStream(Con
figurationLoader.java:254)
at
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(Co
nfigurationLoader.java:301)
... 25 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Apr 24 17:52:54 EDT 2008
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
C:\workspace\shares>
Now I'd assume ${basedir} is automatically set by Maven. Any idea why
I'm receiving this error? I've tried adding a project.properties file
next to pom.xml with the following:
maven.basedir=.
But that didn't help. I didn't see any mention of basedir problems on
the mailing list.
Thanks!
Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org