How to change the maven life cycle?

2

I have an EJB project and would like to run the test after deploying my ear. I have a test in the ejb layer, which needs to access the ejbstubs inside the server (was), before I did this with ant, but I'm changing to maven, but I'm not able to change the life cycle.     

asked by anonymous 12.11.2015 / 17:10

1 answer

1
___ erkimt ___ How to change the maven life cycle? ______ qstntxt ___

I have an EJB project and would like to run the test after deploying my ear. I have a test in the ejb layer, which needs to access the ejbstubs inside the server (was), before I did this with ant, but I'm changing to maven, but I'm not able to change the life cycle.     

______ ___ azszpr97932

It is possible, yes, you can configure the surefire plugin:

<build>
...

<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.15</version>
    <configuration>
      <excludes>
        <exclude>**/integration/*.java</exclude>
      </excludes>
   </configuration>
   <executions>
     <execution>
        <id>integration-test</id>
        <goals>
          <goal>test</goal>
        </goals> 
        <phase>integration-test</phase>
        <configuration>
          <excludes>
            <exclude>none</exclude>
          </excludes>
          <includes>
            <include>**/integration/*.java</include>
          </includes>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

Source and further information: Integrated Tests

    
___
12.11.2015 / 20:12