[英]Installing Grails CXF Plugin
I am running Grails v2.4.0 and I have been trying to install the Grails CXF plugin for web services. 我正在运行Grails v2.4.0,并且一直在尝试为网络服务安装Grails CXF插件。 I downloaded the .zip file for the plugin and then ran the grails install-plugin /path/to/zip.
我下载了插件的.zip文件,然后运行grails install-plugin / path / to / zip。 While trying to install, it gives me an error that it can't find this dependency : org.apache.cxf:cxf-rt-frontend-jaxws:2.3.0 .
尝试安装时,它给我一个错误,它找不到此依赖项: org.apache.cxf:cxf-rt-frontend-jaxws:2.3.0 。 The page where I downloaded this plugin mentions that everything required is in the zip.
我下载此插件的页面提到所需的所有内容都在zip中。 I can't use maven to download the required files automatically because my work location doesn't allow anything to be downloaded.
我无法使用maven自动下载所需的文件,因为我的工作地点不允许下载任何内容。 Is there a list of files required to install CXF manually that I can reference?
我可以参考手动安装CXF所需的文件列表吗?
Instead of using install-plugin
you should add a dependency to the relevant section of your BuildConfig.groovy, and make sure the mavenCentral()
repository is enabled. 而不是使用
install-plugin
您应该将依赖项添加到BuildConfig.groovy的相关部分,并确保启用了mavenCentral()
存储库。 Uninstall the zip plugin you have already installed and then edit your BuildConfig: 卸载已安装的zip插件,然后编辑BuildConfig:
grails.project.dependency.resolution = {
// ...
repositories {
// other repositories as before
mavenCentral()
}
plugins {
// other plugins as before
compile ":cxf:0.9.0"
}
}
Since you can't download the transitive dependencies using Maven, you should be able to exclude them like this: 由于您无法使用Maven下载可传递依赖项,因此您应该能够像这样排除它们:
grails.project.dependency.resolution = {
plugins {
compile ":cxf:0.9.0" {
excludes([ group: 'org.apache.cxf', name: 'cxf-rt-frontend-jaxws']
// you may need to exclude quite a few...
}
}
Then download the dependency manually and put them in your lib directory. 然后手动下载依赖项并将它们放在您的lib目录中。 For instance, download the cxf-rt-frontend-jaxws from here: http://search.maven.org/#search|ga|1|g%3A%22org.apache.cxf%22%20AND%20a%3A%22cxf-rt-frontend-jaxws%22%20AND%20v%3A%222.3.0%22
例如,从此处下载cxf-rt-frontend-jaxws: http ://search.maven.org/#search|ga|1|g%3A%22org.apache.cxf%22%20AND%20a%3A% 22cxf-rt-frontend-jaxws%22%20AND%20v%3A%222.3.0%22
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.