[
http://jira.codehaus.org/browse/MECLIPSE-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106441
]
Chuck Daniels commented on MECLIPSE-253:
----------------------------------------
I would guess that you are seeing this issue because you have committed the
generated .classpath file to your source code repository. However, since this
file is generated (by the very plugin that these comments apply to), you should
not commit it. In fact, the general rule of thumb for any type of generated
file is to not commit it to source control. Since the file can be generated,
there is no need to commit it.
Each developer should simply run the eclipse:eclipse goal themselves. The path
to the tools.jar file will be correctly resolved for each developer, as long as
the tools.jar dependency is listed similar to the following:
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
Since the systemPath includes ${java.home}, the path will be properly resolved
when each developer runs the eclipse:eclipse goal.
You add the .classpath file to you "ignored" list (such as .cvsignore for CVS).
> eclipse:eclipse should use classpath variable JAVA_HOME or JDK_HOME when
> writing .classpath for tools.jar
> ---------------------------------------------------------------------------------------------------------
>
> Key: MECLIPSE-253
> URL: http://jira.codehaus.org/browse/MECLIPSE-253
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Environment: All.
> Reporter: Parag Mehta
>
> Classpath generated by eclipse:eclipse contains absolute reference to the jdk
> being used
> <classpathentry kind="lib" path="C:/app/Java/jdk1.5.0_11/lib/tools.jar"/>
> This creates a classpath that is not portable amongst multiple
> machines/developers (who may have the jdk installed elsewhere). Using
> variables like JAVA_HOME or JDK_HOME would yield a more portable result (like
> users are expected to define M2_REPO or the plugin can do so).
> <classpathentry kind="lib" path="JAVA_HOME/lib/tools.jar"/>
> Thanks.
--
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