Copying all required bundles to directory

I am looking for a way to copy all the bundles transitively required by a given Maven bundle module to a directory.

I found the bnd-export-maven-plugin which seems to create runnable JAR that would contain all the bundles. But I do not need a runnable JAR.

The maven-assembly-plugin won’t cut it either because I need the feature that the bnd-resolver-maven-plugin has which to consider bundles found in Maven’s dependency management section and not only bundles that are actual transitive dependencies when doing the resolving.

Optimally, I could tell the bnd-resolver-maven-plugin to resolve the requirements for a given bndrun file and copy them to a specified directory - but such a goal does not seem to exist in the bnd-resolver-maven-plugin.

Any ideas/pointers?

Looks like the bnd-export-maven-plugin does the trick. It was difficult to finds its documentation though. Simply searching for bnd-export-maven-plugin on google does not yield helpful results (for me).

<plugin>
	<groupId>biz.aQute.bnd</groupId>
	<artifactId>bnd-export-maven-plugin</artifactId>
	<version>6.4.0</version>
	<executions>
		<execution>
			<id>package</id>
			<phase>package</phase>
			<goals>
				<goal>export</goal>
			</goals>
			<configuration>
				<bndruns>
					<bndrun>src/main/osgi/package.bndrun</bndrun>
				</bndruns>
				<failOnChanges>false</failOnChanges>
				<includeDependencyManagement>true</includeDependencyManagement>
				<reportOptional>false</reportOptional>
				<scopes>
					<scope>compile</scope>
					<scope>runtime</scope>
				</scopes>
				<exporter>bnd.runbundles</exporter>
			</configuration>
		</execution>
	</executions>
</plugin>