title: groovy.lang.MissingPropertyException: No such property
body: <p>I am trying to build the project but I am getting below error:</p>
  
  <pre><code>groovy.lang.MissingPropertyException: No such property: nexusUrl for class: org.gradle.api.internal.project.DefaultProject_Decorated
      at org.gradle.api.internal.plugins.ExtraPropertiesDynamicObjectAdapter.setProperty(ExtraPropertiesDynamicObjectAdapter.java:46)
      at org.gradle.api.internal.CompositeDynamicObject.setProperty(CompositeDynamicObject.java:122)
      at com.abc.gradle.plugins.nexus.staging.tasks.CreateStagingRepositoryTest.can set custom description(CreateStagingRepositoryTest.groovy:138)
  </code></pre>
  
  <p>I tried to add <code>nexusUrl</code> to <em>gradle.properties</em> file (as suggested by many) but it doesn't work too.</p>
  
  <p>I want to know what does this error actually mean. Also, please suggest me workaround.</p>
  
  <p>I am using <em>org.spockframework:spock-core:1.0-groovy-2.4</em></p>
  
  <p>Here's build.gradle:</p>
  
  <pre class="lang-groovy prettyprint-override"><code>buildscript {
      dependencies {
         classpath "com.abc.gradle.plugins:abc-assert-plugin:1.0.1"
      }
  }
  
  apply plugin: 'abc-assert'
  apply plugin:'groovy'
  apply plugin:'idea'
  apply plugin:'eclipse'
  
  sourceCompatibility = targetCompatibility = "1.8"
  
  nexusUrl = "http://nexus/nexus/content/groups/abc-artifacts"
  
  //project.ext.set("nexusUsername", nexusUsername)
  
  dependencies{
      compile gradleApi()
      compile localGroovy()
      testCompile 'junit:junit:4.11'
      compile 'org.codehaus.groovy:groovy-all:2.4.4'
      testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
  }
  
  jar {
    baseName=projectName
  }
  </code></pre>
  
  <p>Thanks,</p>