diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/transport/RemoteArtifactRepositoryManagerAgentFactory.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/transport/RemoteArtifactRepositoryManagerAgentFactory.java index 0fbf24d22e..f41fc4e2dc 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/transport/RemoteArtifactRepositoryManagerAgentFactory.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/transport/RemoteArtifactRepositoryManagerAgentFactory.java @@ -72,11 +72,11 @@ private boolean getDisableP2MirrorsConfiguration() { private String getMirrorProperty(String key) { String value = System.getProperty(key); - if (key == null && mavenContext.getSession() != null) { - key = mavenContext.getSession().getSystemProperties().getProperty(key); + if (value == null && mavenContext.getSession() != null) { + value = mavenContext.getSession().getSystemProperties().getProperty(key); - if (key == null) { - key = mavenContext.getSession().getUserProperties().getProperty(key); + if (value == null) { + value = mavenContext.getSession().getUserProperties().getProperty(key); } } return value;