Maven control plugin (surefire) eliminates idle

I have the following configuration in my pom.xml

<build>
  <plugins>
      <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.17</version>
          <configuration>
              <excludes>
                  <exclude>**/DocumentChangeSubscriberTest.java</exclude>
              </excludes>
          </configuration>
      </plugin>
      (...)

DocumentChangeSubscriberTestis an arquillian test that I want to run only in the specified profile. When I type mvn installall the tests run, even DocumentChangeSubscriberTestwhich I want to exclude. How to exclude a test from the default profile (anonymous)?

I tried <includes><include>...and it works fine - only the included tests were executed.

I saw the maven surefire test plugin runs tests even if they are excluded: but this does not work for me. I also tried many versions maven-surefire-pluginwith no result. Any ideas?

+4
source share
5 answers

, . , : DocumentChangeSubsriberTest.java DocumentChangeSubscriberTest.java.

.

+1

, .

<excludes>. maven . *IT (: MyClassIT.java) maven-failsafe-plugin .

, maven-surefire-plugin . , :

  • Test*.java
  • *Test.java
  • *TestCase.java

, maven-failsafe-plugin :

  • IT*.java
  • *IT.java
  • *ITCase.java

arquillian, , , DocumentChangeSubscriber IT.java .

. .

, -.

+6

(, , ): maven maven?

, ! , ( ).

+1

, , : " maven-surefire, , , <reporting><plugins><plugin>....</plugin></plugins></reporting>, , , <build><plugins><plugin>...</plugin></plugins></build>, <reporting> <build> , - , - .

+1

, , , - , . , - maven- . , .

mvn verify .

 <excludes>
   <exclude>**/something/*Test.java</exclude>
</excludes>

, -Dit.test
.. mvn verify -Dit.test="<some_package>"


DOES , -Dit.test.
.. mvn verify

+1

All Articles