The Installation Management is targeted to plugin developers, which have to modify JIRA's resources or add resources in JIRA's directories, for different environments or for different JIRA releases.
Two features are provided :
Proceed as follow :
package com.atlassian.jira.plugin; /** * @FQCN com.company.jira.plugin.MyPluginModuleDescriptorFactoryExtender */ public class MyPluginModuleDescriptorFactoryExtender extends MinyaaModuleDescriptorFactoryExtender { }
<component key="MyPluginModuleDescriptorFactoryExtender" name="MyPluginModuleDescriptorFactoryExtender" class="com.atlassian.jira.plugin.MyPluginModuleDescriptorFactoryExtender" />
<installable-items key="moduleKey" name="moduleName" class="com.atlassian.jira.plugin.configuration.installer.PluginItemXXXXXXX"> <description key="moduleDescription">List of Files to install into the current JIRA instance.</description> <resource type="velocity" name="view" location="secure/admin/plugins/installer/ViewXXXXXXItems.vm" /> <resource type="i18n" name="i18n" location="com.atlassian.jira.plugin.installer.PluginItemInstaller" /> <items> <condition class="com.atlassian.jira.plugin.webfragment.conditions.AnyCondition" /> <items ...> <item ... /> </items> </items> </installable-items>
<items> <condition class="com.atlassian.jira.plugin.webfragment.conditions.AnyCondition" /> <items > <items srcLocation="edit-webapp/" destLocation="../../" > <item location="relativePath/file.jsp" /> <item location="relativePath/file.xml" /> <items > <condition class="com.atlassian.jira.plugin.webfragment.conditions.AnyCondition" /> <item location="relativePath/conditionedFile.xml" /> </items> </items> <items srcLocation="edit-webapp/" destLocation="../../" > <condition class="com.atlassian.jira.plugin.webfragment.conditions.AnyCondition" /> <item location="relativePath/conditionedFile.xml" /> </items> <items destLocation="../../" > <condition class="com.atlassian.jira.plugin.webfragment.conditions.JiraBuildCondition"> <param name="jiraMinBuild">3.13.3</param> </condition> <item replacementProperties="install/replacement.minyaa.core.properties" /> </items> </items> </items>
# List of ReplacementSet keys (comma separated) replacementSets=<set1>[,<set2>] # 1st Set <set1>.filePath=<Relative File Path needing Replacement> <set1>.<tokenSet1>=<tokenSet1>[,<tokenSet2>] <set1>.<tokenSet1>.if.not.exist=<searchedToken blocking the replacement if found> <set1>.<tokenSet1>.if.exist=<searchedToken required to allow the replacement> <set1>.<tokenSet1>.token=<tokenToReplace> <set1>.<tokenSet1>.value=<replacingValue>
<installable-items key="myDeploymentKey" name="My Deployment" class="com.atlassian.jira.plugin.configuration.installer.PluginItemDeployer"> <description key="myDeployment.description">List of Files to install into the current JIRA instance.</description> <resource type="velocity" name="view" location="secure/admin/plugins/installer/ViewInstallableItems.vm" /> <resource type="i18n" name="i18n" location="com.atlassian.jira.plugin.installer.PluginItemInstaller" /> <items> <condition class="com.atlassian.jira.plugin.webfragment.conditions.EnterpriseJiraLicenseCondition" /> <items srcLocation="edit-webapp/" destLocation="../../"> <item location="includes/panels/project/plugin.schemes.jsp" /> <item location="template/standard/usergroupsselect.jsp" /> <item location="template/standard/usergroupsselectnoheaders.jsp" /> </items> </items> </installable-items>The XML format for items and item is as follow :
<installable-items key="modifiedFiles" name="Modified Files" class="com.atlassian.jira.plugin.configuration.installer.PluginItemUpdater"> <description key="modifiedFiles.description">List of Files to modify/overwrite into the current JIRA instance.</description> <resource type="velocity" name="view" location="secure/admin/plugins/installer/ViewReplacableItems.vm" /> <resource type="i18n" name="i18n" location="com.atlassian.jira.plugin.installer.PluginItemInstaller" /> <items destLocation="../../"> <condition class="com.atlassian.jira.plugin.webfragment.conditions.JiraBuildCondition"> <param name="jiraMinBuild">3.13.3</param> </condition> <item replacementProperties="install/replacement.minyaa.core.properties" /> </items> <items > <condition class="com.atlassian.jira.plugin.webfragment.conditions.EnterpriseJiraLicenseCondition" /> <items srcLocation="edit-webapp/" destLocation="../../" > <item location="includes/panels/extendedobjectconfiguration_form.jsp" /> </items> <items srcLocation="edit-webapp/WEB-INF/classes/" destLocation="" > <item location="entitydefs/entitymodel.minyaa.time.xml" /> </items> </items> </installable-items>The XML format for items and item is as follow :