Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 225
Remo Avatar asked Nov 15 '25 21:11

Remo


1 Answers

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

like image 112
Remo Avatar answered Nov 17 '25 11:11

Remo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!