Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
task preCopy(type: Copy) {
from ("build/template/WEB-INF/classes") {
File tokenFile = file( "build/token/token2.properties" )
def prop = new Properties()
tokenFile.withInputStream {
prop.load( it )
}
getProperty( 'token.files' ).tokenize( ',' ).each {
filesMatching("**/$it") {
filter( ReplaceTokens, tokens: prop )
}
}
}
into "build/work/resources/main"
}
war.dependsOn preCopy
// War タスク
war {
webAppDirName = getProperty( 'app.dir' )
// eclipse の出力フォルダを除外
exclude {
it.file.getAbsolutePath().lastIndexOf("WebContent\\WEB-INF\\classes") > -1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.