【发布时间】:2017-12-03 06:09:08
【问题描述】:
尝试创建属性文件 (foo.properties) 并将其添加到战争的根目录中。
apply plugin: 'war'
task createProperties {
FileOutputStream os = new FileOutputStream("${project.buildDir}/foo.properties");
...
}
war {
dependsOn createProperties
from "${project.buildDir}/foo.properties"
...
}
出了什么问题:
A problem occurred evaluating project ':app'.
> E:\app\build\build.properties (The system cannot find the path specified)
我需要创建构建目录吗?
对于战争,是否有 webapp 的输出目录? (sourceSet: src/main/webapp)
最好直接在webapp outputDir下创建foo.properties。
【问题讨论】:
标签: gradle war output-directory