When clicking "Add Derby Nature" in the Derby UI Plugin, four entries are added to the .classpath of the project. These are lib type entries and the path references are absolute e.g.:
<classpathentry kind="lib" path="C:/eclipse/plugins/org.apache.derby.core_10.2.2/derby.jar"/>
<classpathentry kind="lib" path="C:/eclipse/plugins/org.apache.derby.core_10.2.2/derbyclient.jar"/>
<classpathentry kind="lib" path="C:/eclipse/plugins/org.apache.derby.core_10.2.2/derbytools.jar"/>
<classpathentry kind="lib" path="C:/eclipse/plugins/org.apache.derby.core_10.2.2/derbynet.jar"/>
This is problematic since absolute paths do not allow for sharing via an SCM repository like SVN or CVS. A better method for adding the entries would be to add them as var type entries relative to the ECLIPSE_HOME variable, or to add an IClasspathContainer (similar to the JRE System Library container) to the UI plugin that loads all four JARs as one entry. The latter is preferable because you can see all JARs as one entry in the Java perspective and you can expand the entry by clicking a twistie to see all of the individual entries. The former, however, is a much simpler fix requiring much less code modification/addition and less testing. This would result in .classpath entries like the following:
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.derby.core_10.2.2/derby.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.derby.core_10.2.2/derbyclient.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.derby.core_10.2.2/derbynet.jar"/>
<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.derby.core_10.2.2/derbytools.jar"/>
Since these entries are relative to ECLIPSE_HOME, they will be portable outside of the local machine and can thus be checked into an SCM repository without causing build path errors on another developer's machine.
I found a similar issue to this on JIRA at - https://issues.apache.org/jira/browse/DERBY-1931. This issue was more about the multiple entries crowding the UI, so maybe I should have opened a new issue. But I was not sure it was entirely different, esp since the first proposed solution of using an IClasspathContainer would solve both problems. Anyway, I commented on the specific issue of absolute paths, and I submitted a patch to the issue to produce the ECLIPSE_HOME relative var entries. Also, I did not see a checkbox for "Patch Available" like the Derby Development documentation describes. So, feedback would be much appreciated on any of the following:
1) Can someone tell me how to mark a JIRA issue as having a patch available, so that it gets shown on the Path Available list of issues.
2) Please comment on whether this issue is problematic for other users.
3) Developers please comment on whether the patch is a good candidate.
4) Please comment on whether this should be opened as a separate JIRA issue.
Aaron J Tarter