[英]Gradle: copy web-inf/libs to root of war
I'm converting an old project which uses applets to gradle from ant. 我正在转换一个使用applet的老项目来蚂蚁。 My issue lies that I need to be able to copy my lib folder from web-inf to the base of the war so that my applets can access the jars. 我的问题在于我需要能够将我的lib文件夹从web-inf复制到战争的基础,以便我的applet可以访问jar。 I've tried using a move task but that doesn't seem to affect the directories inside of the war task. 我尝试过使用移动任务,但这似乎不会影响war任务中的目录。 Could someone offer any assistence, I tried doing a task that runs the following: 有人可以提供任何帮助,我尝试执行以下运行的任务:
from configurations.runtime
into "$buildDir/lib"
This seems to only affect my $buildDir/lib folder, not the root directory inside of my war. 这似乎只影响我的$ buildDir / lib文件夹,而不是我的战争中的根目录。 I'm assuming there is a similar command I can add to the war task for it to work? 我假设有一个类似的命令,我可以添加到战争任务,它的工作?
You can bring all your jars to rootdir/libs
in that way : 您可以通过这种方式将所有罐子带到rootdir/libs
:
war {
// bring all jars to RootDir/libs
from(configurations.runtime) {
into 'libs'
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.