Hello,
I need to access the Confluence license properties and need to inject LicenseService class. I need to know which maven dependence I need to add?
It's in confluence-5.0.3.jar itself ;)
<dependency> <groupId>com.atlassian.confluence</groupId> <artifactId>confluence</artifactId> <version>${confluence.version}</version> <scope>provided</scope> </dependency>
It should be the same file across all versions, 5.0.3, 4.3, 5.3...
$ unzip -l /.../.m2/repository/com/atlassian/confluence/confluence/5.0.3/confluence-5.0.3.jar | grep LicenseService 5022 03-14-13 22:40 com/atlassian/confluence/license/DefaultLicenseService.class 657 03-14-13 22:40 com/atlassian/confluence/license/LicenseService.class
Hi Adrien,
I'm trying to inject the LicenseService in a test class. However, I'm getting this error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'licenseService': FactoryBean threw exception on object creation; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/springframework/osgi/context/internal/classloader/ChainedClassLoader) previously initiated loading for a different type with name "com/atlassian/extras/api/Product"
I've got in my atlassian-plugin.xml
<component-import key="licenseService" interface="com.atlassian.confluence.license.LicenseService" name="License Service" public="true"/>
And the following in my atlassian-plugin.xml for testing
<component-import key="confluenceLicenseService" interface="com.atlassian.confluence.license.LicenseService" />
Any idea?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.