LoginSignup
0
0

Mavenで特定のテストをスキップして、buildしたい。

Posted at

タイトル通り。

以下みたいなシェルスクリプトを使えばいいんや!

#!/bin/bash
# Backup original pom.xml
cp pom.xml pom.xml.bak

# Add test exclude configuration to pom.xml
xmlstarlet ed --inplace -u "/project/build/plugins/plugin[artifactId='maven-surefire-plugin']/configuration/excludes" -x "concat(., '<exclude>除外クラスの条件</exclude>')" pom.xml

# Run maven clean install
mvn clean install

# Restore the original pom.xml
mv pom.xml.bak pom.xml
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0