confluencexwork

Confluence - Atlassian:: Two own-developed-plugins block each other


I have developed two plugins for Confluence. When I install only one of them, everything works as expected. But when both are installed and I want to visit the Configuration-URL for one of them, there comes the error "Page not found".

Here are the 2 atlassin-plugin.xml files:

<?xml version="1.0" encoding="UTF-8"?>

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
  <plugin-info>
    <description>${project.description}</description>
    <version>${project.version}</version>
    <vendor name="${project.organization.name}" url="${project.organization.url}"/>
    <param name="plugin-icon">images/pluginIcon.png</param>
    <param name="plugin-logo">images/pluginLogo.png</param>
    <param name="configure.url">/admin/plugins/report/configuration.action</param>
  </plugin-info>

  <resource type="i18n" name="i18n" location="/i18n/report"/>


  <web-resource key="report-page-resources" name="Report page Web Resources">
    <resource type="download" name="report.js" location="js/report.js"/>
    <resource type="download" name="melden.css" location="css/melden.css"/>
    <resource type="download" name="load_cats.gif" location="images/load_cats.gif"/>
    <dependency>confluence.web.resources:ajs</dependency>
    <context>atl.general</context>
  </web-resource>

  <web-item key="report-button" name="Report Button" section="system.content.action/marker" weight="40">
    <label key="de.essendi.confluence.report.label"/>
    <styleClass>reportButton</styleClass>
    <link>/</link>
  </web-item>
  <xwork name="Report Admin Configuration" key="melden-admin-configuration-action">
    <package name="configuration" extends="default" namespace="/admin/plugins/report">
      <default-interceptor-ref name="defaultStack"/>
      <action name="configuration" class="de.essendi.confluence.report.admin.action.ConfigureActionReport">
        <result name="success" type="velocity">/templates/melden-configurationaction.vm</result>
      </action>
      <action name="submit" class="de.essendi.confluence.report.admin.action.SubmitActionReport">
        <result name="success" type="redirect">/admin/plugins/report/configuration.action</result>
      </action>
    </package>
  </xwork>
  <rest key="report-rest" path="/report" version="1.0">
    <description>Provides the Report REST Api.</description>
    <package>de.essendi.confluence.report.rest</package>
  </rest>
  <component key="report-settings-manager" class="de.essendi.confluence.report.admin.DefaultReportSettingsManager" interface="de.essendi.confluence.report.admin.ReportSettingsManager"/>
  <!-- import from the product container -->
  <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties"/>

  <component key="report-mail-service-impl" class="de.essendi.confluence.report.email.MailServiceImpl" name="Mail Service Impl" i18n-name-key="mail-service-impl.name">
    <description key="mail-service-impl.description">The Mail Service Impl Plugin</description>
    <interface>de.essendi.confluence.report.email.MailService</interface>
  </component>

 <component-import key="i18nResolver" interface="com.atlassian.sal.api.message.I18nResolver"/>
  <component-import key="task-manager" interface="com.atlassian.core.task.MultiQueueTaskManager" filter=""/>
</atlassian-plugin>

and

<?xml version="1.0" encoding="UTF-8"?>

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
  <plugin-info>
    <description>${project.description}</description>
    <version>${project.version}</version>
    <vendor name="${project.organization.name}" url="${project.organization.url}"/>
    <param name="plugin-icon">images/pluginIcon.png</param>
    <param name="plugin-logo">images/pluginLogo.png</param>
    <param name="configure.url">/admin/plugins/groupfilter/configuration.action</param>
  </plugin-info>
  <!-- add our i18n resource -->
  <resource type="i18n" name="i18n" location="groupFilter"/>
  <!-- add our web resources -->
  <web-resource key="groupFilter-resources" name="groupFilter Web Resources">
    <dependency>com.atlassian.auiplugin:ajs</dependency>
    <resource type="download" name="groupFilter.css" location="/css/groupFilter.css"/>
    <resource type="download" name="groupFilter.js" location="/js/groupFilter.js"/>
    <resource type="download" name="images/" location="/images"/>
    <context>groupFilter</context>
  </web-resource>

  <xwork name="Groupfilter Admin Configuration" key="groupfilter-admin-configuration-action">
    <package name="configuration" extends="default" namespace="/admin/plugins/groupfilter">
      <default-interceptor-ref name="defaultStack"/>
      <action name="configuration" class="de.essendi.confluence.groupFilter.admin.action.ConfigurationAction">
        <result name="success" type="velocity">/templates/groupfilter-configurationaction.vm</result>
      </action>
      <action name="submit" class="de.essendi.confluence.groupFilter.admin.action.SubmitAction">
        <result name="success" type="redirect">/admin/plugins/groupfilter/configuration.action</result>
      </action>
    </package>
  </xwork>

   <component name="LDAP Sync Listener" class="de.essendi.confluence.groupFilter.SyncEvent" key="groupfilter-syncevent-listener"/>
  <!-- import from the product container -->
  <component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties"/>
  <component key="group-filter-manger-impl" class="de.essendi.confluence.groupFilter.admin.GroupFilterMangerImpl" name="Group Filter Manger Impl" i18n-name-key="group-filter-manger-impl.name">
    <description key="group-filter-manger-impl.description">The Group Filter Manger Impl Plugin</description>
    <interface>de.essendi.confluence.groupFilter.admin.GroupFilterManager</interface>
  </component>
</atlassian-plugin>

Thank you for helping


Solution

  • Make sure your package names inside the xwork elements are unique. In your example both packages are called name="configuration". This leads to only the last enabled package being active.