I have a deploy task, that I want to have copy my war to a webapp directory, for some reason It seems to be running first. Any ideas would be appreciated, thanks in advance.
output:
warrring
Copy happening
:core:compileJava
...
:war
:deploy
build.gradle
allprojects{
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
configurations {
provided
testCompile.extendsFrom provided
}
//provided means we want to build with, but not runwith the dependency
sourceSets.main.compileClasspath += configurations.provided
repositories {
mavenCentral()
}
}
dependencies{
compile project(':core')
compile project(':wizard')
}
apply plugin: 'war'
webAppDirName = '../../../modules/core/src/main/webapp'
war.baseName = "hpi"
sourceCompatibility = 1.6
war {
//copy project specific stuff inot the war
println 'warrrrring'
from '../../../modules/wizard/war'
from 'war'
}
task deploy (dependsOn: war){
copy {
println 'Copy happening'
from war.archivePath
into project.ext.get('TOMCAT_HOME') + '/webapps'
}
}