Reputation: 107
I am using Gradle, but the output war file (on /build/libs/project-version.war) has only the WebContent information.
Here's how I´ve set up my build.gradle file:
//others
apply plugin: "war"
//repos and dependencies
webAppDirName = 'WebContent'
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src'
}
}
}
And when I run gradle build command the WAR content is:
Can you guys help me out setting up the correct WAR ? Thanks
Upvotes: 1
Views: 1462
Reputation: 107
Actually, the WAR Content is correct.
If you are going to build a WAR you need to specify this for it to build correctly:
webAppDirName = 'WebContent'
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src'
}
}
}
Hope this helps.
Upvotes: 2