Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-667

Setting up maven resources when testing in addition to testResources

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.6
    • None
    • Maven Surefire Plugin
    • None

    Description

      Hey,

      I think that developers would need resource goal of resource plugin to be set up differently for
      test phase, than for build phase. When testing one needs to exclude stuff
      from src/main/resources. It seems it can't be done, testResources goal
      is irrelevant for this because it can't operate on src/main/* and resource goal can have only one
      setting in pom definition, that takes effect in both test and build
      phase...

      For example, I'd need following settings to look differently (some
      excludes) in testing phase :

      <resources>
      <resource>
      <directory>${project.basedir}/src/main/java</directory>
      <includes>
      <include>*/.java</include>
      <include>service.properties</include>
      </includes>
      </resource>
      <resource>
      <directory>${project.basedir}/src/main/resources</directory>
      <includes>
      <include>*/.xml</include>
      <include>*/.properties</include>
      </includes>
      </resource>
      </resources>

      The ideal behavior would be if one could define "src/main/*" in
      <testResources> but it unfortunately can't be done right now

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sloin vychtrle
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: