mirror of https://github.com/apache/maven.git
parent
29e7b0ea3c
commit
968c1a25f5
|
@ -194,8 +194,11 @@ public class DefaultArtifactDescriptorReader implements ArtifactDescriptorReader
|
||||||
modelRequest.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);
|
modelRequest.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL);
|
||||||
modelRequest.setProcessPlugins(false);
|
modelRequest.setProcessPlugins(false);
|
||||||
modelRequest.setTwoPhaseBuilding(false);
|
modelRequest.setTwoPhaseBuilding(false);
|
||||||
modelRequest.setSystemProperties(toProperties(session.getSystemProperties()));
|
// This merge is on purpose because otherwise user properties would override model
|
||||||
modelRequest.setUserProperties(toProperties(session.getUserProperties()));
|
// properties in dependencies the user does not know. See MNG-7563 for details.
|
||||||
|
modelRequest.setSystemProperties(
|
||||||
|
toProperties(session.getUserProperties(), session.getSystemProperties()));
|
||||||
|
modelRequest.setUserProperties(new Properties());
|
||||||
modelRequest.setModelCache(modelCacheFactory.createCache(session));
|
modelRequest.setModelCache(modelCacheFactory.createCache(session));
|
||||||
modelRequest.setModelResolver(new DefaultModelResolver(
|
modelRequest.setModelResolver(new DefaultModelResolver(
|
||||||
session,
|
session,
|
||||||
|
@ -248,9 +251,14 @@ public class DefaultArtifactDescriptorReader implements ArtifactDescriptorReader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Properties toProperties(Map<String, String> map) {
|
private Properties toProperties(Map<String, String> dominant, Map<String, String> recessive) {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.putAll(map);
|
if (recessive != null) {
|
||||||
|
props.putAll(recessive);
|
||||||
|
}
|
||||||
|
if (dominant != null) {
|
||||||
|
props.putAll(dominant);
|
||||||
|
}
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue