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 #606082] Wed, 16 June 2010 08: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(P roject.java:1056)
at org.eclipse.core.internal.resources.Project.setDescription(P roject.java:1082)
at de.fb12.gdt2.core.gt4.gt40.GT40Nature.addNature(GT40Nature.j ava:65)
at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToP roject(AddServiceToProject.java:146)
at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToP roject(AddServiceToProject.java:92)
at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.generate(G T40HeadlessRunner.java:291)
at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.run(GT40He adlessRunner.java:231)
at de.fb12.gdt2.headless.HeadlessRunner.start(HeadlessRunner.ja va:98)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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$AssertionFailed Exception: Path for IClasspathEntry must be absolute: file:/srv/www/MAGE/gdt/iHeadless/eclipse/plugins/de.fb12.gdt 2.core.gt4_1.0.0.201006161359.jar!/annotations/gt4_annotatio ns.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.AnnotationClasspathContainerIni tializer$1.getClasspathEntries(AnnotationClasspathContainerI nitializer.java:74)
at org.eclipse.jdt.internal.core.JavaModelManager.containerPutI fInitializingWithSameEntries(JavaModelManager.java:630)
at org.eclipse.jdt.internal.core.SetContainerOperation.executeO peration(SetContainerOperation.java:49)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaMod elOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1800)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperatio n(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathC ontainer(JavaModelManager.java:1816)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore .java:2652)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(J avaProject.java:2578)
at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspa th(ClasspathEntry.java:1528)
at org.eclipse.jdt.internal.core.SetClasspathOperation.verify(S etClasspathOperation.java:105)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperatio n(JavaModelOperation.java:782)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(Ja vaProject.java:2890)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(Ja vaProject.java:2921)
at de.fb12.gdt2.core.gt4.gt40.GT40Nature.configure(GT40Nature.j ava:176)
at org.eclipse.core.internal.resources.NatureManager$1.run(Natu reManager.java:143)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.resources.NatureManager.configureN ature(NatureManager.java:158)
at org.eclipse.core.internal.resources.NatureManager.configureN atures(NatureManager.java:203)
at org.eclipse.core.internal.resources.Project.basicSetDescript ion(Project.java:84)
at org.eclipse.core.internal.resources.Project.setDescription(P roject.java:1054)
at org.eclipse.core.internal.resources.Project.setDescription(P roject.java:1082)
at de.fb12.gdt2.core.gt4.gt40.GT40Nature.addNature(GT40Nature.j ava:65)
at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToP roject(AddServiceToProject.java:146)
at de.fb12.gdt2.core.gt4.gt40.AddServiceToProject.addServiceToP roject(AddServiceToProject.java:92)
at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.generate(G T40HeadlessRunner.java:291)
at de.fb12.gdt2.headless.gt4.gt40.GT40HeadlessRunner.run(GT40He adlessRunner.java:231)
at de.fb12.gdt2.headless.HeadlessRunner.start(HeadlessRunner.ja va:98)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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 #606094 is a reply to message #606082] Wed, 16 June 2010 11: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:Extracting plug-in jar in exported product
Next Topic:Resources (i.e messages.properties) in PDE Build not built into JAR correctly
Goto Forum:
  


Current Time: Fri Aug 22 23:38:07 EDT 2014

Powered by FUDForum. Page generated in 0.09610 seconds