# How to access project.ext variables from within buildscript section

**URL:** <https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706>\
**Category:** Old Forum Archive\
**Created:** [January 17, 2014, 5:30am UTC](https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706 "2014-01-17T05:30:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhijit\_Sarkar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/abhijit_sarkar/32/11598_2.png) [@Abhijit\_Sarkar](https://discuss.gradle.org/u/Abhijit_Sarkar)\
**Post date:** [January 17, 2014, 5:30am UTC](https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706/1 "2014-01-17T05:30:00Z")

</div>

```gradle
project.ext {
 jaxWsPluginVersion = "1.0-SNAPSHOT"
}
  buildscript {
 repositories {
  mavenCentral()
  mavenLocal()
 }
 dependencies {
  classpath(
    [group: "name.abhijitsarkar.webservices.jaxws.tools", name: "gradle-jaxws-plugin", version: "1.0-SNAPSHOT"]
    )
 }
}

```

What expression can I use to get jaxWsPluginVersion within buildscript?

---

<div class="post-metadata">

**Author:** ![Abhijit\_Sarkar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/abhijit_sarkar/32/11598_2.png) [@Abhijit\_Sarkar](https://discuss.gradle.org/u/Abhijit_Sarkar)\
**Post date:** [January 19, 2014, 10:19pm UTC](https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706/2 "2014-01-19T22:19:00Z")

</div>

No one?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [January 19, 2014, 11:30pm UTC](https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706/3 "2014-01-19T23:30:00Z")

</div>

It’s impossible, because the ‘buildscript’ block gets evaluated before the rest of the build script. You can access an extra property declared within ‘buildscript’ from the rest of the build script, though.

---

<div class="post-metadata">

**Author:** ![Abhijit\_Sarkar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/abhijit_sarkar/32/11598_2.png) [@Abhijit\_Sarkar](https://discuss.gradle.org/u/Abhijit_Sarkar)\
**Post date:** [January 20, 2014, 9:25pm UTC](https://discuss.gradle.org/t/how-to-access-project-ext-variables-from-within-buildscript-section/5706/4 "2014-01-20T21:25:00Z")

</div>

Thanks Peter.
