Failed to produce a correct "org.eclipse.jdt.core.prefs" file with
eclipse:eclipse
----------------------------------------------------------------------------------
Key: MECLIPSE-537
URL: http://jira.codehaus.org/browse/MECLIPSE-537
Project: Maven 2.x Eclipse Plugin
Issue Type: Bug
Components: Core : Dependencies resolution and build path (.classpath)
Environment: Maven version: 2.0.7
Java version: 1.5.0_15
OS name: "windows xp" version: "5.1" arch: "x86"
Reporter: rrrrutdk
Priority: Critical
Two poms:
- pom A (some jar or war packaging project)
- pom P (parent pom of pom A)
The parent pom defines the configuration of maven-compiler-plugin as following:
bq. {code:xml}
<gropuId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${project.build.jdkVersion}</source>
<target>${project.build.jdkVersion}</target>
</configuration>
{code}
and has defined a property in the {{properties}} section:
bq. {code:xml}
<properties>
<project.build.jdkVersion>1.5</project.build.jdkVersion>
</properties>
{code}
I invoked the *{{eclipse:eclipse}}* goal on pom A, and then got the generated
Eclipse project descriptors.
The "org.eclipse.jdt.core.prefs" file produced in .settings folder wrote:
bq. {code}
#Thu Mar 26 15:04:05 CST 2009
org.eclipse.jdt.core.compiler.codegen.targetPlatform=${project.build.jdkVersion}
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=${project.build.jdkVersion}
org.eclipse.jdt.core.compiler.compliance=${project.build.jdkVersion}
{code}
The placeholder {{project.build.jdkVersion}} was not replaced with the correct
value (expected "1.5"), and finally my eclipse failed to identify the compiler
version.
After I moved the compiler plugin and the property to pom A from pom P, and
then executed {{eclipse:eclipse}}, and finally the eclipse-plugin worked, and
placeholder {{project.build.jdkVersion}} was replaced as I expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira