Skip to content

gradle task bootRepackage does not run war task it depends on #5259

Closed

Description

@166MMX

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'

Activity

  1. added
    status: waiting-for-triage
    on Feb 26, 2016
  2. removed
    status: waiting-for-triage
    on Apr 25, 2016
  3. added this to the 1.3.4 milestone on Apr 25, 2016
  4. philwebb commented on Apr 25, 2016

    @philwebb
    Member

    We've probably not considered the repackage war scenario.

  5. 166MMX commented on Apr 25, 2016

    @166MMX
    ContributorAuthor

    It might be that this is related to runtime project dependencies that are going to be resolved after the compile "stage".

  6. modified the milestones: 1.4.0.M3, 1.3.4 on May 3, 2016
  7. self-assigned this
    on May 3, 2016
  8. modified the milestones: 1.4.0.M3, 2.0.0.M1 on May 9, 2016
  9. removed their assignment
    on Aug 30, 2016
  10. removed this from the 2.0.0.M1 milestone on Jan 12, 2017
  11. 4 remaining items

  12. modified the milestones: 2.0.0.M3, 2.0.0.M2 on Jan 12, 2017
  13. 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
  14. modified the milestones: 2.0.0.M3, 2.0.0.M2 on Feb 8, 2017
  15. modified the milestones: 2.0.0.M2, 2.0.0.M1 on Feb 15, 2017
  16. self-assigned this
    on Feb 15, 2017
  17. added a commit that references this issue on Apr 3, 2017
    26db668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions