create a JAR containing the classes in the webapp using gradle

☆樱花仙子☆ 提交于 2019-12-07 05:30:27

问题


I.e. is there any equivalent of archiveClasses = true setting of maven-war-plugin for War Graddle task?


回答1:


Here's an incantation from Mark Vieira that works for me with Gradle 2.2.1:

war {  
    classpath = classpath - sourceSets.main.output  
    from (jar) {  
        into 'WEB-INF/lib'  
    }  
}


来源:https://stackoverflow.com/questions/13359736/create-a-jar-containing-the-classes-in-the-webapp-using-gradle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!