Skip to content

Instantly share code, notes, and snippets.

@shimaRE1308
Created August 13, 2015 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shimaRE1308/efbce088efb1a9324b09 to your computer and use it in GitHub Desktop.
Save shimaRE1308/efbce088efb1a9324b09 to your computer and use it in GitHub Desktop.
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