Remo
Remo

Reputation: 604

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?

Upvotes: 4

Views: 3580

Answers (1)

Remo
Remo

Reputation: 604

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

Upvotes: 6

Related Questions