前書き
Maven でサードパーティ製のjarをどのように扱えばよいのかとインターネッツをカチカチしたところ インターナルリポジトリを構築するのがよさそうだと判断した。 引き続きカチカチしていたら、 Nexus というWebブラウザ上からMavenリポジトリの管理を行うツールがあることを知ったのでお試しする。 まずはインストールから。Nexus をインストール
サイトを見るとOSS版と商用版があることが判明。 http://www.sonatype.org/nexus/go/OSS版をダウンロードする。
今回は手元のWindows7マシンにインストールするので、zipを選択。
そして、warファイルバージョンとJettyがバンドルされたアーカイブバージョンがあるみたいなので、お手軽に試してみたいのでバンドルバージョンを選択した。
nexus-2.11.3-01-bundle
適当な場所にzipを解凍して配置。
今回はnexusというフォルダを用意した。
bin フォルダに入っているbatファイルを見つけたので、動かしてみる。
C:\nexus\nexus-2.11.3-01\bin>nexus.bat
Usage: nexus.bat { console : start : stop : restart : install : uninstall }
続行するには何かキーを押してください . . .
サービスとして登録しておくと便利なので、
install して start をする。
C:\nexus\nexus-2.11.3-01\bin>nexus.bat install
ログとり忘れ...
C:\nexus\nexus-2.11.3-01\bin>nexus.bat start
wrapper | Starting the nexus service...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | Waiting to start...
wrapper | nexus started.
started.の文字を確認してから以下のURLにアクセスする。
http://localhost:8081/nexus/
てってれー!動いたぞ。
バンドルされているやつだと、かなりお手軽だ。
ログインIDと初期パスワードは以下の通り。
ID:admin
pass:admin123
今日はここまでー!
memo
サービスに登録されていることを確認する
nexus で登録されている。 Nexus を止める
C:\nexus\nexus-2.11.3-01\bin>nexus.bat stop
wrapper | Stopping the nexus service...
wrapper | nexus stopped.