從 gradle 5.x 升級到 7.x 后,生成了兩個 war 檔案。
以下是 2 個戰爭檔案名
test-app-1.0.0.war
test-app-1.0.0-plain.war
以下是使用的 gradle 插件和任務:
plugins {
id 'war'
}
bootWar {
launchScript()
manifest {
attributes 'Implementation-Version': archiveVersion
}
}
我只想生成test-app-1.0.0.war. 如何解決這個問題?
uj5u.com熱心網友回復:
基于參考普通 jar - stackoverflow:
改變build.gradle如下
war {
enabled = false
}
bootWar {
enabled = true
launchScript()
manifest {
attributes 'Implementation-Version': archiveVersion
}
}
現在它只生成test-app-1.0.0.war
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/425843.html
