MAVEN package 시 test 코드 건너뛰기

공부는 혼자하는 거·2022년 4월 17일
0

환경

목록 보기
11/25
bash$ mvn clean install -DskipTests
혹은
bash$ mvn clean install -Dmaven.test.skip=true

or

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

or

<project>
  [...]
  <properties>
    <skipTests>true</skipTests>
  </properties>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <skipTests>${skipTests}</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

참고

https://brocess.tistory.com/148

http://blog.iotinfra.net/?p=1707

profile
시간대비효율

0개의 댓글