Question

I need to be able to include additional files with the JAR plugin and I am having difficulty finding documentation describing how to do this. When looking in the Eclipse/plugins directory it looks as if some plugins do this, implying it is possible.

When I right click my plugin project and select Export, it only allows me to export as a JAR. I am looking for a way to be able to package the plugin in a folder and in the folder have the JAR plugin and other files.

Thanks!

Was it helpful?

Solution 2

I ended up finding the easiest way was to just use Maven and create a distribution where I could layout the directory structure as I needed. I used a parent pom to first build the eclipse-plugin and then used that artifact as a dependency for a packaging module executed after the eclipse-plugin module. I saw some examples using Tycho to create products that allowed you to add contents to the root installation, specifically itp04 from here http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/tree/ however this seemed overkill for what I needed.

OTHER TIPS

There are a few ways to create unpacked plug-ins.

  1. When exporting a plug-in (Export > PDE > Deployable plug-ins and fragments) on the Options tab, turn off Package plug-ins as individual JAR archives.

  2. In the Feature Editor on the Plug-ins tab, select the plug-in you want unpacked and check the Unpack the plug-in archive after the installation.

Note that the some plug-ins in Eclipse are left unpacked to avoid nesting jars (jarred libraries inside of a jarred plug-in). PDE UI and PDE Build both support nested jars so it is not necessary to leave them unpacked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top