Junhc

岂止于博客

Jira

目录
1. JIRA系统破解
1.1. 下载 atlassian-extras-3.2.jar 系统破解文件
1.2. 停止正在运行的JIRA服务
/atlassian/jira/bin/stop-jira.sh
1.3. 备份原有的JIRA系统服务包
 mv /atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar /atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar.bak
1.4. 将下载的破解包移动到JIRA系统依赖库里
cp ../atlassian-extras-3.2.jar /atlassian/jira/atlassian-jira/WEB-INF/lib/
1.5. 破解包授权
chmod 644 /atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar
1.6. 启动JIRA服务
/atlassian/jira/bin/start-jira.sh
2. JIRA插件破解
2.1. 下载 atlassian-universal-plugin-manager-plugin-2.22.2.jar 插件破解文件
// 1.通过反编译工具提取 /atlassian/jira/atlassian-jira/WEB-INF/atlassian-bundled-plugins/atlassian-universal-plugin-manager-plugin-x.x.x.jar 的源码
// 2.修改 com.atlassian.extras.decoder.v2.Version2LicenseDecoder 类
..
public boolean canDecode(String licenseString)
{
  return true;
}


private Properties loadLicenseConfiguration(Reader text)
{
  Properties props = new Properties();
  try
  {
    new DefaultPropertiesPersister().load(props, text);
    if (props.containsKey("Description"))
    {
      String desc = props.getProperty("Description");
      props.put("Description", desc.replace("Evaluation", "Commercial"));
      if (desc.contains("Confluence")) {
        props.put("conf.LicenseTypeName", "COMMERCIAL");
      } else if (desc.contains("JIRA")) {
        props.put("jira.LicenseTypeName", "COMMERCIAL");
      } else if (desc.contains("FishEye")) {
        props.put("fisheye.LicenseTypeName", "COMMERCIAL");
      } else if (desc.contains("Bitbucket")) {
        props.put("stash.LicenseTypeName", "COMMERCIAL");
      }
      props.put("Evaluation", "false");
      props.put("MaintenanceExpiryDate", "2099-02-09");
      props.put("LicenseExpiryDate", "2099-02-09");
    }
    return props;
  }
  catch (IOException e)
  {
    throw new LicenseException("Could NOT load properties from reader", e);
  }
}
..
// 3.修改 com.atlassian.license.LicenseManager 类
..
public boolean hasValidLicense(String licenseKey)
{
  return true;
}
..    
// 4.以上两个类,编译成class文件,替换 atlassian-universal-plugin-manager-plugin-x.x.x.jar 中
的class文件即可。
2.2. 停止正在运行的JIRA服务
2.3. 备份原有的JIRA插件服务包
2.4. 将下载的破解包移动到JIRA系统插件依赖库里
cp ../atlassian-universal-plugin-manager-plugin-2.22.2.jar /atlassian/jira/atlassian-jira/WEB-INF/atlassian-bundled-plugins/
2.5. 启动JIRA服务