Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-88

Test classes/resources should come before compile classes/resources so they load up earlier in java classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.1
    • 1.3.2
    • Core features
    • None

    Description

      When running tests, test classes and test resources should come before compile classes and compiles resources in the java classpath, so that classes and resources for test can override classes and resources for 'real' use. This behaviour would be consistent with Maven.

      Example:

      myproject/
      — src/
      ------ main/
      --------- java/
      --------- resources/
      ------------ myProperties.properties # This one is for the real world
      ------ test/
      --------- java/
      --------- resources/
      ------------ myProperties.properties # This one is for testing and should override the other one

      Buildr 1.3.1.1 uses the following classpath to run tests.
      ...dependencies...:myproject/target/classes:myproject/target/resources:myproject/target/test/classes:myproject/target/test/resources:...jars for testing...

      'myproject/target/test/classes' and 'myproject/target/test/resources' should come before 'myproject/target/classes' and 'myproject/target/resources'.

      This issue can be solved by adding 'test.with test.resources.target' in the project definition. Yet, I think it should be the default behaviour.

      Regards.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lacton Antoine Contal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: