LoginSignup
0
0

More than 3 years have passed since last update.

RedshiftのJDBCの依存関係をSBTで追加する

Last updated at Posted at 2020-06-02

RedshiftにJDBCで接続したい場合、JDBCのライブラリはMavenCentralにUpされていないため、シンプルに依存関係を書くだけでは追加が出来ないため、その設定方法を説明します。

1. 最新バージョンの検索

Redshift Jdbc42
から最新(or 安定バージョン)を探す

2. LibraryDependenciesに追加

build.sbt
libraryDependencies += "com.amazon.redshift" % "redshift-jdbc42" % "1.2.41.1065"

ここまでは普通に設定します。

3. Resolverの追加

MavenCentralにアップされていないため、このjarがデプロイされているMaven RepositoryをResolverに追加する必要があります。
RepositoryのURLは下のスクショの赤いラインのところで確認出来ます。
Redshift_maven_repository.png

こちらのURLをResolverとして追加します。

build.sbt
resolvers += "Mulesoft" at "https://repository.mulesoft.org/nexus/content/repositories/public/"

以上で直接JarをダウンロードしてこなくてもRedshiftのJDBCを依存に追加可能です。

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