Skip to content

Commit

Permalink
Add a feature flag and disable SPA by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jun 11, 2021
1 parent f9fbc50 commit 52b45de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Expand Up @@ -17,7 +17,7 @@ public class RunDb extends AbstractDockerMojo {
/**
* port exposed by mysql container to connect with db
*
* @parameter propert="container"
* @parameter property="container"
*/
protected String container;

Expand Down
Expand Up @@ -129,6 +129,15 @@ public abstract class AbstractTask extends AbstractMojo {
*/
OwaHelper owaHelper;

/**
* Temporary feature flag for SPA support. Will be removed in 4.1.0
*
* @since 4.0.1
* @deprecated
* @parameter property="enable.spa" default-value="false"
*/
boolean enableSpa;

/**
* installs SPAs
*/
Expand Down Expand Up @@ -189,7 +198,7 @@ public void initTask() {
if (owaHelper == null) {
owaHelper = new OwaHelper(mavenSession, mavenProject, pluginManager, wizard);
}
if (spaInstaller == null) {
if (spaInstaller == null && enableSpa) {
spaInstaller = new SpaInstaller(mavenProject, mavenSession, pluginManager, distroHelper);
}
if(dockerHelper == null){
Expand Down
Expand Up @@ -247,7 +247,9 @@ public void setup(Server server, DistroProperties distroProperties) throws MojoE
distroHelper.savePropertiesToServer(distroProperties, server);
setServerVersionsFromDistroProperties(server, distroProperties);
moduleInstaller.installModulesForDistro(server, distroProperties, distroHelper);
spaInstaller.installFromDistroProperties(server.getServerDirectory(), distroProperties);
if (spaInstaller != null) {
spaInstaller.installFromDistroProperties(server.getServerDirectory(), distroProperties);
}
installOWAs(server, distroProperties);
} else {
moduleInstaller.installDefaultModules(server);
Expand Down

0 comments on commit 52b45de

Please sign in to comment.