Confluence 9.0 EAP Feedback - Spring

XMLWordPrintable

      Hi there, i have some problems accessing some managers, your precious help will be really appreciated
      Here the steps :
      I changed my plugin in pom xml to these versions 
      <confluence.version>7.13.0</confluence.version>
      <confluence.data.version>7.13.0</confluence.data.version>
      <amps.version>8.1.2</amps.version>

      before that i had : 
      amps 6.2.4, and 5.7 the rest
      And my plugin did work well

      Info : i use oracle jdk 11, Confluence 8.8.1

      Because of deprecation error due to new amps version, i removed, from atlassian-plugin.xml :  

      ```
      <component-import key="i18nResolver" interface="com.atlassian.sal.api.message.I18nResolver"/> 
      <component-import key="pluginLicenseManager" interface="com.atlassian.upm.api.license.PluginLicenseManager"/>
      ```

      And added in pom.xml 
      <instructions>
        <Import-Package>
          com.atlassian.confluence.security,
          com.atlassian.upm.api.license,
          com.atlassian.sal.api.message,

      I added in atlassian-plugin.xml

      ```
          <component key="permissionManager" class="com.atlassian.confluence.security.PermissionManager">
              <description>Singleton of permissionManager</description>
              <interface>com.atlassian.confluence.security.PermissionManager</interface>
          </component>
          <component key="i18nResolver" class="com.atlassian.sal.api.message.I18nResolver">
              <description>Singleton of </description>
              <interface>com.atlassian.sal.api.message.I18nResolver</interface>
          </component>
          <component key="pluginLicenseManager" class="com.atlassian.upm.api.license.PluginLicenseManager">
              <description>Singleton of </description>
              <interface>com.atlassian.upm.api.license.PluginLicenseManager</interface>
          </component>
      ```

      When installing the plugin in Confluence 8.8.1, i got an error for I18nResolver, and PluginLicenseManager :

      `org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'i18nResolver' defined in URL [bundle://ab991ea8-3184-4ea6-b1a5-4a393d94411e_300.0:0/META-INF/spring/atlassian-plugins-components.xml]: Could not resolve matching constructor on bean class [com.atlassian.sal.api.message.I18nResolver] (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)`

      I tried to remove from xml, <component and use only annotations, but did not work :  
      named ConfluenceImport Inject
      here the detail : 
      annotation : ConfluenceImport with declaration of I18nResolver, and PluginLicenseManager 

      Any idea on how to make thoses beans accessed in the plugin ?

       

            Assignee:
            Unassigned
            Reporter:
            sami koudi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: