复制出atlassian-extras-2.1.3.jar文件,解压,用jad或java decompiler对com.atlassian.license.decoder.LicenseAdaptor进行反编译,然后编辑之:
public Date getExpiryDate() {
return null; // 永不过期
}
...
public LicenseType getLicenseType() {
return com.atlassian.license.applications.confluence.ConfluenceLicenseTypeStore.FULL_LICENSE; // 改为最强License
}
...
public int getUsers() {
return 100000; // 允许十万用户
}
...
public boolean isExpired() {
return false; // 永不过期
}
public Date getExpiryDate() {
return null; // 永不过期
}
...
public LicenseType getLicenseType() {
return com.atlassian.license.applications.confluence.ConfluenceLicenseTypeStore.FULL_LICENSE; // 改为最强License
}
...
public int getUsers() {
return 100000; // 允许十万用户
}
...
public boolean isExpired() {
return false; // 永不过期
}
反编译com.atlassian.license.LicenseUtils类,编辑:
public static final long POST_LICENSE_EVAL_PERIOD = 0x75cd788000L; // 均改为16年
public static final long UPDATE_ALLOWED_PERIOD = 0x75cd788000L;
...
public static long getSupportPeriodEnd(License license) {
return license.getDateCreated().getTime() + 0x75cd788000L; // 16 years
}
...
public static boolean isLicenseTooOldForBuild(License license, Date date) {
return false;
}
...
public static boolean confirmExtendLicenseExpired(Date date) {
return false;
}
...
public static boolean confirmExtendLicenseExpired(String s) throws NumberFormatException {
return false;
}
...
private static long getNewBuildWithOldLicenseExpiryDate(Date date) {
return date.getTime() + 0x75cd788000L;
}
public static final long POST_LICENSE_EVAL_PERIOD = 0x75cd788000L; // 均改为16年
public static final long UPDATE_ALLOWED_PERIOD = 0x75cd788000L;
...
public static long getSupportPeriodEnd(License license) {
return license.getDateCreated().getTime() + 0x75cd788000L; // 16 years
}
...
public static boolean isLicenseTooOldForBuild(License license, Date date) {
return false;
}
...
public static boolean confirmExtendLicenseExpired(Date date) {
return false;
}
...
public static boolean confirmExtendLicenseExpired(String s) throws NumberFormatException {
return false;
}
...
private static long getNewBuildWithOldLicenseExpiryDate(Date date) {
return date.getTime() + 0x75cd788000L;
}
完成,编译:
javac com/atlassian/license/decoder/LicenseAdaptor.java
javac com/atlassian/license/LicenseUtils.java
打包:
jar -cvf atlassian-extras-2.1.3.jar *