Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:37 Go to next message
Marian Harbach is currently offline Marian Harbach
Messages: 11
Registered: October 2009
Junior Member
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 15:17 Go to previous message
Andrew Niefer is currently offline Andrew Niefer
Messages: 990
Registered: July 2009
Senior Member
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: Wed Sep 03 04:41:56 GMT 2014

Powered by FUDForum. Page generated in 0.05765 seconds