IdeUtils determine unresolved values from maven-compiler-plugin
---------------------------------------------------------------

                 Key: MECLIPSE-463
                 URL: http://jira.codehaus.org/browse/MECLIPSE-463
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Bug
            Reporter: Oliver Pehnke


Background:
-----------------
In our project we use a profiles.xml where the properties of the project are 
configured. The profiles.xml contains also the following properties:
{code}
...
<project.javac.source>1.5</project.javac.source>
<project.javac.target>1.5</project.javac.target>
...
{code}                  
The maven-compiler-plugin is configured with these settings, like:
{code}
...
<artifactId>maven-compiler-plugin</artifactId>
                                <configuration>
                                        
<compilerVersion>${project.javac.compiler}</compilerVersion>
                                        <source>${project.javac.source}</source>
                                        <target>${project.javac.target}</target>
...
{code}

Problem:
------------
If you run the command:
{code}
mvn eclipse:eclipse
{code}
The plugin will create for each module a .project .classpath and a .settings 
folder containing a "org.eclipse.jdt.core.prefs" file. The content created 
looks like this:
{code}
#Fri Jun 20 16:48:19 CEST 2008
org.eclipse.jdt.core.compiler.codegen.targetPlatform=${project.javac.target}
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=${project.javac.source}
org.eclipse.jdt.core.compiler.compliance=${project.javac.source}
{code}
Of course Eclipse is unable to determine the version and will complain about an 
unknown version of the java source and target. 

Root of problem:
-----------------------
For me it seems the process of determining the target and source values in the 
class "IdeUtils" is the problem. The variables need to be resolved before using 
it. This is an issue of the used method "findCompilerPluginSettingInPlugins" or 
the maven API itself.

-- 
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

        

Reply via email to