The bundle plugin leans on bnd to generate the bundle, and bnd uses a
"pull" approach - meaning it only adds the content it's instructed to, it
doesn't just archive what's in target/classes.
The bundle plugin will attempt to map your maven configuration into bnd
instructions to include local classes and resources by default, but it does
this by looking at the original files and therefore may miss purely
generated files.
If you always want the bundle plugin to take everything in target/classes
then you could use this setting in a parent pom:
<Include-Resource>
/=${project.build.outputDirectory},{maven-resources}
</Include-Resource>
which can help when migrating legacy projects to OSGi. But often it's
better to be explicit about what you really want to include to avoid
pulling things in accidentally.
On 11 Jan 2015 19:21, "Benson Margulies" <[email protected]> wrote:
> I've got an execution of the depends-maven-plugin, and, as a result, I have
> target/classes/META-INF/maven/dependencies.properties file. But that file
> does not end up in the bundle's JAR file.
>
> I do not supply my own Include-Resource, I'm just using the defaults.
>
>
>
>
> <plugin>
> <groupId>org.apache.servicemix.tooling</groupId>
> <artifactId>depends-maven-plugin</artifactId>
> <version>1.2</version>
> <executions>
> <execution>
> <id>generate-depends-file</id>
> <phase>generate-resources</phase>
> <goals>
> <goal>generate-depends-file</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>