gpt4 book ai didi

Grails 导出插件错误

转载 作者:行者123 更新时间:2023-12-03 21:19:58 33 4
gpt4 key购买 nike

我有一个空白的(全新的)Grails 2.3.8 项目,我正在尝试学习如何使用导出插件,到目前为止我只是添加了这一行:

compile ":export:1.6"

到我的 BuildConfig.goovy 和一些 MIME 类型到我的 Config.groovy:
grails.mime.types = [ // the first one is the default format
all: '*/*', // 'all' maps to '*' or the first available format in withFormat
atom: 'application/atom+xml',
css: 'text/css',
csv: 'text/csv',
form: 'application/x-www-form-urlencoded',
html: ['text/html','application/xhtml+xml'],
js: 'text/javascript',
pdf: 'application/pdf',
rtf: 'application/rtf',
excel: 'application/vnd.ms-excel',
ods: 'application/vnd.oasis.opendocument.spreadsheet',
json: ['application/json', 'text/json'],
multipartForm: 'multipart/form-data',
rss: 'application/rss+xml',
text: 'text/plain',
hal: ['application/hal+json','application/hal+xml'],
xml: ['text/xml', 'application/xml']
]

并尝试运行该应用程序,但出现以下错误:
| Error Resolve error obtaining dependencies: Could not find artifact org.odftoolkit:odfdom-  java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the     full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.odftoolkit:odfdom- java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.odftoolkit:odfdom-java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact org.odftoolkit:odfdom-java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.
grailsCentral()在我的存储库中没有注释。这是一个依赖报告:
build - Dependencies for the build system only (total: 34)
+--- xalan:serializer:2.7.1
+--- org.grails:grails-bootstrap:2.3.8
| \--- org.slf4j:jcl-over-slf4j:1.7.5
| \--- org.slf4j:slf4j-api:1.7.5
| \--- org.apache.ant:ant:1.8.4
| \--- jline:jline:2.11
| \--- org.apache.ant:ant-launcher:1.8.4
| \--- org.apache.ant:ant-trax:1.7.1
| \--- org.codehaus.groovy:groovy-all:2.1.9
| \--- org.apache.ant:ant-junit:1.8.4
| \--- net.java.dev.jna:jna:4.0.0
| \--- org.codehaus.gant:gant_groovy1.8:1.9.6
| \--- org.apache.ivy:ivy:2.3.0
| \--- org.fusesource.jansi:jansi:1.11
+--- org.grails:grails-scripts:2.3.8
| \--- org.spockframework:spock-core:0.7-groovy-2.0
| \--- org.hamcrest:hamcrest-core:1.3
| \--- junit:junit:4.11
+--- org.grails:grails-docs:2.3.8
| \--- org.xhtmlrenderer:core-renderer:R8
| \--- org.yaml:snakeyaml:1.8
| \--- org.grails:grails-gdoc-engine:1.0.1
| \--- com.lowagie:itext:2.0.8
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- commons-lang:commons-lang:2.6
+--- org.grails.plugins:tomcat:7.0.52.1
| \--- org.apache.tomcat:tomcat-catalina-ant:7.0.52
| \--- org.apache.tomcat.embed:tomcat-embed-jasper:7.0.52
| \--- org.apache.tomcat.embed:tomcat-embed-el:7.0.52
| \--- org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.52
| \--- org.apache.tomcat.embed:tomcat-embed-websocket:7.0.52
| \--- org.eclipse.jdt.core.compiler:ecj:3.7.2
| \--- org.apache.tomcat.embed:tomcat-embed-core:7.0.52


provided - Dependencies needed at development time, but not during deployment (total: 1)
+--- javax.servlet:javax.servlet-api:3.0.1

| Error Could not find artifact org.odftoolkit:odfdom-java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (scope: compile) (Use --stacktrace to see the full trace)

compile - Dependencies placed on the classpath for compilation (total: 78)
+--- org.codehaus.groovy:groovy-all:2.1.9
+--- org.grails:grails-plugin-rest:2.3.8
| \--- org.grails:grails-plugin-datasource:2.3.8
| \--- org.apache.tomcat:tomcat-jdbc:7.0.50
| \--- org.apache.tomcat:tomcat-juli:7.0.50
| \--- org.springframework:spring-jdbc:3.2.8.RELEASE
| \--- org.springframework:spring-context:3.2.8.RELEASE
| \--- org.springframework:spring-aop:3.2.8.RELEASE
| \--- org.springframework:spring-expression:3.2.8.RELEASE
| \--- org.slf4j:jcl-over-slf4j:1.7.5
| \--- org.slf4j:slf4j-api:1.7.5
| \--- com.google.code.gson:gson:2.2.4
| \--- org.grails:grails-web:2.3.8
| \--- org.springframework:spring-context-support:3.2.8.RELEASE
| \--- org.grails:grails-databinding:2.3.8
| \--- commons-fileupload:commons-fileupload:1.3.1
| \--- opensymphony:sitemesh:2.4
| \--- junit:junit:4.11
| \--- org.grails:grails-spring:2.3.8
| \--- org.springframework:spring-webmvc:3.2.8.RELEASE
| \--- xpp3:xpp3_min:1.1.4c
| \--- commons-el:commons-el:1.0
| \--- commons-beanutils:commons-beanutils:1.8.3
| \--- org.objenesis:objenesis:1.4
| \--- org.grails:grails-plugin-controllers:2.3.8
| \--- org.grails:grails-plugin-validation:2.3.8
+--- org.grails:grails-plugin-databinding:2.3.8
| \--- org.grails:grails-core:2.3.8
| \--- org.grails:grails-bootstrap:2.3.8
| \--- org.springframework:spring-web:3.2.8.RELEASE
| \--- org.springframework:spring-beans:3.2.8.RELEASE
| \--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final
| \--- org.springframework:spring-core:3.2.8.RELEASE
| \--- aopalliance:aopalliance:1.0
| \--- commons-validator:commons-validator:1.3.1
+--- org.grails:grails-plugin-i18n:2.3.8
| \--- commons-lang:commons-lang:2.6
+--- org.grails:grails-plugin-filters:2.3.8
+--- org.grails:grails-plugin-gsp:2.3.8
| \--- org.grails:grails-plugin-codecs:2.3.8
| \--- commons-codec:commons-codec:1.6
| \--- org.grails:grails-logging:2.3.8
+--- org.grails:grails-plugin-log4j:2.3.8
| \--- org.slf4j:jul-to-slf4j:1.7.5
+--- org.grails:grails-plugin-services:2.3.8
| \--- org.springframework:spring-tx:3.2.8.RELEASE
+--- org.grails:grails-plugin-servlets:2.3.8
+--- org.grails:grails-plugin-url-mappings:2.3.8
| \--- commons-io:commons-io:2.2
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1
+--- org.grails:grails-plugin-async:2.3.8
| \--- org.codehaus.gpars:gpars:1.1.0
| \--- org.multiverse:multiverse-core:0.7.0
| \--- org.codehaus.jsr166-mirror:jsr166y:1.7.0
| \--- org.grails:grails-async:2.3.8
+--- org.grails.plugins:export:1.6
| \--- net.sf.opencsv:opencsv:2.3
| \--- com.lowagie:itext:2.1.7
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- org.bouncycastle:bctsp-jdk14:1.38
| \--- org.bouncycastle:bcprov-jdk14:1.38
| \--- org.bouncycastle:bcmail-jdk14:1.38
| \--- com.lowagie:itext-rtf:2.1.7
| >>>> org.odftoolkit:odfdom-java:0.8.5
| \--- net.sourceforge.jexcelapi:jxl:2.6.12
+--- org.grails.plugins:scaffolding:2.0.3
+--- org.grails.plugins:cache:1.1.2
| \--- org.grails.plugins:webxml:1.4.1

| Error Could not find artifact org.odftoolkit:odfdom-java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (scope: runtime) (Use --stacktrace to see the full trace)

runtime - Dependencies needed at runtime but not for compilation (total: 111)
+--- org.codehaus.groovy:groovy-all:2.1.9
+--- org.grails:grails-plugin-rest:2.3.8
| \--- org.grails:grails-plugin-datasource:2.3.8
| \--- org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.50
| \--- org.apache.tomcat:tomcat-jdbc:7.0.50
| \--- org.apache.tomcat:tomcat-juli:7.0.50
| \--- org.springframework:spring-jdbc:3.2.8.RELEASE
| \--- org.springframework:spring-context:3.2.8.RELEASE
| \--- org.springframework:spring-aop:3.2.8.RELEASE
| \--- org.springframework:spring-expression:3.2.8.RELEASE
| \--- org.slf4j:jcl-over-slf4j:1.7.5
| \--- org.slf4j:slf4j-api:1.7.5
| \--- com.google.code.gson:gson:2.2.4
| \--- org.grails:grails-web:2.3.8
| \--- taglibs:standard:1.1.2
| \--- org.springframework:spring-context-support:3.2.8.RELEASE
| \--- org.grails:grails-databinding:2.3.8
| \--- org.aspectj:aspectjweaver:1.7.4
| \--- commons-fileupload:commons-fileupload:1.3.1
| \--- opensymphony:sitemesh:2.4
| \--- org.aspectj:aspectjrt:1.7.4
| \--- org.springframework:spring-aspects:3.2.8.RELEASE
| \--- junit:junit:4.11
| \--- org.grails:grails-spring:2.3.8
| \--- org.springframework:spring-webmvc:3.2.8.RELEASE
| \--- xpp3:xpp3_min:1.1.4c
| \--- javax.servlet:jstl:1.1.2
| \--- commons-el:commons-el:1.0
| \--- commons-beanutils:commons-beanutils:1.8.3
| \--- org.objenesis:objenesis:1.4
| \--- org.grails:grails-plugin-controllers:2.3.8
| \--- org.grails:grails-plugin-validation:2.3.8
+--- org.grails:grails-plugin-databinding:2.3.8
| \--- org.grails:grails-core:2.3.8
| \--- oro:oro:2.0.8
| \--- xalan:serializer:2.7.1
| \--- org.grails:grails-bootstrap:2.3.8
| \--- org.springframework:spring-web:3.2.8.RELEASE
| \--- asm:asm:3.3.1
| \--- org.springframework:spring-beans:3.2.8.RELEASE
| \--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final
| \--- cglib:cglib:2.2.2
| \--- org.springframework:spring-core:3.2.8.RELEASE
| \--- aopalliance:aopalliance:1.0
| \--- commons-validator:commons-validator:1.3.1
+--- org.grails:grails-plugin-i18n:2.3.8
| \--- commons-lang:commons-lang:2.6
+--- org.grails:grails-plugin-filters:2.3.8
+--- org.grails:grails-plugin-gsp:2.3.8
| \--- org.grails:grails-plugin-codecs:2.3.8
| \--- commons-codec:commons-codec:1.6
| \--- org.grails:grails-logging:2.3.8
+--- org.grails:grails-plugin-log4j:2.3.8
| \--- org.slf4j:jul-to-slf4j:1.7.5
+--- org.grails:grails-plugin-services:2.3.8
| \--- org.springframework:spring-tx:3.2.8.RELEASE
+--- org.grails:grails-plugin-servlets:2.3.8
+--- org.grails:grails-plugin-url-mappings:2.3.8
| \--- commons-io:commons-io:2.2
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1
+--- org.grails:grails-plugin-async:2.3.8
| \--- org.codehaus.gpars:gpars:1.1.0
| \--- org.multiverse:multiverse-core:0.7.0
| \--- org.codehaus.jsr166-mirror:jsr166y:1.7.0
| \--- org.grails:grails-async:2.3.8
+--- com.h2database:h2:1.3.173
+--- log4j:log4j:1.2.17
+--- org.grails:grails-resources:2.3.8
+--- org.grails.plugins:export:1.6
| \--- xerces:xercesImpl:2.9.0
| \--- xml-apis:xml-apis:1.3.04
| \--- net.sf.opencsv:opencsv:2.3
| \--- com.lowagie:itext:2.1.7
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- org.bouncycastle:bctsp-jdk14:1.38
| \--- org.bouncycastle:bcprov-jdk14:1.38
| \--- org.bouncycastle:bcmail-jdk14:1.38
| \--- com.lowagie:itext-rtf:2.1.7
| >>>> org.odftoolkit:odfdom-java:0.8.5
| \--- net.sourceforge.jexcelapi:jxl:2.6.12
+--- org.grails.plugins:scaffolding:2.0.3
+--- org.grails.plugins:cache:1.1.2
| \--- org.grails.plugins:webxml:1.4.1
+--- org.grails.plugins:hibernate:3.6.10.13
| \--- org.hibernate:hibernate-ehcache:3.6.10.Final
| \--- net.sf.ehcache:ehcache-core:2.4.8
| \--- org.grails:grails-datastore-core:3.0.6.RELEASE
| \--- org.javassist:javassist:3.17.1-GA
| \--- javax.transaction:jta:1.1
| \--- org.grails:grails-datastore-gorm:3.0.6.RELEASE
| \--- org.grails:grails-datastore-gorm-hibernate:3.0.6.RELEASE
| \--- org.grails:grails-datastore-gorm-hibernate-core:3.0.6.RELEASE
| \--- antlr:antlr:2.7.7
| \--- org.grails:grails-datastore-gorm-plugin-support:3.0.6.RELEASE
| \--- dom4j:dom4j:1.6.1
| \--- org.springframework:spring-orm:3.2.8.RELEASE
| \--- org.grails:grails-datastore-simple:3.0.6.RELEASE
| \--- commons-collections:commons-collections:3.2.1
| \--- org.hibernate:hibernate-core:3.6.10.Final
| \--- javax.validation:validation-api:1.0.0.GA
| \--- org.hibernate:hibernate-validator:4.1.0.Final
| \--- org.hibernate:hibernate-entitymanager:3.6.10.Final
| \--- org.hibernate:hibernate-commons-annotations:3.2.0.Final
+--- org.grails.plugins:database-migration:1.4.0
| \--- org.liquibase:liquibase-core:2.0.5
+--- org.grails.plugins:jquery:1.11.0.2
+--- org.grails.plugins:resources:1.2.7

| Error Could not find artifact org.odftoolkit:odfdom-java:jar:0.8.5 in grailsCentral (http://repo.grails.org/grails/plugins) (scope: test) (Use --stacktrace to see the full trace)

test - Dependencies needed for test compilation and execution but not at runtime (total: 116)
+--- javax.servlet:javax.servlet-api:3.0.1
+--- org.codehaus.groovy:groovy-all:2.1.9
+--- org.grails:grails-plugin-rest:2.3.8
| \--- org.grails:grails-plugin-datasource:2.3.8
| \--- org.apache.tomcat.embed:tomcat-embed-logging-log4j:7.0.50
| \--- org.apache.tomcat:tomcat-jdbc:7.0.50
| \--- org.apache.tomcat:tomcat-juli:7.0.50
| \--- org.springframework:spring-jdbc:3.2.8.RELEASE
| \--- org.springframework:spring-context:3.2.8.RELEASE
| \--- org.springframework:spring-aop:3.2.8.RELEASE
| \--- org.springframework:spring-expression:3.2.8.RELEASE
| \--- org.slf4j:jcl-over-slf4j:1.7.5
| \--- org.slf4j:slf4j-api:1.7.5
| \--- com.google.code.gson:gson:2.2.4
| \--- org.grails:grails-web:2.3.8
| \--- taglibs:standard:1.1.2
| \--- org.springframework:spring-context-support:3.2.8.RELEASE
| \--- org.grails:grails-databinding:2.3.8
| \--- org.aspectj:aspectjweaver:1.7.4
| \--- commons-fileupload:commons-fileupload:1.3.1
| \--- opensymphony:sitemesh:2.4
| \--- org.aspectj:aspectjrt:1.7.4
| \--- org.springframework:spring-aspects:3.2.8.RELEASE
| \--- junit:junit:4.11
| \--- org.grails:grails-spring:2.3.8
| \--- org.springframework:spring-webmvc:3.2.8.RELEASE
| \--- xpp3:xpp3_min:1.1.4c
| \--- javax.servlet:jstl:1.1.2
| \--- commons-el:commons-el:1.0
| \--- commons-beanutils:commons-beanutils:1.8.3
| \--- org.objenesis:objenesis:1.4
| \--- org.grails:grails-plugin-controllers:2.3.8
| \--- org.grails:grails-plugin-validation:2.3.8
+--- org.grails:grails-plugin-databinding:2.3.8
| \--- org.grails:grails-core:2.3.8
| \--- oro:oro:2.0.8
| \--- xalan:serializer:2.7.1
| \--- org.grails:grails-bootstrap:2.3.8
| \--- org.springframework:spring-web:3.2.8.RELEASE
| \--- asm:asm:3.3.1
| \--- org.springframework:spring-beans:3.2.8.RELEASE
| \--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final
| \--- cglib:cglib:2.2.2
| \--- org.springframework:spring-core:3.2.8.RELEASE
| \--- aopalliance:aopalliance:1.0
| \--- commons-validator:commons-validator:1.3.1
+--- org.grails:grails-plugin-i18n:2.3.8
| \--- commons-lang:commons-lang:2.6
+--- org.grails:grails-plugin-filters:2.3.8
+--- org.grails:grails-plugin-gsp:2.3.8
| \--- org.grails:grails-plugin-codecs:2.3.8
| \--- commons-codec:commons-codec:1.6
| \--- org.grails:grails-logging:2.3.8
+--- org.grails:grails-plugin-log4j:2.3.8
| \--- org.slf4j:jul-to-slf4j:1.7.5
+--- org.grails:grails-plugin-services:2.3.8
| \--- org.springframework:spring-tx:3.2.8.RELEASE
+--- org.grails:grails-plugin-servlets:2.3.8
+--- org.grails:grails-plugin-url-mappings:2.3.8
| \--- commons-io:commons-io:2.2
| \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3.1
+--- org.grails:grails-plugin-async:2.3.8
| \--- org.codehaus.gpars:gpars:1.1.0
| \--- org.multiverse:multiverse-core:0.7.0
| \--- org.codehaus.jsr166-mirror:jsr166y:1.7.0
| \--- org.grails:grails-async:2.3.8
+--- org.grails:grails-plugin-testing:2.3.8
| \--- org.springframework:spring-test:3.2.8.RELEASE
| \--- org.grails:grails-plugin-domain-class:2.3.8
| \--- org.grails:grails-test:2.3.8
| \--- org.grails:grails-plugin-mimetypes:2.3.8
| \--- org.grails:grails-plugin-converters:2.3.8
+--- org.spockframework:spock-core:0.7-groovy-2.0
| \--- org.hamcrest:hamcrest-core:1.3
+--- com.h2database:h2:1.3.173
+--- log4j:log4j:1.2.17
+--- org.grails:grails-resources:2.3.8
+--- org.grails.plugins:export:1.6
| \--- xerces:xercesImpl:2.9.0
| \--- xml-apis:xml-apis:1.3.04
| \--- net.sf.opencsv:opencsv:2.3
| \--- com.lowagie:itext:2.1.7
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- org.bouncycastle:bctsp-jdk14:1.38
| \--- org.bouncycastle:bcprov-jdk14:1.38
| \--- org.bouncycastle:bcmail-jdk14:1.38
| \--- com.lowagie:itext-rtf:2.1.7
| >>>> org.odftoolkit:odfdom-java:0.8.5
| \--- net.sourceforge.jexcelapi:jxl:2.6.12
+--- org.grails.plugins:scaffolding:2.0.3
+--- org.grails.plugins:cache:1.1.2
| \--- org.grails.plugins:webxml:1.4.1
+--- org.grails.plugins:hibernate:3.6.10.13
| \--- org.hibernate:hibernate-ehcache:3.6.10.Final
| \--- net.sf.ehcache:ehcache-core:2.4.8
| \--- org.grails:grails-datastore-core:3.0.6.RELEASE
| \--- org.javassist:javassist:3.17.1-GA
| \--- javax.transaction:jta:1.1
| \--- org.grails:grails-datastore-gorm:3.0.6.RELEASE
| \--- org.grails:grails-datastore-gorm-hibernate:3.0.6.RELEASE
| \--- org.grails:grails-datastore-gorm-hibernate-core:3.0.6.RELEASE
| \--- antlr:antlr:2.7.7
| \--- org.grails:grails-datastore-gorm-plugin-support:3.0.6.RELEASE
| \--- dom4j:dom4j:1.6.1
| \--- org.springframework:spring-orm:3.2.8.RELEASE
| \--- org.grails:grails-datastore-simple:3.0.6.RELEASE
| \--- commons-collections:commons-collections:3.2.1
| \--- org.hibernate:hibernate-core:3.6.10.Final
| \--- javax.validation:validation-api:1.0.0.GA
| \--- org.hibernate:hibernate-validator:4.1.0.Final
| \--- org.hibernate:hibernate-entitymanager:3.6.10.Final
| \--- org.hibernate:hibernate-commons-annotations:3.2.0.Final
+--- org.grails.plugins:database-migration:1.4.0
| \--- org.liquibase:liquibase-core:2.0.5
+--- org.grails.plugins:jquery:1.11.0.2
+--- org.grails.plugins:resources:1.2.7

最佳答案

根据此链接 https://jira.grails.org/plugins/servlet/mobile#issue/GPEXPORT-28

您可以通过解决方法修复它。将此添加到 Buildconfig.Groovy

repositories {
...
mavenRepo "http://repo.grails.org/grails/core"
}

dependencies {
...
compile 'commons-beanutils:commons-beanutils:1.8.3'
}

显然,自定义存储库不会从插件传播到项目。

关于Grails 导出插件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24411420/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com