for (Requirement requirement : artifact.getRequirements()) {
boolean matched = false;
for (Artifact a : chosenArtifacts) {
if (requirement.getName().equals(a.getName())) {
if (!requirement.matches(a.getName(), a.getVersion())) {
throw new ResolutionException("Requirement conflict: "
+ artifact.toShortString() + " depends on " + requirement + " but "
+ a.toShortString() + " is already selected.");
} else {
// check if the major version is different to throw a
// warning