URL contributionURL = new URL(contribution.getLocation());
for (URI a : artifacts) {
URL artifactURL = packageProcessor.getArtifactURL(new URL(contribution.getLocation()), a);
// Add the deployed artifact model to the resolver
DeployedArtifact artifact = this.contributionFactory.createDeployedArtifact();
artifact.setURI(a.toString());
artifact.setLocation(artifactURL.toString());
contribution.getArtifacts().add(artifact);
modelResolver.addModel(artifact);
// Let the artifact processor read the artifact into a model
Object model = this.artifactProcessor.read(contributionURL, a, artifactURL);
if (model != null) {
artifact.setModel(model);
// Add the loaded model to the model resolver
modelResolver.addModel(model);
}