Playframework1.2系で管理している外部ライブラリの構成変更を行う際のメモ
Playframework1.2系に於いて、『play deps』した時にPlayframework側の方で初期設定されているJARライブラリの内容を変更した時の手順メモ。プロジェクト構成時に既に入っておいて欲しい/都度プロジェクトに対してライブラリ追加の操作を行わなきゃならんのは面倒!という時に。
2013/02/07 10:09 45,024 hamcrest-core-1.3.jar 【←追加】 2013/02/07 10:09 53,070 hamcrest-library-1.3.jar 【←追加】 2012/07/03 21:31 253,160 junit-4.10.jar 【←削除】 2013/02/07 10:08 245,039 junit-4.11.jar 【←追加】
- 依存関係を設定するファイル/PLAY_HOME/framework/dependencies.yml に以下の内容を反映。
# Play
self: play -> play $version
# Don't follow transitive dependencies for this project
transitiveDependencies: false
# This core dependencies are required by Play framework
require: &allDependencies
- antlr 2.7.7
:
:
- junit 4.10 【←削除】
- junit 4.11 【←追加】
:
- org.hamcrest -> hamcrest-core 1.3 【←追加】
- org.hamcrest -> hamcrest-library 1.3 【←追加】
:
:
||
-playの依存性解消コマンド実行。今回対象に含めたライブラリが取り込まれているのが確認出来ます。
>|dos|
C:\IdeaProject>play new junitdev
C:\IdeaProject\>play deps junitdev --verbose
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.5, http://www.playframework.org
~
~ Resolving dependencies using C:\IdeaProject\junitdev\conf\dependencies.yml,
~
:: resolving dependencies :: play-application#junitdev;1.0
confs: [default]
found play#play;1.2.5 in playCore
found antlr#antlr;2.7.7 in playCoreDependencies
:
found junit#junit;4.11 in playCoreDependencies 【←取り込まれてる】
:
found org.hamcrest#hamcrest-core;1.3 in playCoreDependencies 【←取り込まれてる】
found org.hamcrest#hamcrest-library;1.3 in playCoreDependencies 【←取り込まれてる】
:
found xmlpull#xmlpull;1.1.3.1 in playCoreDependencies
:: resolution report :: resolve 747ms :: artifacts dl 34ms
:: modules in use:
antlr#antlr;2.7.7 from playCoreDependencies in [default]
:
junit#junit;4.11 from playCoreDependencies in [default] 【←取り込まれてる】
:
org.hamcrest#hamcrest-core;1.3 from playCoreDependencies in [default] 【←取り込まれてる】
org.hamcrest#hamcrest-library;1.3 from playCoreDependencies in [default] 【←取り込まれてる】
:
xmlpull#xmlpull;1.1.3.1 from playCoreDependencies in [default]
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 55 | 55 | 0 | 0 || 55 | 0 |
---------------------------------------------------------------------
~
~ No dependencies to install
~
~ Done!
~
C:\IdeaProject>play idealize junitdev
- IDE経由でプロジェクトを開き、ライブラリ情報に指定したものが取り込まれている事を確認。
Play2.x系はまた違う形になるのかな?時が来たら調べてみる。

