Maven 1.x Test Plugin

Do not execute test:test-resources unless tests will be run

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.8
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

If maven.test.skip is set (or if there are no unit tests), there should be no need to execute test:test-resources.

This allows putting preGoals and postGoals against test:test-resources which may be very time-consuming (such as database loads), and these other goals would not be executed if the tests are not run.

Issue Links

Activity

Hide
Todd Huss added a comment -

I believe I'm having the same problem. If I define a pregoal for test:test and then run maven as:

maven -Dmaven.test.skip=true

it still executes my pregoal.

Show
Todd Huss added a comment - I believe I'm having the same problem. If I define a pregoal for test:test and then run maven as: maven -Dmaven.test.skip=true it still executes my pregoal.
Hide
nicolas de loof added a comment -

Current solution introduces MPTEST-66. Other plugin expect test plugin to attain java:compile.
The prereqs in test:* goals should be splited to allways invoque java:compile, and skip test:compile is skip=true

Show
nicolas de loof added a comment - Current solution introduces MPTEST-66. Other plugin expect test plugin to attain java:compile. The prereqs in test:* goals should be splited to allways invoque java:compile, and skip test:compile is skip=true

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: