Q:

Eclipse RCP Fragment How to Build library.jar

I have a plug-in fragment which contributes a jar file to the host plug-in, following these instructions. It works by creating a file library.jar which is specified in build.properties and associated with a directory which contains the source to be built.
It all works as expected, except I can't figure out how to cause library.jar to be created in Eclipse. When I run a Maven build that points to my fragment project and includes it as a module, the file library.jar shows up in the project directory. But building or cleaning the project in eclipse does not create the file.
I want other developers to be able to generate library.jar in their Eclipse workspace without running the Maven build. I'm really surprised that the Maven build creates libary.jar in the plug-in project itself, and not just in the product created in the build target. There should be a way to get Eclipse to do this without running the Maven build.
EDIT:
build.properties:
bin.includes = META-INF/,\
               library.jar
source.library.jar = src/

MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Custom
Bundle-SymbolicName: org.python.pydev.custom
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.python.pydev;bundle-version="5.1.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-PatchFragment: true
Bundle-ClassPath: library.jar,
 .
Require-Bundle: org.python.pydev.debug;bundle-version="5.5.0",
 org.eclipse.cdt.debug.core;bundle-version="8.0.0",
 org.apache.log4j

A:

Eclipse will build the library.jar rather than putting the class files in the normal place when the build.properties file looks like:
bin.includes = META-INF/,\
               library.jar
source.library.jar = src/

The library.jar entry in the bin.includes replaces the normal . entry.
The source.library.jar entry says that the Java files in the src directly should be put in the library.jar.
The Bundle-Classpath entry in your MANIFEST.MF should be:
Bundle-ClassPath: library.jar

(so no '.' entry)

