Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Extracting plug-in jar in exported product
Extracting plug-in jar in exported product [message #540510] Wed, 16 June 2010 08:37 Go to next message
Eclipse UserFriend
Hi,

I have several plug-ins I want to export as a Product and run headless on the command line. This all works well, but then I have a problems during runtime: some of my plug-ins get extracted in the product's plugin folder while some remain inside JARs. How can I control this behavior? When exporting features, I can select which plug-ins get extracted within the feature.xml, but I didn't find a similar mechanism for Products.

If you wonder why I need the plug-in archive to be extracted, here's the reason:
org.eclipse.core.runtime.CoreException: Problems encountered while setting project description.
        at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1056)
        at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1082)
        at de.fb12.gdt2.core.gt4.gt40.GT40Nature.addNature(GT40Nature.java:65)
        at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToProject(AddServiceToProject.java:146)
        at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToProject(AddServiceToProject.java:92)
        at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.generate(GT40HeadlessRunner.java:291)
        at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.run(GT40HeadlessRunner.java:231)
        at de.fb12.gdt2.headless.HeadlessRunner.start(HeadlessRunner.java:98)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Contains: Error configuring nature 'de.fb12.gdt2.core.gt4.gt40.GT40Nature'.
org.eclipse.jdt.internal.core.ClasspathEntry$AssertionFailedException: Path for IClasspathEntry must be absolute: file:/srv/www/MAGE/gdt/iHeadless/eclipse/plugins/de.fb12.gdt2.core.gt4_1.0.0.201006161359.jar!/annotations/gt4_annotations.jar
        at org.eclipse.jdt.core.JavaCore.newLibraryEntry(JavaCore.java:4042)
        at org.eclipse.jdt.core.JavaCore.newLibraryEntry(JavaCore.java:3917)
        at de.fb12.gdt2.core.gt4.nature.AnnotationClasspathContainerInitializer$1.getClasspathEntries(AnnotationClasspathContainerInitializer.java:74)
        at org.eclipse.jdt.internal.core.JavaModelManager.containerPutIfInitializingWithSameEntries(JavaModelManager.java:630)
        at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:49)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
        at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
        at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1816)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:2652)
        at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2578)
        at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspath(ClasspathEntry.java:1528)
        at org.eclipse.jdt.internal.core.SetClasspathOperation.verify(SetClasspathOperation.java:105)
        at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:782)
        at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2890)
        at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2921)
        at de.fb12.gdt2.core.gt4.gt40.GT40Nature.configure(GT40Nature.java:176)
        at org.eclipse.core.internal.resources.NatureManager$1.run(NatureManager.java:143)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.resources.NatureManager.configureNature(NatureManager.java:158)
        at org.eclipse.core.internal.resources.NatureManager.configureNatures(NatureManager.java:203)
        at org.eclipse.core.internal.resources.Project.basicSetDescription(Project.java:84)
        at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1054)
        at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1082)
        at de.fb12.gdt2.core.gt4.gt40.GT40Nature.addNature(GT40Nature.java:65)
        at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToProject(AddServiceToProject.java:146)
        at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToProject(AddServiceToProject.java:92)
        at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.generate(GT40HeadlessRunner.java:291)
        at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.run(GT40HeadlessRunner.java:231)
        at de.fb12.gdt2.headless.HeadlessRunner.start(HeadlessRunner.java:98)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1287)


I need to add the annotations.jar to the runtime classpath inside my JDT instance (within the running headless product) to compile something... Or is there another way around this?

Cheers
Marian
Re: Extracting plug-in jar in exported product [message #540588 is a reply to message #540510] Wed, 16 June 2010 11:17 Go to previous message
Eclipse UserFriend
Try adding
Eclipse-BundleShape: dir
to the manifest of any plug-in that you want to be a folder.


Marian Harbach wrote:

> Hi,
>
> I have several plug-ins I want to export as a Product and run headless on
> the command line. This all works well, but then I have a problems during
> runtime: some of my plug-ins get extracted in the product's plugin folder
> while some remain inside JARs. How can I control this behavior? When
> exporting features, I can select which plug-ins get extracted within the
> feature.xml, but I didn't find a similar mechanism for Products.
>
Previous Topic:How to extend Eclipse's compare context menu?
Next Topic:Extracting plug-in jar in exported product
Goto Forum:
  


Current Time: Fri Jul 25 14:09:05 EDT 2025

Powered by FUDForum. Page generated in 0.25463 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top