The maven dependency processor fails with the error below if we use variable paths:
Automatic Maven plan dependencies processing failed: org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs: [ERROR] 'dependencies.dependency.systemPath' for java:plugin.jar:jar must specify an absolute path but is ${java.home}\lib\plugin.jar @ line 23, column 16 05-Feb-2013 18:39:30 Finished task 'Maven Dependencies Processor'
Basically I replicate the issue by adding the below dependency to my pom.xml and configuring the processor task:
<dependency> <groupId>java</groupId> <artifactId>plugin.jar</artifactId> <systemPath>${java.home}/lib/plugin.jar</systemPath> <version>$ {java.version} </version> <scope>system</scope> </dependency>
Substituting java.home with the absolute path fixes the issue. Again running the command mvn help:effective-pom from DOS does indeed substituted correctly.