Community
Participate
Working Groups
In my POM, for maven-checkstyle-plugin, I have something like this: <configuration> ... <propertyExpansion>basedir=${project.basedir}</propertyExpansion> </configuration> In my checkstyle.properties I have: header.file=target/checkstyle-header.txt Then, in my checkstyle.xml I have: <module name="Header"> <property name="fileExtensions" value="java"/> <property name="severity" value="error"/> <property name="headerFile" value="${basedir}/${header.file}"/> </module> However, when I try to "check code with checkstyle" in Eclipse I get the following error: cannot initialize module Header - unable to load header file C:Usersbeaudoinworkspace2gwtpgwtp-coregwtp-mvp-client/target/checkstyle-header.txt From this, it looks like that ${basedir} wrongfully got extended to "C:Usersbeaudoinworkspace2gwtpgwtp-coregwtp-mvp-client" when it should have been "C:/Users/beaudoin/workspace2/gwtp/gwtp-core/gwtp-mvp-client" I tried using ${basedir} instead of ${project.basedir} but it did not work. I started looking around here: http://www.google.com/codesearch#bgpu_i12kK4/tags/maven-2.0.2/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java but could not find any obvious bug. Note that it works if I hardcode the directory directly: <propertyExpansion>basedir=C:/Users/beaudoin/workspace2/gwtp/gwtp-core/gwtp-mvp-client</propertyExpansion> I have cross-posted the issue here: https://github.com/bimargulies/m2e-code-quality/issues/7 But I believe it belongs in m2e.
Found a workaround. Define: <properties> <prop.basedir>${basedir}</prop.basedir> </properties> And use: <configuration> ... <propertyExpansion>basedir=${prop.basedir}</propertyExpansion> </configuration>
(In reply to comment #1) > Found a workaround. Define: > <properties> > <prop.basedir>${basedir}</prop.basedir> > </properties> > > And use: > <configuration> > ... > <propertyExpansion>basedir=${prop.basedir}</propertyExpansion> > </configuration> Scratch that, workaround doesn't work.
Please provide complete standalone sample project and steps to reproduce the problem.
Closing old/stale bugreports.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/