public ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass,
String... exportPackages) throws Exception {
Manifest manifest = new Manifest();
if (exportPackages.length > 0) {
manifest.getMainAttributes().put(ManifestFields.EXPORT_PACKAGE, Joiner.on(',').join(exportPackages));
<BUG>}
Location appJar = AppJarHelper.createDeploymentJar(locationFactory, appClass, manifest, CLASS_ACCEPTOR);
addArtifact(artifactId, appJar);
return artifactManagerFactory.create(artifactId);</BUG>
}

public ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass,
String... exportPackages) throws Exception {
Manifest manifest = new Manifest();
if (exportPackages.length > 0) {
manifest.getMainAttributes().put(ManifestFields.EXPORT_PACKAGE, Joiner.on(',').join(exportPackages));
}
return addAppArtifact(artifactId, appClass, manifest);
}
