0

It is likely a simple issue but I am not seeing it right now.

The command that I run is gradlew.bat appRun --stacktrace My Expectation: That I will have a running web application. (Or at minimum not get any error message)

My Actual: I get an stacktrace error message that stated

"main" groovy.lang.MissingPropertyException: No such property: baseDir for class: org.apache.catalina.core.StandardEngine

here is my build script

buildscript {
repositories {
    maven {
        url "https://plugins.gradle.org/m2/"
    }
}
dependencies {
    classpath "org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE"
}

}

apply plugin: 'org.springframework.boot'
apply plugin: 'java'
apply plugin: 'war'
apply from: 'gretty.plugin'
apply plugin: 'idea'

group 'com.mycom'
version tpos_version
description 'TPOS'


idea {
    project {
    languageLevel = '1.8'
    }
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}
sourceCompatibility = 1.8
targetCompatibility = 1.8


gretty {
    httpPort = 9070
    contextPath = 'rus-tpos'
    servletContainer = 'tomcat7'
    realm = 'auth'
    realmConfigFile = 'tomcat-users.xml'
}



repositories {
    mavenLocal()
    maven {
        url nexusReadRepoUrl
        credentials {
        username nexusReadUsrName
        password nexusReadUsrPwd
        }
    }
    jcenter()

}


configurations.all {
exclude group: 'commons-logging', module: 'commons-logging'
}

dependencies {
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: spring_boot_version
compile group: 'org.springframework.hateoas', name: 'spring-hateoas', version: '0.23.0.RELEASE'

providedRuntime group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: spring_boot_version
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: spring_boot_version

compile group: 'org.yaml', name: 'snakeyaml', version: '1.18'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'

compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile group: 'com.google.guava', name: 'guava', version: '16.0'
compile group: 'com.jayway.jsonpath', name:'json-path', version:'2.2.0'

compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jackson_version

compile group: 'io.springfox', name: 'springfox-swagger2',version: '2.6.1'
compile group: 'io.springfox', name: 'springfox-swagger-ui',version: '2.6.1'

compile group: 'io.springfox', name:'springfox-petstore',version: '2.6.1'

testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testCompile group: 'junit', name: 'junit', version: '4.12'
}

processResources {
expand("application.version": version)
}

I assume it deals with a tomcat maybe the line

 providedRuntime group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: spring_boot_version

or in the gretty section but not sure please let me know what else I should provided and any assistance is appreciated

tim_yates
  • 167,322
  • 27
  • 342
  • 338
  • It has been a while since I last looked at this but believe that this is due to not having values in gradle.properties on home dir.. I believe that this resolved the issue but can't remember – user297863 Jun 16 '17 at 21:48

1 Answers1

-1

It has been a while since I last looked at this but believe that this is due to not having values in gradle.properties on home dir.. I believe that this resolved the issue but can't remember

  • So Gradle No such property: errors should be resolved making gradle.properties having it in either project or home directory and make sure that you have assigned a value to that property within the file. – user297863 Jun 16 '17 at 21:52
  • I have two webapplications, one works and the other not. No `gradle.properties` in home directory. – lucasvc Oct 31 '18 at 12:39