You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Oliver Pehnke (JIRA)" <ji...@codehaus.org> on 2008/06/20 17:05:26 UTC
[jira] Created: (MECLIPSE-463) IdeUtils determine unresolved values
from maven-compiler-plugin
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
[jira] Commented: (MECLIPSE-463) IdeUtils determine unresolved
values from maven-compiler-plugin
Posted by "Jerome Lacoste (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MECLIPSE-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197049#action_197049 ]
Jerome Lacoste commented on MECLIPSE-463:
-----------------------------------------
Note I tested this on a project with maven 2.2.1 and the problem disappeared. So I guess the problem is related to maven not properly interpolating the values.
Can someone test also with maven 2.2.1 ?
See MECLIPSE-506
> 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