Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create a JAR containing the classes in the webapp using gradle

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

like image 610
Alexander Vasiljev Avatar asked Oct 23 '22 02:10

Alexander Vasiljev


1 Answers

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'  
    }  
}
like image 66
dnault Avatar answered Oct 30 '22 14:10

dnault