简体   繁体   中英

After upgrading to gradle 7.x generating two war files

After upgrading from gradle 5.x to 7.x, two war files generating.

Below are the 2 war file names

test-app-1.0.0.war
test-app-1.0.0-plain.war

below is gradle plugin and task used:

plugins {
    id 'war'
}

bootWar {
    launchScript()
    manifest {
        attributes 'Implementation-Version':  archiveVersion
    }
}

I want to generate only test-app-1.0.0.war . How to fix this?

Based on the reference plain jar - stackoverflow :

Changed build.gradle like below

war {
    enabled = false
}

bootWar {
    enabled = true
    launchScript()
    manifest {
        attributes 'Implementation-Version':  archiveVersion
    }
}

Now it's generating only test-app-1.0.0.war

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM