[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Source locations in target platform use absolute paths

Petra,

All of us building plugins at Eclipse have this working the way I described.  I would expect your .classpath file to look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
    <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
    <classpathentry kind="output" path="bin"/>
</classpath>
There should be nothing in your project that prevents you from committing it to CVS and extracting it anywhere else.  As I say, we all do this today.  When a plugin is extracted from CVS, or extracted from an archive for that matter, the PDE will resolve all the required plugins (because of org.eclipse.pde.core.requiredPlugins) and compute the appropriate classpath for that installation.

What specifically are you seeing as a problem?


Petra Kritzinger wrote:
Hi Ed

Thanks for the advice. It would be excellent if I could do it the way you
suggest, to only use plugins. Problem is, if I create a new plug-in
project or SWT project, those JARs (from the Eclipse/plugin directory) are
automatically added by Eclipse (with the paths hard-coded).

If I want to implement the plug-in and/or SWT jars via a plugin (eg. using
menu option File > new > "plugin from existing JAR archive"), I would have
to manually add all the correct plugins that eclipse know to automatically
add (and also make sure the order is correct, I think).

Are there existing plugins containing all the correct jars? I'm referring
to the jars in the "Plug-in Dependencies" or "Standard Widget Toolkit
(SWT)" entries in the build path that are automatically created by
Eclipse. (I hope I'm making the problem clear! :-)


Ed Merks wrote:

  
Petra,

One way to avoid this is to use plugin projects exclusively, even if you
ultimately don't need plugins because in that case there will be no direct
references to any jars and the build results of a jarred plugin will work
fine as just something you put on the classpath.  When developing plugins,
you should NEVER modify the build path directly. You should only edit the
MANIFEST.MF and add dependencies via the Dependencies tab.  Any external
jars you have should be put into their own plugin(s) and then other
plugins that need these libraries will get them via plugin dependencies.