mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
Made sure alfresco:run can be executed without interference from alfresco:it,#401
This commit is contained in:
parent
264d326bf2
commit
aede276f9b
@ -30,6 +30,7 @@ import org.zeroturnaround.zip.ZipUtil;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import static org.twdata.maven.mojoexecutor.MojoExecutor.*;
|
import static org.twdata.maven.mojoexecutor.MojoExecutor.*;
|
||||||
|
|
||||||
@ -60,6 +61,26 @@ public class IntegrationTestMojo extends AbstractRunMojo {
|
|||||||
pluginManager
|
pluginManager
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Check if we should skip this Mojo execution, i.e. if tests have been
|
||||||
|
// skipped by the user
|
||||||
|
Properties sysProperties = execEnv.getMavenSession().getSystemProperties();
|
||||||
|
boolean skipThisMojo = sysProperties.containsKey("skipTests") ||
|
||||||
|
sysProperties.containsKey("skipITs") ||
|
||||||
|
sysProperties.containsKey("maven.test.skip");
|
||||||
|
if (skipThisMojo) {
|
||||||
|
getLog().info("Skipping integration testing.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> goals = execEnv.getMavenSession().getGoals();
|
||||||
|
if (goals.contains("alfresco:run")) {
|
||||||
|
sysProperties.put("skipTests", "true");
|
||||||
|
getLog().info("Skipping integration testing as alfresco:run is active.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// execEnv.getMavenSession().getGoals().add("alfresco:it");
|
||||||
|
|
||||||
if (enableSolr) {
|
if (enableSolr) {
|
||||||
unpackSolrConfig();
|
unpackSolrConfig();
|
||||||
fixSolrHomePath();
|
fixSolrHomePath();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user