parentArtifacts = parentArtifacts == null ? ImmutableSet.<ArtifactRange>of() : parentArtifacts;
if (parentArtifacts.isEmpty()) {
parentClassLoader = artifactClassLoaderFactory.createClassLoader(Locations.toLocation(artifactFile));
} else {
parentClassLoader = createParentClassLoader(artifactId, parentArtifacts);
<BUG>}
try {
ArtifactClasses artifactClasses = artifactInspector.inspectArtifact(artifactId, artifactFile, parentClassLoader);
ArtifactMeta meta = new ArtifactMeta(artifactClasses, parentArtifacts);</BUG>
return artifactStore.write(artifactId, meta, Files.newInputStreamSupplier(artifactFile));

parentArtifacts = parentArtifacts == null ? ImmutableSet.<ArtifactRange>of() : parentArtifacts;
if (parentArtifacts.isEmpty()) {
parentClassLoader = artifactClassLoaderFactory.createClassLoader(Locations.toLocation(artifactFile));
} else {
parentClassLoader = createParentClassLoader(artifactId, parentArtifacts);
}
validateParentSet(parentArtifacts);
try {
ArtifactClasses artifactClasses = artifactInspector.inspectArtifact(artifactId, artifactFile, parentClassLoader);
validatePluginSet(artifactClasses.getPlugins());
ArtifactMeta meta = new ArtifactMeta(artifactClasses, parentArtifacts);
return artifactStore.write(artifactId, meta, Files.newInputStreamSupplier(artifactFile));
