keycloakのtest-skipの方法

keycloakをcompileさせる時に、時折testでコンパイルエラーが発生する
その際の解消方法を記載しておく
一応、[README.md](https://github.com/keycloak/keycloak/blob/master/README.md)に従って普通にコンパイル。その際に[テストをスキップ](http://d.hatena.ne.jp/tm_senda/20120604/1338837404)させる（ま、普通のmaven仕様に則ったスキップのひとつ）

※大概エラーが出る場合は環境設定でプロジェクト毎のjavaバージョンが違ったりが多いので、探すのが面倒になるケースｗｗ


```java:NG-Pattern
$ mvn -Ddistribution -DskipTests=true -Dmaven.test.skip=true install

.
.
<snip>
.
.


[INFO] --------------< org.keycloak:keycloak-testsuite-tomcat8 >---------------
[INFO] Building Keycloak Tomcat 8 Integration TestSuite 4.6.0.Final-SNAPSHOT [175/227]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Keycloak BOM Parent ................................ SUCCESS [  1.185 s]
[INFO] Keycloak BOM for adapters .......................... SUCCESS [  0.015 s]
[INFO] Keycloak BOM for server extensions ................. SUCCESS [  0.014 s]
.
<snip>
.
[INFO] Keycloak Proxy Server .............................. SUCCESS [  0.123 s]
[INFO] Keycloak Proxy ..................................... SUCCESS [  0.009 s]
[INFO] Keycloak TestSuite ................................. SUCCESS [  0.008 s]
[INFO] Keycloak Arquillian Integration TestSuite .......... SUCCESS [  0.009 s]
[INFO] Servers ............................................ SUCCESS [  0.008 s]
[INFO] Auth Server ........................................ SUCCESS [  0.009 s]
[INFO] Auth Server Services ............................... SUCCESS [  0.008 s]
[INFO] Auth Server Services - Testsuite Providers ......... SUCCESS [  1.472 s]
[INFO] Keycloak TestSuite Utils ........................... SUCCESS [  0.653 s]
[INFO] Test apps .......................................... SUCCESS [  0.008 s]
[INFO] integration-arquillian-test-apps-servlets .......... SUCCESS [  0.141 s]
[INFO] Keycloak Integration TestSuite - deprecated ........ SUCCESS [  0.239 s]
[INFO] Keycloak Tomcat 8 Integration TestSuite ............ FAILURE [  0.079 s]
[INFO] Test apps distribution ............................. SKIPPED
[INFO] Keycloak Authz: PhotoZ  Test Parent ................ SKIPPED
[INFO] Keycloak Authz Test: Photoz RESTful API ............ SKIPPED
[INFO] Keycloak Authz Tests: Photoz HTML5 Client .......... SKIPPED
[INFO] Keycloak Authz Tests: Photoz Authz Rule-based Policy SKIPPED
[INFO] Keycloak Authz Tests: Hello World Example .......... SKIPPED
[INFO] Keycloak Authz: Servlet Authorization Test ......... SKIPPED
[INFO] Keycloak Authz: Simple Servlet App with Policy Enforcer SKIPPED
[INFO] Keycloak Test App Profile JEE ...................... SKIPPED
[INFO] integration-arquillian-test-apps-cors-parent ....... SKIPPED
[INFO] Angular Product Portal JS .......................... SKIPPED
[INFO] JAX-RS Database Service Using OAuth Bearer Tokens .. SKIPPED
[INFO] Fuse Test Applications ............................. SKIPPED
[INFO] Customer Portal - Secured in Karaf/Fuse ............ SKIPPED
[INFO] CXF JAXRS Example - Secured in Karaf/Fuse .......... SKIPPED
.
<snip>
.
[INFO] SSSD tests ......................................... SKIPPED
[INFO] integration-arquillian-tests-springboot ............ SKIPPED
[INFO] Keycloak Jetty 9.2.x Integration TestSuite ......... SKIPPED
[INFO] Keycloak Jetty 9.3.x Integration TestSuite ......... SKIPPED
[INFO] Keycloak Jetty 9.4.x Integration TestSuite ......... SKIPPED
[INFO] Keycloak SAML Jetty Testsuite Integration .......... SKIPPED
[INFO] Keycloak Security Proxy TestSuite .................. SKIPPED
[INFO] Keycloak Tomcat 7 Integration TestSuite 4.6.0.Final-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:01 min
[INFO] Finished at: 2018-11-27T09:48:07+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project keycloak-testsuite-tomcat8: Could not resolve dependencies for project org.keycloak:keycloak-testsuite-tomcat8:jar:4.6.0.Final-SNAPSHOT: Could not find artifact org.keycloak:keycloak-testsuite-integration-deprecated:jar:tests:4.6.0.Final-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :keycloak-testsuite-tomcat8

```

結果は、testsuiteの場所でエラー
環境によっては通るんだけど、駄目な時は調べるのが面倒なので、いつも testsuite　自体を無効化して逃げていたんよね〜
で、流石に普通にやろうと思って、pom.xmlを見てみる際に、以下を探してみたいが無いみたい...

```java:pom.xml
  <properties>
    <skipTests>true</skipTests>
  </properties>
```

で、なにげに確認してみると、!skipTestsuiteとなっている

```java:pom.xml

        <profile>
            <id>testsuite</id>
            <activation>
                <property>
                    <name>!skipTestsuite</name>
                </property>
            </activation>
            <modules>
                <module>testsuite</module>
            </modules>
        </profile>

```

ということで、オプションで指定してみると普通に通ったみたい

```java:OK-Pattern
$ mvn -Ddistribution -DskipTests=true -Dmaven.test.skip=true -DskipTestsuite=true clean install
.
.
<snip>
.
.


[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ keycloak-proxy-pom ---
[INFO] Installing /Users/isao.ito/Documents/jobs/github/keycloak/proxy/pom.xml to /Users/isao.ito/.m2/repository/org/keycloak/keycloak-proxy-pom/4.5.0.Final/keycloak-proxy-pom-4.5.0.Final.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Keycloak BOM Parent ................................ SUCCESS [  0.929 s]
[INFO] Keycloak BOM for adapters .......................... SUCCESS [  0.014 s]
[INFO] Keycloak BOM for server extensions ................. SUCCESS [  0.013 s]
[INFO] Keycloak 4.5.0.Final ............................... SUCCESS [  0.030 s]
[INFO] Keycloak Common .................................... SUCCESS [  2.412 s]
[INFO] Keycloak Core ...................................... SUCCESS [  1.314 s]
[INFO] Keycloak Drools BOM ................................ SUCCESS [  0.011 s]
[INFO] Keycloak Server SPI ................................ SUCCESS [  1.129 s]
[INFO] Keycloak Server Private SPI ........................ SUCCESS [  1.620 s]
[INFO] Keycloak Kerberos Federation ....................... SUCCESS [  0.144 s]
[INFO] Keycloak LDAP UserStoreProvider .................... SUCCESS [  0.613 s]
[INFO] Keycloak SAML Core Public API ...................... SUCCESS [  0.729 s]
[INFO] Keycloak SAML Core ................................. SUCCESS [  1.120 s]
[INFO] Keycloak REST Services ............................. SUCCESS [  5.872 s]
[INFO] Keycloak JS Integration ............................ SUCCESS [  1.724 s]
[INFO] Keycloak Themes .................................... SUCCESS [  3.602 s]
[INFO] Keycloak Dependencies Server Min ................... SUCCESS [  0.011 s]
[INFO] Keycloak Model JPA ................................. SUCCESS [  1.131 s]
[INFO] Keycloak Model Infinispan .......................... SUCCESS [  1.437 s]
[INFO] Keycloak SSSD Federation ........................... SUCCESS [  0.605 s]
[INFO] KeyCloak Authz: Parent ............................. SUCCESS [  0.009 s]
[INFO] KeyCloak AuthZ: Provider Parent .................... SUCCESS [  0.008 s]
[INFO] KeyCloak AuthZ: Common Policy Providers ............ SUCCESS [  0.226 s]
[INFO] KeyCloak AuthZ: Drools Policy Provider ............. SUCCESS [  0.177 s]
[INFO] Keycloak Dependencies Server All ................... SUCCESS [  0.009 s]
[INFO] Keycloak Dependencies Parent ....................... SUCCESS [  0.010 s]
[INFO] Keycloak Federation ................................ SUCCESS [  0.008 s]
[INFO] Keycloak Model Parent .............................. SUCCESS [  0.008 s]
[INFO] Keycloak Util Embedded LDAP ........................ SUCCESS [  0.286 s]
[INFO] Keycloak Util Parent ............................... SUCCESS [  0.010 s]
[INFO] Keycloak WildFly Integration ....................... SUCCESS [  0.009 s]
[INFO] Keycloak WildFly Add User Script ................... SUCCESS [  0.110 s]
[INFO] Keycloak WildFly Extensions ........................ SUCCESS [  0.102 s]
[INFO] Keycloak WildFly Server Subsystem .................. SUCCESS [  0.752 s]
[INFO] Keycloak Integration ............................... SUCCESS [  0.009 s]
[INFO] Keycloak Admin REST Client ......................... SUCCESS [  0.197 s]
[INFO] Keycloak Client Registration API ................... SUCCESS [  0.090 s]
[INFO] Keycloak Client CLI ................................ SUCCESS [  0.010 s]
[INFO] Keycloak Client Registration CLI ................... SUCCESS [  1.240 s]
[INFO] Keycloak Admin CLI ................................. SUCCESS [  1.718 s]
[INFO] Keycloak Client CLI Distribution ................... SUCCESS [  0.714 s]
[INFO] Keycloak Adapter SPI ............................... SUCCESS [  0.165 s]
[INFO] Keycloak Tomcat Adapter SPI ........................ SUCCESS [  0.093 s]
[INFO] Keycloak Undertow Integration SPI .................. SUCCESS [  0.220 s]
[INFO] Keycloak Servlet Integration ....................... SUCCESS [  0.176 s]
[INFO] Common JBoss/Wildfly Core Classes .................. SUCCESS [  0.072 s]
[INFO] Keycloak Jetty Adapter SPI ......................... SUCCESS [  0.175 s]
[INFO] Keycloak Client Adapter SPI Modules ................ SUCCESS [  0.006 s]
[INFO] Keycloak SAML Client Adapter Public API ............ SUCCESS [  0.066 s]
[INFO] Keycloak SAML Client Adapter Core .................. SUCCESS [  0.338 s]
[INFO] Keycloak Undertow SAML Adapter ..................... SUCCESS [  0.116 s]
[INFO] Keycloak SAML Tomcat Integration ................... SUCCESS [  0.011 s]
[INFO] Keycloak Tomcat Core SAML Integration .............. SUCCESS [  0.101 s]
[INFO] Keycloak Tomcat 8 SAML Integration ................. SUCCESS [  0.094 s]
[INFO] Keycloak Tomcat 6 Saml Integration ................. SUCCESS [  0.079 s]
[INFO] Keycloak Tomcat 7 SAML Integration ................. SUCCESS [  0.081 s]
[INFO] Keycloak Wildfly SAML Adapter ...................... SUCCESS [  0.122 s]
[INFO] KeyCloak Authz: Client API ......................... SUCCESS [  0.321 s]
[INFO] Keycloak Adapter Core .............................. SUCCESS [  0.539 s]
[INFO] Keycloak WildFly Elytron SAML Adapter .............. SUCCESS [  0.131 s]
[INFO] Keycloak Wildfly SAML Adapter Subsystem ............ SUCCESS [  0.561 s]
[INFO] Keycloak SAML Wildfly Integration .................. SUCCESS [  0.008 s]
[INFO] Keycloak AS7 / JBoss EAP 6 Integration ............. SUCCESS [  0.010 s]
[INFO] Keycloak AS7 SPI ................................... SUCCESS [  0.352 s]
[INFO] Keycloak SAML EAP Integration ...................... SUCCESS [  0.009 s]
[INFO] Keycloak SAML AS7 Integration ...................... SUCCESS [  0.190 s]
[INFO] Keycloak SAML AS7 Subsystem ........................ SUCCESS [  0.523 s]
[INFO] Keycloak SAML Servlet Filter ....................... SUCCESS [  0.091 s]
[INFO] Keycloak Jetty Core SAML Integration ............... SUCCESS [  0.191 s]
[INFO] Keycloak Jetty 8.1.x SAML Integration .............. SUCCESS [  0.153 s]
[INFO] Keycloak Jetty 9.1.x SAML Integration .............. SUCCESS [  0.178 s]
[INFO] Keycloak Jetty 9.2.x SAML Integration .............. SUCCESS [  0.245 s]
[INFO] Keycloak Jetty 9.3.x SAML Integration .............. SUCCESS [  0.163 s]
[INFO] Keycloak Jetty 9.4.x SAML Integration .............. SUCCESS [  0.160 s]
[INFO] Keycloak SAML Jetty Integration .................... SUCCESS [  0.008 s]
[INFO] Keycloak SAML Client Adapter Modules ............... SUCCESS [  0.007 s]
[INFO] Keycloak Tomcat Integration ........................ SUCCESS [  0.007 s]
[INFO] Keycloak Tomcat Core Integration ................... SUCCESS [  0.093 s]
[INFO] Keycloak AS7 Integration ........................... SUCCESS [  0.146 s]
[INFO] Keycloak AS7 Subsystem ............................. SUCCESS [  0.373 s]
[INFO] Keycloak Installed Application ..................... SUCCESS [  0.109 s]
[INFO] Keycloak Undertow Integration ...................... SUCCESS [  0.234 s]
[INFO] Keycloak Fuse 7.0 Integration ...................... SUCCESS [  0.008 s]
[INFO] Keycloak Fuse 7.0 Adapter - Camel + Undertow ....... SUCCESS [  0.383 s]
[INFO] Keycloak OSGI Adapter .............................. SUCCESS [  0.217 s]
[INFO] Keycloak Fuse 7.0 Adapter - Undertow ............... SUCCESS [  0.388 s]
[INFO] Keycloak Jetty Core Integration .................... SUCCESS [  0.175 s]
[INFO] Keycloak Jetty 9.4.x Integration ................... SUCCESS [  0.149 s]
[INFO] Keycloak Fuse 7.0 Adapter - Jetty 9.4 .............. SUCCESS [  0.282 s]
[INFO] Keycloak Tomcat 8 Integration ...................... SUCCESS [  0.076 s]
[INFO] Keycloak Fuse 7.0 Adapter - Tomcat 8 ............... SUCCESS [  0.201 s]
[INFO] Keycloak CLI SSO Framework ......................... SUCCESS [  1.203 s]
[INFO] Keycloak JAX-RS OAuth Client ....................... SUCCESS [  0.101 s]
[INFO] Keycloak Jetty 8.1.x Integration ................... SUCCESS [  0.135 s]
[INFO] Keycloak Jetty 9.1.x Integration ................... SUCCESS [  0.227 s]
[INFO] Keycloak Jetty 9.2.x Integration ................... SUCCESS [  0.143 s]
[INFO] Keycloak Jetty 9.3.x Integration ................... SUCCESS [  0.135 s]
[INFO] Keycloak Jetty Integration ......................... SUCCESS [  0.008 s]
[INFO] Keycloak Servlet Filter Adapter Integration ........ SUCCESS [  0.141 s]
[INFO] Keycloak Servlet OAuth Client ...................... SUCCESS [  0.075 s]
[INFO] spring-boot-container-bundle ....................... SUCCESS [  0.154 s]
[INFO] Keycloak Spring Security Integration ............... SUCCESS [  0.184 s]
[INFO] Keycloak Spring Boot Adapter Core .................. SUCCESS [  0.262 s]
[INFO] Keycloak Spring Boot Integration ................... SUCCESS [  0.168 s]
[INFO] Keycloak Spring Boot 2 Integration ................. SUCCESS [  0.214 s]
[INFO] Keycloak Tomcat 6 Integration ...................... SUCCESS [  0.066 s]
[INFO] Keycloak Tomcat 7 Integration ...................... SUCCESS [  0.067 s]
[INFO] Keycloak Wildfly Integration ....................... SUCCESS [  0.082 s]
[INFO] Keycloak Wildfly Elytron OIDC Adapter .............. SUCCESS [  0.131 s]
[INFO] Keycloak Wildfly Adapter Subsystem ................. SUCCESS [  0.570 s]
[INFO] Keycloak Wildfly 8 Adapter Subsystem ............... SUCCESS [  0.550 s]
[INFO] Keycloak WildFly Integration ....................... SUCCESS [  0.009 s]
[INFO] Keycloak OIDC Client Adapter Modules ............... SUCCESS [  0.008 s]
[INFO] Keycloak Adapters .................................. SUCCESS [  0.010 s]
[INFO] Keycloak Examples .................................. SUCCESS [  0.007 s]
[INFO] Keycloak Examples - Admin Client ................... SUCCESS [  0.499 s]
[INFO] Broker Examples .................................... SUCCESS [  0.008 s]
[INFO] Keycloak Broker Examples - Facebook Authentication . SUCCESS [  0.130 s]
[INFO] Keycloak Broker Examples - Google Authentication ... SUCCESS [  0.129 s]
[INFO] Keycloak Broker Examples - SAML Identity Provider Brokering SUCCESS [  0.133 s]
[INFO] Keycloak Broker Examples - Twitter Authentication .. SUCCESS [  0.395 s]
[INFO] Keycloak Examples - CORS ........................... SUCCESS [  0.006 s]
[INFO] Angular Product Portal JS .......................... SUCCESS [  0.125 s]
[INFO] JAX-RS Database Service Using OAuth Bearer Tokens .. SUCCESS [  0.073 s]
[INFO] Demo Examples ...................................... SUCCESS [  0.008 s]
[INFO] Customer Portal - Secured via Valve ................ SUCCESS [  0.094 s]
[INFO] Customer Portal - Secured via Servlet Filter ....... SUCCESS [  0.387 s]
[INFO] Customer Portal CLI ................................ SUCCESS [  0.083 s]
[INFO] Customer Portal JS ................................. SUCCESS [  0.031 s]
[INFO] Product Portal ..................................... SUCCESS [  0.086 s]
[INFO] EAR example ........................................ SUCCESS [  0.160 s]
[INFO] Admin Access Example ............................... SUCCESS [  0.098 s]
[INFO] Angular Product Portal JS .......................... SUCCESS [  0.143 s]
[INFO] JAX-RS Database Service Using OAuth Bearer Tokens .. SUCCESS [  0.089 s]
[INFO] Simple OAuth Client ................................ SUCCESS [  0.094 s]
[INFO] Simple OAuth Client Using CDI and JSF .............. SUCCESS [  0.120 s]
[INFO] Service Account Example App ........................ SUCCESS [  0.087 s]
[INFO] Offline Access Portal .............................. SUCCESS [  0.103 s]
[INFO] Provider Examples .................................. SUCCESS [  0.010 s]
[INFO] Event Listener System.out Example .................. SUCCESS [  0.075 s]
[INFO] Event Store In-Mem Example ......................... SUCCESS [  0.083 s]
[INFO] Authenticator Example .............................. SUCCESS [  0.117 s]
[INFO] REST Example ....................................... SUCCESS [  0.063 s]
[INFO] Domain Extension Example ........................... SUCCESS [  0.244 s]
[INFO] JS Console ......................................... SUCCESS [  0.029 s]
[INFO] Keycloak Examples - Multi Tenant ................... SUCCESS [  0.082 s]
[INFO] Keycloak Examples - Basic Auth ..................... SUCCESS [  0.075 s]
[INFO] Keycloak Examples - Kerberos Credential Delegation . SUCCESS [  0.085 s]
[INFO] Themes Examples .................................... SUCCESS [  0.117 s]
[INFO] SAML Examples ...................................... SUCCESS [  0.007 s]
[INFO] Keycloak SAML Adapter Example POST Binding and Signatures SUCCESS [  0.045 s]
[INFO] Keycloak SAML Adapter Example POST Binding and Assertion Encryption SUCCESS [  0.046 s]
[INFO] Keycloak SAML Adapter Example Redirect Binding with Signatures SUCCESS [  0.048 s]
[INFO] Keycloak SAML Adapter as a Servlet Filter .......... SUCCESS [  0.318 s]
[INFO] LDAP Demo Application .............................. SUCCESS [  0.080 s]
[INFO] Keycloak Misc ...................................... SUCCESS [  0.008 s]
[INFO] Keycloak :: Spring :: Boot ......................... SUCCESS [  0.009 s]
[INFO] Keycloak :: Spring :: Boot :: Default ::  Starter .. SUCCESS [  0.033 s]
[INFO] Keycloak :: Spring :: Boot ......................... SUCCESS [  0.008 s]
[INFO] Keycloak :: Legacy :: Spring :: Boot :: Default ::  Starter SUCCESS [  0.056 s]
[INFO] keycloak-test-helper ............................... SUCCESS [  0.155 s]
[INFO] Keycloak Launcher .................................. SUCCESS [  0.046 s]
[INFO] Keycloak Proxy Server .............................. SUCCESS [  0.137 s]
[INFO] Keycloak Proxy 4.5.0.Final ......................... SUCCESS [  0.009 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.138 s
[INFO] Finished at: 2018-11-27T09:54:29+09:00
[INFO] ------------------------------------------------------------------------
```