Setting javax.net.ssl.trustStore Property test scope breaks dependency resolutuion

Does anyone know how I can insulate resolution from test properties?

After adding test scope setting of “javax.net.ssl.trustStore” I can no longer download artifacts from my http nexus installation. If I comment out the test scope property set the download works.

apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'maven-publish-auth'
apply plugin: "jacoco"
...
repositories {
  maven {
    url "http://mvn.mycorp:10000/nexus/content/groups/public"
  }
  mavenLocal()
}
  test {
    System.setProperty("javax.net.ssl.trustStore","$projectDir/mycorp.cacerts")
}
...

thanks

The correct way to set system properties for tests is:

test {
    systemProperty "javax.net.ssl.trustStore", "$projectDir/mycorp.cacerts"
    systemProperty ...
}

Oh, because otherwise it gets executed during config and impacts the entire project?

Because you need to instruct (configure) the ‘test’ task to set the system property in the test JVM(s), rather than directly setting the system property in the Gradle JVM.