gradle: copy war to tomcat directory

前端 未结 9 1362
情话喂你
情话喂你 2020-12-28 14:01

I\'m trying to write a Gradle task which copies generated war files to my local tomcat instance:

This isn\'t working and I\'m not sure how to debug it:



        
9条回答
  •  Happy的楠姐
    2020-12-28 14:33

    If you already have the war plugin you can also just add

    war.doLast {
        copy {
            from war.archiveFile
            into "${tomcatHome}/webapps"
        }
    }
    

    Then you will always automatically deploy each time you build the war file.

提交回复
热议问题