jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Surefire
  • SUREFIRE-619

The surefire plugin should generate the test classpath

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.5
  • Fix Version/s: 2.6
  • Component/s: classloading, Maven Surefire Plugin
  • Labels:
    None
  • Complexity:
    Intermediate

Description

I believe the surefire plugin would be improved if it generated the test classpath internally instead of getting the test classpath from MavenProject. This would allow the user better control over what is included in the classpath, and would actually simplify parts of the code for building the classpath.

The risk associated with this change is that the default surefire classpath could end up being different than the test classpath in MavenProject. However, I think that as long as the surefire plugin classpath generation is well documented, this won't cause a problem for users.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-502 Specified classesDirectory is added to the end of the classpath

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

New Feature - A new feature of the product, which has yet to be developed. SUREFIRE-576 Have the abiltiy to remove a dependency from the test classpath (at least optional ones

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

New Feature - A new feature of the product, which has yet to be developed. SUREFIRE-598 run maven test with customized classpath

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Kristian Rosenvold added a comment - 14/May/10 1:52 PM

I would appreciate some well defined use-cases/scenarios for this?

Show
Kristian Rosenvold added a comment - 14/May/10 1:52 PM I would appreciate some well defined use-cases/scenarios for this?
Hide
Permalink
Paul Gier added a comment - 14/May/10 2:40 PM

There are some use cases defined in the two linked issues. More complete control over the classpath is useful any time you want to run tests against multiple dependency configurations. The recommendation I've heard in the past is to use multiple separate test projects (POMs) which depend on the project you are testing, but this can be difficult because of SUREFIRE-569.

Show
Paul Gier added a comment - 14/May/10 2:40 PM There are some use cases defined in the two linked issues. More complete control over the classpath is useful any time you want to run tests against multiple dependency configurations. The recommendation I've heard in the past is to use multiple separate test projects (POMs) which depend on the project you are testing, but this can be difficult because of SUREFIRE-569.
Hide
Permalink
Paul Gier added a comment - 14/May/10 2:45 PM

Just for some additional information, the current surefire classpath is retrieved from MavenProject which basically just returns the paths to all of the dependencies and the classes and test-classes directory. This requires some hacky logic to fix the paths in the case that the user set a non default location for the classes or test-classes directory in the surefire config. What I'm trying to do with this issue is figure out a more elegant solution to build the surefire classpath and still allow flexibility for the user to modify this path to fit the needs of the project.

Show
Paul Gier added a comment - 14/May/10 2:45 PM Just for some additional information, the current surefire classpath is retrieved from MavenProject which basically just returns the paths to all of the dependencies and the classes and test-classes directory. This requires some hacky logic to fix the paths in the case that the user set a non default location for the classes or test-classes directory in the surefire config. What I'm trying to do with this issue is figure out a more elegant solution to build the surefire classpath and still allow flexibility for the user to modify this path to fit the needs of the project.
Hide
Permalink
Paul Gier added a comment - 14/May/10 4:20 PM

Moved the classpath generation into a method in the surefire plugin in r944475.

Show
Paul Gier added a comment - 14/May/10 4:20 PM Moved the classpath generation into a method in the surefire plugin in r944475.

People

  • Assignee:
    Paul Gier
    Reporter:
    Paul Gier
Vote (0)
Watch (0)

Dates

  • Created:
    14/May/10 11:42 AM
    Updated:
    17/May/10 2:48 PM
    Resolved:
    17/May/10 2:48 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.