- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为 Atlassian Confluence 编写一个插件。我已经让它在开发环境中工作了一段时间了。但是,当我打包插件并将其部署到测试系统中时,插件无法启用。我在堆栈跟踪中看到以下原因/错误消息(完整包含在本问题的末尾)。我对其进行了格式化以便于阅读:
Caused by: org.osgi.framework.BundleException:
Constraint violation for package 'org.springframework.transaction' when resolving module 200.0 between existing import 0.org.springframework.transaction
BLAMED ON
[
[200.0] package;
(&(package=org.springframework.transaction)(version>=0.0.0)(version<=0.0.0))
]
and uses constraint 4.0.org.springframework.transaction
BLAMED ON
[
[200.0] package;
(package=org.springframework.jms.connection)
]
我无法理解这想告诉我什么。 Confluence OSGi 容器调试信息针对所提到的包指示以下内容:
0 - 系统包
4 - Spring框架
200 - com.foo.ConflunceJMSIntegration(我的插件)
我怀疑这与各个模块使用的类加载器有关,但我只是不知道如何解释该消息或如何解决该问题。
该插件适用于 Confluence 5.5.4,但在 5.6.4 上失败。
我制作了一个新的空生成插件(atlas-create-confluence-plugin),并小心地将我的每个依赖项添加到 pom.xml 中,直到我能够产生失败。当我添加此依赖项时,显然会导致失败:
com.foo JMS工具 1.0-快照 org.slf4j slf4j-api javax.mail 邮件 日志4j 日志4j
这是我写的一个库。虽然它本身不使用 Spring 进行配置,但某些对象实现 org.springframework.beans.factory.DisposableBean 并使用 org.springframework.util.StringUtils,因此 Spring 是一个合法的要求。
这是 JMSTools 中的依赖项:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.5.6.SEC02</version>
<scope>provided</scope>
</dependency>
而且...现在我输入此内容,我看到 Confluence 5.6.4 使用 org.springframework:spring-core:jar:2.5.6.SEC03-atlassian-6:compile。
我刚刚尝试将 JMSTools 使用的版本更改为 2.5.6.SEC03,但仍然没有解决问题。即使确实如此,我也会担心 future 的更新 Confluence 可能会更新 Spring 并再次破坏一些东西。我的库不依赖于特定版本的 Spring,它只需要实现/使用我之前提到的类和接口(interface)。
我目前的怀疑是 org.apache.activemq:activemq-all (JMSTools 的依赖项)可能出于某种原因引用 org.springframework.jms.connection,从而以某种方式导致冲突。但是......我只是不知道(还)。
5.6.4
com.foo:ConflunceJMSIntegration:atlassian-plugin:1.0-SNAPSHOT
+- junit:junit:jar:4.10:test
| \- org.hamcrest:hamcrest-core:jar:1.1:test
+- com.atlassian.confluence:confluence:jar:5.6.4:provided
| +- com.atlassian.security:atlassian-secure-xml:jar:3.2.3:provided
| +- com.atlassian.crowd:embedded-crowd-api:jar:2.7.1:provided
| | +- org.apache.commons:commons-lang3:jar:3.1:provided
| | \- com.google.code.findbugs:jsr305:jar:2.0.1:provided
| +- com.atlassian.crowd:crowd-core:jar:2.7.1:provided
| | +- com.atlassian.crowd:crowd-api:jar:2.7.1:provided
| | +- com.atlassian.crowd:crowd-persistence-file:jar:2.7.1:provided
| | +- com.atlassian.crowd:crowd-events:jar:2.7.1:provided
| | \- com.atlassian.security:atlassian-secure-random:jar:3.2:provided
| +- com.atlassian.crowd:crowd-integration-api:jar:2.7.1:provided
| | \- com.atlassian.ip:atlassian-ip:jar:3.1:provided
| +- com.atlassian.crowd:crowd-integration-seraph25:jar:2.7.1:provided
| | \- com.atlassian.crowd:crowd-integration-client-common:jar:2.7.1:provided
| +- com.atlassian.crowd:embedded-crowd-spi:jar:2.7.1:provided
| +- com.atlassian.crowd:crowd-password-encoders:jar:2.7.1:provided
| | +- com.atlassian.security:atlassian-password-encoder:jar:3.2:provided
| | \- org.springframework.security:spring-security-core:jar:3.1.4.RELEASE:provided
| +- com.atlassian.crowd:atlassian-embedded-crowd-atlassian-user:jar:1.7.3:provided
| +- com.atlassian.crowd:embedded-crowd-core:jar:2.7.1:provided
| | \- com.atlassian.crowd:crowd-remote:jar:2.7.1:provided
| | \- com.atlassian.crowd:crowd-integration-client-rest:jar:2.7.1:provided
| +- com.atlassian.crowd:crowd-persistence:jar:2.7.1:provided
| +- com.atlassian.crowd:crowd-ldap:jar:2.7.1:provided
| +- org.springframework.ldap:spring-ldap-core:jar:1.3.1.RELEASE:provided
| +- com.atlassian.confluence:confluence-upgrade:jar:5.6.4:provided
| +- com.atlassian.gzipfilter:atlassian-gzipfilter:jar:1.23:provided
| | +- javax.servlet:servlet-api:jar:2.3:provided
| | \- com.atlassian.gzipfilter:atlassian-flushable-gzipoutputstream:jar:1.1:provided
| +- com.atlassian.analytics:analytics-api:jar:3.37:provided
| +- com.atlassian.applinks:applinks-api:jar:4.2.3:provided
| +- com.atlassian.applinks:applinks-spi:jar:4.2.3:provided
| +- com.atlassian.applinks:applinks-host:jar:4.2.3:provided
| +- com.atlassian.dragonfly:dragonfly-api:jar:1.1:provided
| +- com.atlassian.dragonfly:dragonfly-spi:jar:1.1:provided
| +- com.atlassian.dragonfly:dragonfly-core:jar:1.1:provided
| +- com.atlassian.util.concurrent:atlassian-util-concurrent:jar:2.4.1:provided
| +- com.atlassian.modzdetector:modz-detector:jar:0.8.1:provided
| +- com.atlassian.mail:atlassian-mail:jar:2.5.0:provided
| +- com.atlassian.velocity:atlassian-velocity:jar:1.3:provided
| +- com.atlassian.core:atlassian-core:jar:4.6.11:provided
| | +- org.apache.sanselan:sanselan:jar:0.97-incubator:provided
| | +- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided
| | \- javax.media:jai-core:jar:1.1.3:provided
| +- com.atlassian.config:atlassian-config:jar:0.21:provided
| +- com.atlassian.spring:atlassian-spring:jar:2.0.0:provided
| +- com.atlassian.spring:atlassian-spring-hibernate2:jar:2.0.0:provided
| +- com.atlassian.event:atlassian-event:jar:2.3.5:provided
| +- com.atlassian.confluence:confluence-bucket:jar:5.6.4:provided
| +- com.atlassian.hibernate:atlassian-hibernate2-extras:jar:4.1.1:provided
| +- com.atlassian.xwork:atlassian-xwork-10:jar:1.17:provided
| +- com.atlassian.xwork:atlassian-xwork-core:jar:1.17:provided
| +- com.atlassian.profiling:atlassian-profiling:jar:1.9:provided
| +- com.atlassian.threadlocal:atlassian-threadlocal:jar:1.4:provided
| +- com.atlassian.trackback:atlassian-trackback:jar:0.10:provided
| +- com.atlassian.extras:atlassian-extras-core:jar:3.2:provided
| | +- com.atlassian.extras:atlassian-extras-api:jar:3.2:provided
| | +- com.atlassian.extras:atlassian-extras-common:jar:3.2:provided
| | +- com.atlassian.extras:atlassian-extras-legacy:jar:3.2:provided
| | | \- com.atlassian.extras:atlassian-extras-decoder-api:jar:3.2:provided
| | \- com.atlassian.extras:atlassian-extras-decoder-v2:jar:3.2:provided
| +- com.atlassian.johnson:atlassian-johnson:jar:0.10:provided
| +- com.atlassian.json:atlassian-json-jsonorg:jar:0.9:provided
| | \- com.atlassian.json:atlassian-json-api:jar:0.9:provided
| +- com.atlassian.plugins:atlassian-plugins-core:jar:3.2.8:provided
| | \- com.atlassian.annotations:atlassian-annotations:jar:0.7:provided
| +- com.atlassian.plugins:atlassian-plugins-servlet:jar:3.2.8:provided
| +- com.atlassian.plugins:atlassian-plugins-webfragment:jar:3.0.1:provided
| +- com.atlassian.plugins:atlassian-plugins-webresource:jar:3.1.1-PLUGWEB-85-m05:provided
| | +- com.atlassian.plugins:atlassian-plugins-webresource-common:jar:3.0.0:provided
| | +- com.atlassian.plugins:atlassian-plugins-webresource-api:jar:3.1.1-PLUGWEB-85-m05:provided
| | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided
| +- com.atlassian.plugins:atlassian-plugins-osgi:jar:3.2.8:provided
| | +- com.atlassian.plugins:atlassian-plugins-osgi-events:jar:3.2.8:provided
| | +- biz.aQute:bndlib:jar:1.43.0-atlassian-1:provided
| | +- org.apache.felix:org.apache.felix.framework:jar:3.0.2:provided
| | \- org.twdata.pkgscanner:package-scanner:jar:0.9.5:provided
| +- com.atlassian.plugins:atlassian-plugins-schema:jar:3.2.8:provided
| +- com.atlassian.plugins:atlassian-plugins-spring:jar:3.2.8:provided
| +- com.atlassian.plugins:atlassian-spring-interceptor-adapter-spi:jar:1.1:provided
| +- com.atlassian.bandana:atlassian-bandana:jar:3.1:provided
| +- com.atlassian.user:atlassian-user:jar:3.0:provided
| | \- org.springframework:spring-dao:jar:2.0.6:provided
| +- com.atlassian.renderer:atlassian-renderer-legacy:jar:6.2.10:provided
| | \- net.sourceforge.nekohtml:nekohtml:jar:1.9.7:provided
| +- com.atlassian.bonnie:atlassian-bonnie:jar:6.1.2:provided
| | +- com.atlassian.bonnie:lucene-upgrader:jar:lucene36:1.0:provided
| | +- org.apache.pdfbox:pdfbox:jar:1.7.1:provided
| | | +- org.apache.pdfbox:fontbox:jar:1.7.1:provided
| | | \- org.apache.pdfbox:jempbox:jar:1.7.1:provided
| | \- com.ibm.icu:icu4j:jar:3.8:provided
| +- org.bouncycastle:bcprov-jdk15on:jar:1.50:provided
| +- org.bouncycastle:bcmail-jdk15on:jar:1.50:provided
| | \- org.bouncycastle:bcpkix-jdk15on:jar:1.50:provided
| +- com.atlassian.jdk.utilities:atlassian-jdk-utilities:jar:0.4:provided
| +- joda-time:joda-time:jar:2.3:provided
| +- com.atlassian.seraph:atlassian-seraph:jar:3.0.0:provided
| | \- com.atlassian.security:atlassian-cookie-tools:jar:3.2.3:provided
| +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-core:jar:3.0.8:provided
| +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-seraph-integration:jar:3.0.8:provided
| +- log4j:log4j:jar:1.2.15:provided
| +- org.slf4j:slf4j-api:jar:1.7.7:provided
| +- org.slf4j:slf4j-log4j12:jar:1.7.7:provided
| +- org.slf4j:jul-to-slf4j:jar:1.7.7:provided
| +- commons-lang:commons-lang:jar:2.6:provided
| +- commons-logging:commons-logging:jar:1.1.3:compile
| +- commons-io:commons-io:jar:1.4:provided
| +- commons-beanutils:commons-beanutils:jar:1.8.3:provided
| +- commons-fileupload:commons-fileupload:jar:1.3.1:provided
| +- hibernate:hibernate:jar:2.1.8-atlassian-27:provided
| +- cglib:cglib:jar:2.1_3:provided
| | \- asm:asm:jar:1.5.3:provided
| +- dom4j:dom4j:jar:1.4-full:provided
| +- odmg:odmg:jar:3.0:provided
| +- c3p0:c3p0:jar:0.9.1.2:provided
| +- javax.transaction:jta:jar:1.0.1B:provided
| +- com.sun:jai_core:jar:1.1.3:provided
| +- com.sun:jai_codec:jar:1.1.3:provided
| +- opensymphony:webwork:jar:2.1.5-atlassian-2:provided
| +- opensymphony:xwork:jar:1.0.3.6:provided
| +- ognl:ognl:jar:2.6.5-atlassian-2:provided
| +- opensymphony:oscore:jar:2.2.7-atlassian-1:provided
| +- oscache:oscache:jar:2.2:provided
| +- osuser:osuser:jar:atl.user:provided
| +- opensymphony:propertyset:jar:1.3-21Nov03:provided
| +- org.apache.velocity:velocity:jar:1.6.4-atlassian-1:provided
| +- com.atlassian.soy:soy-template-renderer-api:jar:2.8.0:provided
| +- commons-pool:commons-pool:jar:1.5.4:provided
| +- javax.mail:mail:jar:1.4.5:provided
| +- org.springframework:spring-core:jar:2.5.6.SEC03-atlassian-6:compile
| +- org.springframework:spring-web:jar:2.5.6.SEC03:provided
| +- org.springframework:spring-aop:jar:2.5.6.SEC03:provided
| | \- aopalliance:aopalliance:jar:1.0:provided
| +- org.springframework:spring-hibernate2:jar:2.5.6-atlassian-1:provided
| | \- org.springframework:spring-orm:jar:2.5.6:provided
| +- org.springframework:spring-beans:jar:2.5.6.SEC03:compile
| +- org.springframework:spring-jdbc:jar:2.5.6.SEC03:provided
| +- org.springframework:spring-context:jar:2.5.6.SEC03:provided
| +- org.springframework:spring-tx:jar:2.5.6.SEC03:provided
| +- org.springframework:spring-context-support:jar:2.5.6.SEC03:provided
| +- com.atlassian.paddle:atlassian-paddle:jar:5:provided
| +- org.aspectj:aspectjweaver:jar:1.6.0:provided
| +- net.sf.ldaptemplate:ldaptemplate:jar:1.0.1:provided
| +- opensymphony:sitemesh:jar:2.5-atlassian-6:provided
| +- velocity-tools:velocity-tools:jar:view-1.1:provided
| +- radeox:radeox:jar:1.0b2-forked-22Apr2004:provided
| +- org.apache.lucene:lucene-core:jar:4.4.0:provided
| +- org.apache.lucene:lucene-analyzers-common:jar:4.4.0:provided
| +- org.apache.lucene:lucene-analyzers-kuromoji:jar:4.4.0:provided
| +- org.apache.lucene:lucene-misc:jar:4.4.0:provided
| +- org.apache.lucene:lucene-highlighter:jar:4.4.0:provided
| | +- org.apache.lucene:lucene-memory:jar:4.4.0:provided
| | \- org.apache.lucene:lucene-queries:jar:4.4.0:provided
| +- org.apache.lucene:lucene-queryparser:jar:4.4.0:provided
| | \- org.apache.lucene:lucene-sandbox:jar:4.4.0:provided
| | \- jakarta-regexp:jakarta-regexp:jar:1.4:provided
| +- commons-digester:commons-digester:jar:1.5:provided
| +- net.sourceforge.cssparser:cssparser:jar:0.9.5:provided
| | \- org.w3c.css:sac:jar:1.3:provided
| +- org.hibernate:jtidy:jar:r8-20060801:provided
| +- org.quartz-scheduler:quartz:jar:1.8.0:provided
| +- org.hsqldb:hsqldb:jar:2.3.0:provided
| +- com.atlassian.hsqldb:atlassian-hsqdlb-server-integration:jar:1.1.0:provided
| +- rome:rome:jar:1.0:provided
| +- jdom:jdom:jar:1.0:provided
| +- commons-jrcs:commons-jrcs:jar:diff-0.1.7:provided
| +- commons-httpclient:commons-httpclient:jar:3.1:provided
| +- xerces:xercesImpl:jar:2.11.0:provided
| +- xmlrpc:xmlrpc:jar:2.0+xmlrpc61.1+sbfix:provided
| +- com.atlassian.xmlrpc:xmlrpc-supplementary-character-support:jar:0.2:provided
| +- commons-discovery:commons-discovery:jar:0.2:provided
| +- commons-codec:commons-codec:jar:1.8:provided
| +- oro:oro:jar:2.0.8:provided
| +- slide:slide:jar:2.1:provided
| +- com.thoughtworks.xstream:xstream:jar:1.1.1:provided
| | \- xpp3:xpp3_min:jar:1.1.3.4.O:provided
| +- jfree:jfreechart:jar:1.0.0:provided
| | \- jfree:jcommon:jar:1.0.0:provided
| +- xalan:xalan:jar:2.7.1:provided
| | \- xalan:serializer:jar:2.7.1:provided
| +- com.octo.captcha:jcaptcha-all:jar:1.0-RC6:provided
| | \- concurrent:concurrent:jar:1.3.4:provided
| +- org.tuckey:urlrewritefilter:jar:4.0.4:provided
| +- commons-collections:commons-collections:jar:3.2.1:provided
| +- javax.xml.stream:stax-api:jar:1.0-2:provided
| +- org.codehaus.woodstox:wstx-asl:jar:3.2.9-atlassian-1:provided
| +- org.codehaus.xfire:xfire-core:jar:1.2.6:provided
| | +- wsdl4j:wsdl4j:jar:1.6.1:provided
| | \- org.apache.ws.commons:XmlSchema:jar:1.1:provided
| +- org.codehaus.xfire:xfire-aegis:jar:1.2.6:provided
| | \- net.java.dev.stax-utils:stax-utils:jar:20040917:provided
| +- net.jcip:jcip-annotations:jar:1.0:provided
| +- com.atlassian.cache:atlassian-cache-api:jar:2.3.4:provided
| +- com.atlassian.cache:atlassian-cache-memory:jar:2.3.4:provided
| | \- com.atlassian.cache:atlassian-cache-common-impl:jar:2.3.4:provided
| +- com.atlassian.beehive:beehive-api:jar:0.1.3:provided
| +- com.atlassian.sal:sal-spi:jar:2.12.1:provided
| +- com.atlassian.sal:sal-spring:jar:2.12.1:provided
| +- com.atlassian.sal:sal-api:jar:2.12.1:provided
| +- com.atlassian.confluence:confluence-java-api:jar:5.6.4:provided
| +- com.atlassian.confluence:confluence-rest-api:jar:5.6.4:provided
| +- com.atlassian.confluence:confluence-rest-serialization:jar:5.6.4:provided
| +- org.codehaus.jackson:jackson-core-asl:jar:1.9.1:provided
| +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.1:provided
| +- com.atlassian.activeobjects:activeobjects-dbex:jar:0.28.2:provided
| | \- com.atlassian.activeobjects:activeobjects-spi:jar:0.28.2:provided
| +- org.owasp.antisamy:antisamy:jar:1.4.2-atlassian-13:provided
| | \- org.apache.xmlgraphics:batik-css:jar:1.7:provided
| | +- org.apache.xmlgraphics:batik-ext:jar:1.7:provided
| | \- org.apache.xmlgraphics:batik-util:jar:1.7:provided
| +- org.outerj.daisy:daisydiff:jar:1.1-atlassian-5:provided
| | \- org.eclipse.core:runtime:jar:20070801:provided
| +- com.atlassian.velocity.htmlsafe:velocity-htmlsafe:jar:1.2-fixedscm:provided
| +- com.atlassian.botocss:botocss-core:jar:4.3:provided
| | +- org.jsoup:jsoup:jar:1.7.2:provided
| | +- net.sourceforge.cssbox:jstyleparser:jar:1.13-atlassian-2:provided
| | \- org.antlr:antlr-runtime:jar:3.4:provided
| | +- org.antlr:stringtemplate:jar:3.2.1:provided
| | \- antlr:antlr:jar:2.7.7:provided
| +- com.google.guava:guava:jar:11.0.2:provided
| +- com.atlassian.fugue:fugue:jar:1.1:provided
| +- com.google.code.gson:gson:jar:1.6:provided
| +- com.atlassian.http:atlassian-http:jar:0.0.8.8:provided
| +- org.javasimon:javasimon-core:jar:3.4.0:provided
| \- com.atlassian.tenancy:atlassian-tenancy-api:jar:1.4.1:provided
+- com.atlassian.confluence.plugins:confluence-rpc-plugin:jar:5.6.4:provided
+- com.atlassian.plugins:atlassian-plugins-osgi-testrunner:jar:1.2.0:test
+- javax.ws.rs:jsr311-api:jar:1.1.1:provided
+- javax.xml.bind:jaxb-api:jar:2.2:provided
+- org.mockito:mockito-all:jar:1.8.5:test
+- com.foo:JMSTools:jar:1.0-SNAPSHOT:compile
| +- org.apache.activemq:activemq-all:jar:5.10.0:compile
| \- org.apache.activemq:activemq-jaas:jar:5.10.0:compile
+- com.atlassian.confluence.plugins:confluence-space-ia:jar:8.3:provided
+- com.atlassian.activeobjects:activeobjects-core:jar:0.25.2:provided
| \- net.java.dev.activeobjects:activeobjects:jar:0.25.2:provided
+- com.atlassian.confluence.plugins:doctheme:jar:5.6.3:provided
+- com.atlassian.applinks:applinks-core:jar:2.5.12:provided
+- com.atlassian.applinks:applinks-plugin:jar:4.1.2:provided
+- com.atlassian.plugins.rest:atlassian-rest-common:jar:1.0.2:provided
| +- com.atlassian.plugins.rest:com.atlassian.jersey-library:pom:1.0.2:provided
| | +- com.sun.jersey:jersey-server:jar:1.0.3:provided
| | | \- com.sun.jersey:jersey-core:jar:1.0.3:provided
| | \- com.sun.jersey:jersey-json:jar:1.0.3:provided
| | +- org.codehaus.jettison:jettison:jar:1.0.1:provided
| | \- org.codehaus.jackson:jackson-asl:jar:0.9.4:provided
| \- net.sourceforge.findbugs:jsr305:jar:1.3.2:provided
+- org.apache.wink:wink-client:jar:1.1.3-incubating:test
| +- org.apache.wink:wink-common:jar:1.1.3-incubating:test
| | \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:test
| +- com.sun.xml.bind:jaxb-impl:jar:2.2.1.1:test
| \- javax.activation:activation:jar:1.1:provided
+- org.apache.httpcomponents:httpclient:jar:4.1.1:test
| \- org.apache.httpcomponents:httpcore:jar:4.1:test
+- org.powermock:powermock-module-junit4:jar:1.4.9:test
| \- org.powermock:powermock-module-junit4-common:jar:1.4.9:test
| +- org.powermock:powermock-core:jar:1.4.9:test
| | \- org.javassist:javassist:jar:3.14.0-GA:test
| \- org.powermock:powermock-reflect:jar:1.4.9:test
| \- org.objenesis:objenesis:jar:1.2:test
\- org.powermock:powermock-api-mockito:jar:1.4.9:test
\- org.powermock:powermock-api-support:jar:1.4.9:test
来自 atlassian-plugin.xml:
<component-import key="transactionTemplate"
interface="com.atlassian.sal.api.transaction.TransactionTemplate"/>
<component-import key="sidebar-link-service"
interface="com.atlassian.confluence.plugins.ia.service.SidebarLinkService"/>
<component-import key="userManager"
interface="com.atlassian.user.UserManager"/>
<component-import key="systemTemplateManager"
interface="com.atlassian.confluence.spaces.SystemTemplateManager"/>
<component-import key="fileUploadManager"
interface="com.atlassian.confluence.pages.FileUploadManager"/>
<component-import key="entityLinkService"
interface="com.atlassian.applinks.spi.link.MutatingEntityLinkService"/>
<component-import key="applicationLinkService"
interface="com.atlassian.applinks.api.ApplicationLinkService"/>
<component-import key="typeAccessor"
interface="com.atlassian.applinks.spi.util.TypeAccessor"/>
<component-import key="entityLinkBuilderFactory"
interface="com.atlassian.applinks.spi.link.EntityLinkBuilderFactory"/>
<component-import key="applicationProperties"
interface="com.atlassian.sal.api.ApplicationProperties"/>
<component-import key="licenseService"
interface="com.atlassian.confluence.license.LicenseService"/>
<component-import key="i18nResolver"
interface="com.atlassian.sal.api.message.I18nResolver"/>
<component-import key="loginUriProvider"
interface="com.atlassian.sal.api.auth.LoginUriProvider"/>
<component-import key="soyTemplateRenderer"
interface="com.atlassian.soy.renderer.SoyTemplateRenderer" />
<component-import name="Plugin Settings Factory" key="pluginSettingsFactory"
interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory"/>
来自 META-INF/spring/atlassian-plugin-context.xml:
<osgi:reference id="transactionTemplate"
interface="com.atlassian.sal.api.transaction.TransactionTemplate" />
<osgi:reference id="sidebarLinkService"
interface="com.atlassian.confluence.plugins.ia.service.SidebarLinkService" />
<osgi:reference id="userManager"
interface="com.atlassian.user.UserManager" />
<osgi:reference id="systemTemplateManager"
interface="com.atlassian.confluence.spaces.SystemTemplateManager" />
<osgi:reference id="fileUploadManager"
interface="com.atlassian.confluence.pages.FileUploadManager" />
<osgi:reference id="entityLinkService"
interface="com.atlassian.applinks.spi.link.MutatingEntityLinkService"/>
<osgi:reference id="applicationLinkService"
interface="com.atlassian.applinks.api.ApplicationLinkService"/>
<osgi:reference id="typeAccessor"
interface="com.atlassian.applinks.spi.util.TypeAccessor"/>
<osgi:reference id="entityLinkBuilderFactory"
interface="com.atlassian.applinks.spi.link.EntityLinkBuilderFactory"/>
<osgi:reference id="pluginSettingsFactory"
interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory" />
<osgi:reference id="spaceManager"
interface="com.atlassian.confluence.spaces.SpaceManager" />
<osgi:reference id="pageManager"
interface="com.atlassian.confluence.pages.PageManager" />
注意:我需要检查以确保我仍然需要所有这些导入/引用。我也不确定是否需要在 atlassian-plugin.xml 中导入组件以在 atlassian-plugin-context.xml 中引用它们。如果没有,我也许可以稍微清理一下这些列表。
<component key="confluence-event-listener" class="com.foo.confluence.ConfluenceJMSAnnouncerImpl"
name="Confluence Event Listener" i18n-name-key="confluence-event-listener.name" public="true">
<description key="confluence-event-listener.description">The confluence event listener Impl Plugin</description>
<interface>com.foo.confluence.ConfluenceJMSAnnouncer</interface>
</component>
注意:我怀疑这不需要公开。
第二个注意事项:我在 atlassian-plugin-context.xml 中配置了 30 个 bean。我唯一暴露的是:
<osgi:service interface="com.foo.confluence.ConfluenceService" ref="confluenceService"/>
2014-10-30 09:29:25,451 ERROR [main] [plugin.osgi.factory.OsgiPlugin] enableInternal Detected an error (BundleException) enabling the plugin 'com.foo.ConflunceJMSIntegration' : Constraint violation for package 'org.springframework.transaction' when resolving module 201.0 between existing import 0.org.springframework.transaction BLAMED ON [[201.0] package; (&(package=org.springframework.transaction)(version>=0.0.0)(version<=0.0.0))] and uses constraint 4.0.org.springframework.transaction BLAMED ON [[201.0] package; (package=org.springframework.jms.connection)]. This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN
2014-10-30 09:29:25,452 WARN [main] [atlassian.plugin.impl.AbstractPlugin] enable Unable to enable plugin 'com.foo.ConflunceJMSIntegration'
2014-10-30 09:29:25,454 WARN [main] [atlassian.plugin.impl.AbstractPlugin] enable Because of this exception
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.foo.ConflunceJMSIntegration
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:479)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:310)
at com.atlassian.plugin.impl.AbstractDelegatingPlugin.enable(AbstractDelegatingPlugin.java:242)
at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:136)
at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:104)
.... had to remove detail to trim length of question ....
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.osgi.framework.BundleException: Constraint violation for package 'org.springframework.transaction' when resolving module 201.0 between existing import 0.org.springframework.transaction BLAMED ON [[201.0] package; (&(package=org.springframework.transaction)(version>=0.0.0)(version<=0.0.0))] and uses constraint 4.0.org.springframework.transaction BLAMED ON [[201.0] package; (package=org.springframework.jms.connection)]
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3415)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:456)
... 33 more
2014-10-30 09:29:25,455 ERROR [main] [atlassian.plugin.manager.PluginEnabler] actualEnable Unable to enable plugin com.foo.ConflunceJMSIntegration
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.foo.ConflunceJMSIntegration
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:479)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:310)
.... had to remove detail to trim length of question ....
Caused by: org.osgi.framework.BundleException: Constraint violation for package 'org.springframework.transaction' when resolving module 201.0 between existing import 0.org.springframework.transaction BLAMED ON [[201.0] package; (&(package=org.springframework.transaction)(version>=0.0.0)(version<=0.0.0))] and uses constraint 4.0.org.springframework.transaction BLAMED ON [[201.0] package; (package=org.springframework.jms.connection)]
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3415)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:456)
... 33 more
最佳答案
只需添加 <dependency>
条目 pom.xml
在一个空插件中通常不会导致插件加载时出现 OSGi 错误,因为 Confluence 不应该仅仅根据依赖项的存在来尝试导入外部包。
我的怀疑(在聊天线程中得到证实)是,您的依赖项之一包含某种 Spring 指令,这些指令在插件加载时混淆了 Confluence。当使用默认值构建插件时,插件 SDK 将自动取消 JAR 所有依赖项,并将生成的文件集包含在主插件 JAR 中。
如果您的某个库依赖项无意中在 META-INF/spring
中包含了 Spring 相关数据或者其他地方,这会与您自己的插件的 Spring 配置混合在一起,这可能会造成严重破坏。
解决此问题的最佳方法是禁用依赖项提取。这意味着,不是将所有依赖项解 JAR 并将它们转储到与插件相同的 JAR 中,而是将依赖项保留在其源 JAR 中,并且这些 JAR 直接包含在 META-INF/lib
中。 。即使依赖项确实声明了一些流氓 Spring 指令,它们也会保留在自己的 JAR 中,并且在加载插件时不会被 Confluence 处理。
要禁用依赖项的提取,您需要在 pom.xml
的 confluence-maven-plugin 部分中将 extractDependency 设置为 false ,如下图:
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>x.y.z</version>
[...]
<configuration>
[...]
<extractDependencies>false</extractDependencies>
</configuration>
</plugin>
关于java - 将 <dependency> 添加到我的 Atlassian 插件的 pom.xml 会导致 Spring BundleException 并违反约束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26618618/
我创建了一个用户可以添加测试的字段。这一切运行顺利我只希望当用户点击(添加另一个测试)然后上一个(添加另一个测试)删除并且这个显示在新字段中。 所有运行良好的唯一问题是点击(添加另一个字段)之前添加另
String[] option = {"Adlawan", "Angeles", "Arreza", "Benenoso", "Bermas", "Brebant
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我正在努力将 jQuery 滚动功能添加到 nav-tab (Bootstrap 3)。我希望用户能够选择他们想要的选项卡,并在选项卡内容中有一个可以平滑滚动到 anchor 的链接。这是我的代码,可
我正在尝试在用户登录后再添加 2 个 ui 选项卡。首先,我尝试做一个之后。 $('#slideshow').tabs('remove', '4'); $("#slideshow ul li:last
我有一个包含选择元素的表单,我想通过选择添加和删除其中一些元素。这是html代码(这里也有jsfiddle http://jsfiddle.net/txhajy2w/):
正在写这个: view.backgroundColor = UIColor.white.withAlphaComponent(0.9) 等同于: view.backgroundColor = UICo
好的,如果其中有任何信息,我想将这些列添加到一起。所以说我有 账户 1 2 3 . 有 4 个帐户空间,但只有 3 个帐户。我如何创建 java 脚本来添加它。 最佳答案 Live Example H
我想知道是否有一种有效的预制算法来确定一组数字的和/差是否可以等于不同的数字。示例: 5、8、10、2,使用 + 或 - 等于 9。5 - 8 = -3 + 10 = 7 + 2 = 9 如果有一个预
我似乎有一个卡住的 git repo。它卡在所有基本的添加、提交命令上,git push 返回所有内容为最新的。 从其他帖子我已经完成了 git gc 和 git fsck/ 我认为基本的调试步骤是
我的 Oracle SQL 查询如下- Q1- select hca.account_number, hca.attribute3, SUM(rcl.extended_amou
我正在阅读 http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingG
我正在尝试添加一个“加载更多”按钮并限制下面的结果,这样投资组合页面中就不会同时加载 1000 个内容,如下所示:http://typesetdesign.com/portfolio/ 我对 PHP
我遇到这个问题,我添加了 8 个文本框,它工作正常,但是当我添加更多文本框(如 16 个文本框)时,它不会添加最后一个文本框。有人遇到过这个问题吗?提前致谢。 Live Link: JAVASCRIP
add/remove clone first row default not delete 添加/删除克隆第一行默认不删除&并获取正确的SrNo(例如:添加3行并在看到问题后删除SrNo.2)
我编码this ,但删除按钮不起作用。我在控制台中没有任何错误.. var counter = 0; var dataList = document.getElementById('materi
我有一个类似数组的对象: [1:数组[10]、2:数组[2]、3:数组[2]、4:数组[2]、5:数组[3]、6:数组[1]] 我正在尝试删除前两个元素,执行一些操作,然后将它们再次插入到同一位置。
使用的 Delphi 版本:2007 你好, 我有一个 Tecord 数组 TInfo = Record Name : String; Price : Integer; end; var Info
我使用了基本的 gridster 代码,然后我声明了通过按钮添加和删除小部件的函数它工作正常但是当我将调整大小功能添加到上面的代码中时,它都不起作用(我的意思是调整大小,添加和删除小部件) 我的js代
title 323 323 323 title 323 323 323 title 323 323 323 JS $(document).keydown(function(e){
我是一名优秀的程序员,十分优秀!