# JettyRun and webAppSourceDirectory

**URL:** <https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474>\
**Category:** Old Forum Archive\
**Created:** [December 13, 2012, 8:54am UTC](https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474 "2012-12-13T08:54:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![viper75](https://avatars.discourse-cdn.com/v4/letter/v/4da419/32.png) [@viper75](https://discuss.gradle.org/u/viper75)\
**Post date:** [December 13, 2012, 8:54am UTC](https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474/1 "2012-12-13T08:54:00Z")

</div>

Im trying to run a the java web application that my company is building offsite, I run gradle JettyRun in the functional-tests directory and got the error ,

- What went wrong: A problem was found with the configuration of task ‘:functional-tests:jettyRun’. \> Directory ‘C:\git\open-lmis\functional-tests\src\main\webapp’ specified for property ‘webAppSourceDirectory’ does not exist.

This thing is I can’t see the task ‘functional-tests:jettyRun’ in the build.gradle file below located in the functional-tests directory.

\< apply plugin: ‘jetty’

dependencies {

compile ‘org.testng:testng:6.1.1’,

‘org.seleniumhq.selenium:selenium-java:2.25.0’,

‘org.seleniumhq.selenium:selenium-firefox-driver:2.25.0’,

‘net.sf.json-lib:json-lib:0.9’,

‘postgresql:postgresql:9.0-801.jdbc4’,

project(‘:modules:db’)

testCompile ‘org.springframework:spring-test:3.1.1.RELEASE’,

‘org.testng:testng:6.1.1’,

‘org.seleniumhq.selenium:selenium-java:2.25.0’,

'org.seleniumhq.selenium:selenium-firefox-driver:2.25.0 ',

‘net.sf.json-lib:json-lib:0.9’,

‘postgresql:postgresql:9.0-801.jdbc4’,

project(‘:modules:db’) }

test {

exclude ‘\*\*/org/openlmis/functional/_._’ }

task buildOpenLmis(type: GradleBuild) {

buildFile = ‘…/modules/openlmis-web/build.gradle’

tasks = [‘build’, ‘jettyRunWarDaemon’] }

task functionalTest(type: Test, dependsOn: test) {

include ‘\*\*/org/openlmis/functional/_._’

useTestNG() }

functionalTest.doFirst() {

buildOpenLmis.execute() }

> 

please help.

---

<div class="post-metadata">

**Author:** ![Tye\_Howard1](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Tye\_Howard1](https://discuss.gradle.org/u/Tye_Howard1)\
**Post date:** [December 13, 2012, 9:36pm UTC](https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474/2 "2012-12-13T21:36:00Z")

</div>

The “jettyRun” task has a property “webAppSourceDirectory” which appears to default to your projects root directory plus “src\main\webapp”.

You can specify a different directory using :

```gradle
jettyRun.webAppSourceDirectory = file("webapp")

```

---

<div class="post-metadata">

**Author:** ![Tye\_Howard1](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Tye\_Howard1](https://discuss.gradle.org/u/Tye_Howard1)\
**Post date:** [December 13, 2012, 9:39pm UTC](https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474/3 "2012-12-13T21:39:00Z")

</div>

Also the ‘:functional-tests:jettyRun’ means the subproject ‘functional-tests’ is having the problem with it’s ‘jettyRun’ task. You might need to look in the build.gradle file under your functional-tests directory to find the task in question.

---

<div class="post-metadata">

**Author:** ![viper75](https://avatars.discourse-cdn.com/v4/letter/v/4da419/32.png) [@viper75](https://discuss.gradle.org/u/viper75)\
**Post date:** [December 17, 2012, 8:02am UTC](https://discuss.gradle.org/t/jettyrun-and-webappsourcedirectory/5474/4 "2012-12-17T08:02:00Z")

</div>

Thanks Tye , I will make the necessary changes …
