Dataflow(beam sdk)のビルドで java.lang.reflect.InvocationTargetException がでて困る

## 背景

サポートが切れるということで最近、Dataflow SDKからApache Beam SDKに移行した。
[SDK バージョンのサポート状況](https://cloud.google.com/dataflow/docs/support/sdk-version-support-status)

このあたりを参考に移行した。
[Apache Beam SDK のインストール](https://cloud.google.com/dataflow/docs/guides/installing-beam-sdk?hl=ja)

移行時はビルドできてたのに、最近(現在2019/8)ビルドしようとしたら、いきなりこけるなーってなった。

## エラーログ

```
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.beam.model.pipeline.v1.RunnerApi$Coder$Builder.setSpec(Lorg/apache/beam/model/pipeline/v1/RunnerApi$SdkFunctionSpec$Builder;)Lorg/apache/beam/model/pipeline/v1/RunnerApi$Coder$Builder;
	at org.apache.beam.runners.core.construction.CoderTranslation.toCustomCoder(CoderTranslation.java:113)
	at org.apache.beam.runners.core.construction.CoderTranslation.toProto(CoderTranslation.java:83)
	at org.apache.beam.runners.core.construction.SdkComponents.registerCoder(SdkComponents.java:254)
	at org.apache.beam.runners.core.construction.PCollectionTranslation.toProto(PCollectionTranslation.java:35)
	at org.apache.beam.runners.core.construction.SdkComponents.registerPCollection(SdkComponents.java:209)
	at org.apache.beam.runners.core.construction.PTransformTranslation.translateAppliedPTransform(PTransformTranslation.java:386)
	at org.apache.beam.runners.core.construction.PTransformTranslation$DefaultUnknownTransformTranslator.translate(PTransformTranslation.java:242)
	at org.apache.beam.runners.core.construction.PTransformTranslation.toProto(PTransformTranslation.java:155)
	at org.apache.beam.runners.core.construction.SdkComponents.registerPTransform(SdkComponents.java:157)
	at org.apache.beam.runners.core.construction.PipelineTranslation$1.visitPrimitiveTransform(PipelineTranslation.java:87)
	at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:665)
	at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:657)
	at org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:657)
	at org.apache.beam.sdk.runners.TransformHierarchy$Node.access$600(TransformHierarchy.java:317)
	at org.apache.beam.sdk.runners.TransformHierarchy.visit(TransformHierarchy.java:251)
	at org.apache.beam.sdk.Pipeline.traverseTopologically(Pipeline.java:458)
	at org.apache.beam.runners.core.construction.PipelineTranslation.toProto(PipelineTranslation.java:59)
	at org.apache.beam.runners.dataflow.DataflowPipelineTranslator.translate(DataflowPipelineTranslator.java:168)
	at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:740)
	at org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:179)
	at org.apache.beam.sdk.Pipeline.run(Pipeline.java:313)
	at org.apache.beam.sdk.Pipeline.run(Pipeline.java:299)
	at jp.ne.opt.spinapp.runner.EventLogImporter.main(EventLogImporter.java:78)
	... 6 more
```


## 原因
2019/8 リリースのversion 2.14.0が悪さしてた模様

<img width="883" alt="スクリーンショット 2019-08-22 13.35.13.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/20307/51cd4bcb-2ab8-436d-1606-e09efb4e93a3.png">


[Apache Beam SDK のインストール](https://cloud.google.com/dataflow/docs/guides/installing-beam-sdk?hl=ja) ←このpom.xmlではversion範囲指定になっているので2系最新版(今回は2.14.0)がinstallされてしまう。(もとは2.13.0)

## 解決法
pom.xmlを以下のように変更にversion固定指定する

```xml
<dependency>
  <groupId>org.apache.beam</groupId>
  <artifactId>beam-sdks-java-core</artifactId>
  <!-- <version>[2.13.0, 2.99)</version> -->
  <version>2.13.0</version>
  </dependency>
```

で `mvn clean install` で解決した