Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.1.0-M1
-
Fix Version/s: 2.1.0-M1
-
Component/s: Inheritance and Interpolation
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
From Paul Benedict, on the maven dev list:
My issue might be related to MNG-3535.
I defined this property:
<java.version>1.6</java.version>
And used it in my compiler plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
I know this use to work before 2.0.10, but now it does not.
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.6.0_06
Usage: javac <options> <source files>
use -help for a list of possible options
The error here is that ${java.version} is not the value I specified,
but one that already exists.
Paul
I've replicated the problem in a separate test mock-up project.
Issue Links
| This issue is related to: | ||||
| MNG-3535 | Valid properties which look self referential fail to resolve |
|
|
|
I am not quite sure what the correct solution is. Obviously, properties like java.version are really important, and if they can be overridden, that might lead to some unpredictable expectations.
I'd rather Maven err if such properties like java.* exist. However, if it is pre-existing behavior, maybe it's worth continuing.... but I must admit I feel that my code was inappropriate to use that property namespace.