Hi!
For possible future reference:
The way I ended up handling this is to unpack the jar using the maven
dependency plugin during the prepare-package phase:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<!-- unpack before package -->
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>my.group</groupId>
<artifactId>my.artifact</artifactId>
<version>${my.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/
unpackjars</outputDirectory>
<excludes>**/*.class</excludes>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}</
outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
and then define a custom resource like so:
<resources>
<resource>
<filtering>false</filtering>
<directory>${project.build.directory}/unpackjars</directory>
<includes>
<include>*.xml</include>
<include>*.properties</include>
</includes>
</resource>
</resources>
This works fine, maven bundle plugin picks up the configured maven
resources by default so there is no need to provide a customized
<Include-Resources> instruction to BND.
Still wondering wether there shouldn't be a more convenient way to do
this.
Regards,
Gebo
Op 29 dec 2010, om 11:39 heeft Gebo Uniken het volgende geschreven:
Hi!
I'm trying to osgi-ify a jar that has some configuration files in
the root folder of the jar:
some.jar:
META-INF
MANIFEST.MF
org
apache
etc.
someconfig.file
If I run BND/ maven bundle plugin 'someconfig.file' is not included
in the bundle. I tried <Include-Resource>someconfig.file</Include-
Resource> but that didn't work. What is the best way to handle this?
Thanks,
Gebo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]