简体   繁体   English

Gradle:将web-inf / libs复制到战争根源

[英]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.

相关问题 Gradle WAR 与 WEB-INF/classes 下的编译类 - Gradle WAR with compiled classes under WEB-INF/classes gradle - 如何从战争中排除 WEB-INF/类 - gradle - how to exclude WEB-INF/classes from war 战争中的WEB-INF内容访问 - WEB-INF content access in another war 将gdata罐子复制到根目录:WEB-INF / lib或子目录:WEB-INF / lib / gdata / blogger / 2.0,等等? - Copy gdata jars to root dir: `WEB-INF/lib` or to subdirs: `WEB-INF/lib/gdata/blogger/2.0`, etc? 没有这样的文件或目录 -../ROOT.war/WEB-INF/lib/C/gems/sass-3.2.12/VERSION - No such file or directory -../ROOT.war/WEB-INF/lib/C/gems/sass-3.2.12/VERSION 如何将罐子从WEB-INF / lib复制到Maven战争中的另一个文件夹 - how to copy jars from WEB-INF/lib to another folder in war in maven Maven:将 war/web-inf/classes 中的类作为 jar 添加到 war/web-inf/lib - Maven: Adding classes from war/web-inf/classes as a jar to war/web-inf/lib Maven,GWT,Google Eclipse插件,在依赖项项目处于战争状态时无法将jar复制到WEB-INF / lib - Maven, GWT, Google Eclipse plugin, can not copy jar to WEB-INF/lib when dependency project is war Gradle WEB-INF / classes文件夹 - Gradle WEB-INF/classes folder Maven:打包文件夹后,将粘贴WEB-INF复制到根目录中 - Maven: copy paste WEB-INF into root after packaging copy folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM