install-dependency
目的 Purpose
Installs a JAR dependency, making it available to Grails dependency resolution mechanism.使用例 Examples
grails install-dependency mysql:mysql-connector-java:5.1.16 grails install-dependency mysql:mysql-connector-java:5.1.16 --dir=lib grails install-dependency --group=mysql --name=mysql-connector-java --version=5.1.16
詳細 Description
使用方法: Usage:
grails install-dependency [dependency]
Arguments:
group
- The group of the dependencyname
- The name of the dependencyversion
- The version of the dependencyrepository
- The repository to resolve fromdir
- The target directory to resolve JAR files to
install-dependency
command allows the installation of a JAR dependency into the dependency cache so that it can be resolved locally (without needing to configure a repository explicitly).In its most simple form you can pass a single argument that defines the dependency in the form "group:name:version":grails install-dependency mysql:mysql-connector-java:5.1.16
repository
argument:grails install-dependency mysql:mysql-connector-java:5.1.16 \ --repository=http://download.java.net/maven/2
$USER_HOME/.ivy2/cache
) when using Ivy and into your local Maven repoistory (typically $USER_HOME/.m2/repository
) when using Aether, if you wish the JAR files to be placed in an alternative directory you can use the dir
argument:grails install-dependency mysql:mysql-connector-java:5.1.16 --dir=lib