Community
Participate
Working Groups
I20050419 1. Workspace started with -promiscuous 2. Contains org.eclipse.jdt.core only (no required project) 3. Clean/rebuild Observe: you get the following error: Build path contains duplicate entry: 'D:eclipse/sdk/eclipse/plugins/org.apache.ant_1.6.2/lib/ant.jar' for project org.eclipse.jdt.core
Note that org.eclipse.jdt.core was checked out from HEAD.
jdt.core has a redundant optional dependency on org.apache.ant in their manifest.mf. org.apache.ant is only needed to build and run the ant task. The reason why it's redundant is that in your build.properties file, you declare a jars.extra.classpath key referencing the ant lib jars you need. It is the jars.extra.classpath key that is used during the build process. The org.apache.ant dependency in the manifest.mf is an overhead as it adds about 27 jars to your classpath unnecessarily, one of which is the ant.jar. It is never used at runtime. PDE knows about the jars.extra.classpath key and takes it into account when computing the classpath. Therefore, your plugin will compile fine at development time too. Note that PDE always ensures that there are no duplicate entries in the classpath. However, this is a tricky case. A classpath entry that corresponds to a JAR referenced in the build.properties has no access restrictions on it. yet, a dependency via the manifest.mf does have access restrictions on it. So the two entries are technically unequal. So I see two choices: 1. (recommended) remove the org.apache.ant dependency and everything will be fine. PRO: less JARs on your classpath at runtime CON: you must always have org.apache.ant in your workspace when you try to export the jdt.core plugin, since the jars.extra.classpath key references a relative path. 2. Remove the jars.extra.classpath key from the build.properties PRO: you are not required to have org.apache.ant in your workspace to compile. CON: about 27 unnecessary JARs on your classpath at runtime.
actually, it appears that bug 91310 has been resolved for this week. This would mean that option 1 has no cons. Please do not do anything until I verify this and get back with a final recommendation.
Jerome - pls give a try to option 1.
I just verified that using I-20050426-1700, the pde/build fix is in. So if you do option 1, you will have no cons. You can verify that it works fine by trying to export jdt.core.
Thanks Wassim. I removed the dependency to org.apache.ant from MANIFEST.MF.
Undoing the change and reopening as the ant.jar entry is not added on Linux.
RequiredPluginsClasspathContainer#addExtraClasspathEntries
Bug 93088 is now fixed. Releasing the change to the MANIFEST.MF file.
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.