mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-07-31 17:39:14 +00:00
Changed where Enterprise license should be located, #395
This commit is contained in:
@@ -455,6 +455,7 @@ public class RunMojo extends AbstractMojo {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists.
|
* Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists.
|
||||||
|
* It is not enough to have it on the test classpath, then it will start up as Trial license...
|
||||||
*
|
*
|
||||||
* @throws MojoExecutionException
|
* @throws MojoExecutionException
|
||||||
*/
|
*/
|
||||||
@@ -480,7 +481,7 @@ public class RunMojo extends AbstractMojo {
|
|||||||
element(name("outputDirectory"), licDestDir),
|
element(name("outputDirectory"), licDestDir),
|
||||||
element(name("resources"),
|
element(name("resources"),
|
||||||
element(name("resource"),
|
element(name("resource"),
|
||||||
element(name("directory"), "src/main/resources/alfresco/extension/license"),
|
element(name("directory"), "src/test/license"),
|
||||||
element(name("includes"),
|
element(name("includes"),
|
||||||
element(name("include"), "*.lic")
|
element(name("include"), "*.lic")
|
||||||
),
|
),
|
||||||
@@ -888,9 +889,7 @@ public class RunMojo extends AbstractMojo {
|
|||||||
* @return true if platform version >= 5.1
|
* @return true if platform version >= 5.1
|
||||||
*/
|
*/
|
||||||
private boolean isPlatformVersionGtOrEqTo51() {
|
private boolean isPlatformVersionGtOrEqTo51() {
|
||||||
int versionNumber = Integer.parseInt(
|
if (getPlatformVersionNumber() >= 51) {
|
||||||
alfrescoPlatformVersion.replaceAll("[^0-9]", "").substring(0, 2));
|
|
||||||
if (versionNumber >= 51) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -904,15 +903,22 @@ public class RunMojo extends AbstractMojo {
|
|||||||
* @return true if platform version <= 4.2
|
* @return true if platform version <= 4.2
|
||||||
*/
|
*/
|
||||||
private boolean isPlatformVersionLtOrEqTo42() {
|
private boolean isPlatformVersionLtOrEqTo42() {
|
||||||
int versionNumber = Integer.parseInt(
|
if (getPlatformVersionNumber() <= 42) {
|
||||||
alfrescoPlatformVersion.replaceAll("[^0-9]", "").substring(0, 2));
|
|
||||||
if (versionNumber <= 42) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Grabs the first 2 numbers in the version string
|
||||||
|
*
|
||||||
|
* @return major and minor version as int, such as 41,50,51
|
||||||
|
*/
|
||||||
|
private int getPlatformVersionNumber() {
|
||||||
|
return Integer.parseInt(alfrescoPlatformVersion.replaceAll("[^0-9]", "").substring(0, 2));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Solr artifactId, it changes when we move to Solr 4 in Alfresco version 5
|
* Get the Solr artifactId, it changes when we move to Solr 4 in Alfresco version 5
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user