我花了2天的时间在GGTS中使用grails进行Web开发。我正在跟着一本书。本书使用命令行。到目前为止,这很棒,但是现在这本书正在使用webtest。我已经在命令行上安装了webtest,但是如何在GGTS中运行它呢?
编辑:我在GGTS中找到了grails控制台。这是我的输出
grails> install-plugin webtest
Problem executing: install-plugin webtest
Command terminated with an exception: java.lang.Exception (see details for partial output)
Command: /usr/lib/jvm/java-7-oracle/bin/java (Dec 26, 2013, 11:22:59 AM)
---- System.out ----
| Loading Grails 2.1.1
| Configuring classpath
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:webtest:3.0.1
---- System.err ----
------System.out:-----------
| Loading Grails 2.1.1
| Configuring classpath
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:webtest:3.0.1
编辑:在BuildConfig.groovy中将日志级别设置为“暖”后:
| Loading Grails 2.1.1
| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#webtest;3.0.1
==== grailsPlugins: tried
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/Documents/workspace-ggts-3.5.0.M1/collab-todo/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/hibernate-2.1.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/resources-1.1.6/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/cache-1.0.0/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/webxml-1.4.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/database-migration-1.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/jquery-1.8.0/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/tomcat-2.1.1/lib/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/ivy-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/jars/webtest-3.0.1.jar
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/bundles/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/src/libs/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/src/libs/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/dist/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/dist/webtest-3.0.1.jar
==== grailsHome: tried
/home/adminuser/.grails/2.1.1/cached-installed-plugins/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.grails/2.1.1/cached-installed-plugins/webtest-3.0.1.jar
==== grailsHome: tried
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/plugins/webtest-3.0.1.jar
==== grailsCentral: tried
http://grails.org/plugins/grails-webtest/tags/RELEASE_3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://grails.org/plugins/grails-webtest/tags/RELEASE_3.0.1/grails-webtest-3.0.1.jar
==== http://repo.grails.org/grails/core: tried
http://repo.grails.org/grails/core/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://repo.grails.org/grails/core/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== localMavenResolver: tried
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://repo1.maven.org/maven2/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== localMavenResolver: tried
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#webtest;3.0.1: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#webtest;3.0.1
==== grailsPlugins: tried
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/Documents/workspace-ggts-3.5.0.M1/collab-todo/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/hibernate-2.1.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/resources-1.1.6/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/cache-1.0.0/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/webxml-1.4.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/database-migration-1.1/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/jquery-1.8.0/lib/webtest-3.0.1.jar
/home/adminuser/.grails/2.1.1/projects/collab-todo/plugins/tomcat-2.1.1/lib/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/ivy-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/jars/webtest-3.0.1.jar
/usr/share/grails/2.1.1/lib/org.grails.plugins/webtest/bundles/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/src/libs/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/src/libs/webtest-3.0.1.jar
==== grailsHome: tried
/usr/share/grails/2.1.1/dist/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/dist/webtest-3.0.1.jar
==== grailsHome: tried
/home/adminuser/.grails/2.1.1/cached-installed-plugins/webtest-3.0.1.xml
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.grails/2.1.1/cached-installed-plugins/webtest-3.0.1.jar
==== grailsHome: tried
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/usr/share/grails/2.1.1/plugins/webtest-3.0.1.jar
==== grailsCentral: tried
http://grails.org/plugins/grails-webtest/tags/RELEASE_3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://grails.org/plugins/grails-webtest/tags/RELEASE_3.0.1/grails-webtest-3.0.1.jar
==== http://repo.grails.org/grails/core: tried
http://repo.grails.org/grails/core/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://repo.grails.org/grails/core/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== localMavenResolver: tried
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
http://repo1.maven.org/maven2/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
==== localMavenResolver: tried
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.pom
-- artifact org.grails.plugins#webtest;3.0.1!webtest.jar:
/home/adminuser/.m2/repository/org/grails/plugins/webtest/3.0.1/webtest-3.0.1.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#webtest;3.0.1: not found
::::::::::::::::::::::::::::::::::::::::::::::
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:webtest:3.0.1
最佳答案
install-plugin
命令is now deprecated。
尝试将following line添加到您的BuildConfig.groovy
中:
compile ":webtest:3.0.1"
然后尝试从GGTS启动grails应用程序。
PS:您是代理人吗?