Closed ravikancherla closed 9 years ago
Cargo does not automatically download Tomcat. I only does that if you configure it to do so. Otherwise, it uses the Tomcat installation you point to with cargo.local.homeDir
. Cargo by default creates a temp directory for deployment purposes and does not drop the deployable archives into the webapps
directory. In practice it doesn't really matter where Cargo puts things.
If you really want to deploy to webapps
though you can. Instead you'd need to configure Tomcat as a remote container and use the hostname localhost:8080
. Keep in mind that you will need to configure the manager application to allow authentication which will also require you to provide username/password through the plugin DSL.
Closing this issue as I haven't heard back from you.
Hi Ben,
I want to use local tomcat container which is already installed in c:\tomcat instead of cargo downloading container automatically in temp folder. Please help me here. What am i doing wrong?
Here is my build.gradle so far
group = "com.biw.hc" version = "0.1.0_SNAPSHOT"
buildscript { ext { springBootVersion = "1.2.3.RELEASE" tomcatVersion = "8.0.20" logbackJaninoVersion = "2.7.8" } repositories { jcenter() maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/milestone" } maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}" classpath "net.saliman:gradle-cobertura-plugin:2.2.7" classpath "com.bmuschko:gradle-cargo-plugin:2.1" } }
apply plugin: "spring-boot" apply plugin: "java" apply plugin: "groovy" apply plugin: 'war' apply plugin: "eclipse" apply plugin: "idea" apply plugin: 'com.bmuschko.cargo'
apply plugin: "net.saliman.cobertura"
bootRepackage { mainClass = 'com.biw.hc.admin.Application' }
war { archiveName 'hcadmin.war' }
repositories { mavenLocal() jcenter() maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/milestone" } }
dependencies { providedRuntime "org.apache.tomcat.embed:tomcat-embed-core" providedRuntime "org.apache.tomcat.embed:tomcat-embed-el" providedRuntime "org.apache.tomcat.embed:tomcat-embed-logging-juli" providedRuntime "org.apache.tomcat.embed:tomcat-embed-websocket" providedRuntime "org.apache.tomcat:tomcat-jdbc:${tomcatVersion}" providedRuntime "org.apache.tomcat:tomcat-juli:${tomcatVersion}" providedRuntime "org.apache.tomcat:tomcat-dbcp:${tomcatVersion}"
}
cargo { containerId = 'tomcat8x' port = 8080
}