You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gradle task bootRepackage does not run war task it depends on #5259
executing ./gradlew bootRepackge without prior execution of ./gradlew build does not build the same artifact
I have created a small demo project here: https://github.com/166MMX/bugnest/tree/master/gradle-war-dep-001
steps to reproduce:
git clone https://github.com/166MMX/bugnest.git
cd bugnest/gradle-war-dep-001
# runtime => NPE
./gradlew clean
./gradlew ':wrap' bootRepackage
java -jar wrap/build/lib/wrap.jar
# works
./gradlew ':wrap' build
java -jar wrap/build/lib/wrap.jar
# now works too
./gradlew ':wrap' bootRepackage
java -jar wrap/build/lib/wrap.jar
# list all tasks with task dependencies
./gradlew ':wrap:tasks' --all
Listing all tasks makes me wonder about two things:
the bootRepackage task depends on project task ':custom:jar'
the bootRun task depends on project task ':custom:war'
Could it be that bootRepackage should depend on ':custom:war' but not on ':custom:jar'
changed the title [-]gradle task bootRepackage dose not run war task it depends on[/-][+]gradle task bootRepackage does not run war task it depends on[/+]on Jan 17, 2017
Activity
philwebb commentedon Apr 25, 2016
We've probably not considered the repackage war scenario.
166MMX commentedon Apr 25, 2016
It might be that this is related to runtime project dependencies that are going to be resolved after the compile "stage".
4 remaining items
[-]gradle task bootRepackage dose not run war task it depends on[/-][+]gradle task bootRepackage does not run war task it depends on[/+]Introduce bootJar and bootWar tasks for creating fat jars and wars