in src/main/java/org/apache/sling/maven/projectsupport/CreateBundleJarMojo.java [74:91]
private void addBundles() throws MojoExecutionException {
BundleList bundles = getInitializedBundleList();
for (StartLevel level : bundles.getStartLevels()) {
for (Bundle bundle : level.getBundles()) {
Artifact artifact = getArtifact(new ArtifactDefinition(bundle,
level.getStartLevel()));
final String destFileName = getPathForArtifact(level.getStartLevel(), bundle.getRunModes(), artifact.getFile().getName());
try {
jarArchiver.addFile(artifact.getFile(), destFileName);
} catch (ArchiverException e) {
throw new MojoExecutionException(
"Unable to add file to bundle jar file: "
+ artifact.getFile().getAbsolutePath(), e);
}
}
}
}