Is there an example somewhere of a bundle project that includes only resources
(no Java classes) to make them available to other bundles?
I have a file a.txt. I put it in src/main/resources/dir1/dir2/a.txt. Then I
put this in my pom:
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>dir1/dir2</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
My intention is then to import this package in another bundle, then within Java
code in that other bundle use Pax Classpath to get a stream to a.txt and
process from there.
But I am blocked at creating the bundle. When I do a mvn install on the above
project/pom, it builds the bundle just fine, and puts dir1/dir2/a.txt in the
bundle jar. But there is no Export Package header in the manifest. And as
you'd expect after I install the bundle and do "headers [bundleid]" I do not
see an Export-Package header there.
Any ideas as to what I'm doing wrong?
Thanks.
--Scott