Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19180

Force maven-clean-plugin execution should be turned off when -DnoCompile is used

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Build System
    • None
    • ---
    • ---

      The use case for -DnoCompile is executing a second job step to test with a given JDK after completing a previous job step that builds with a different JDK. (Currently the 'build' JDK is 17 with 11 as the test JDK; in the past different combinations have been used.)

      But some modules have maven-clean-plugin manually set up to clean; i.e. not relying on the person calling maven to include the 'clean' goal. This is done in modules where rebuilding without cleaning in between has a high tendency to produce build failures.

      We should turn this behavior off with -DnoCompile, because we don't want the second job step to throw away what was done in the first job step. The second job step usually just executes the 'test' goal (to avoid trying to do thing that require a compiler) so if a module gets cleaned there is no reason to expect what was cleaned will be recreated.

      Right now most use of '-DnoCompile' also includes '-rf testsuite', which means tests outside of the testsuite tree are not run. I think this is necessary because if the 2nd job step is not limited to testsuite, the clean plugin calls remove needed data (e.g. the built servers) from the first step.

            Unassigned Unassigned
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: