Created
August 13, 2015 10:27
-
-
Save shimaRE1308/efbce088efb1a9324b09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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