Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure the different sections of settings of the plugin SilverSetup in order to separate correctly what are for configuration of Silverpeas, what are for installation and what are for the migration of the data source. Add a new plugin setting property: timeout. It sets the timeout of the waiting for JBoss to answer to the requests sent by the plugin. By default it is set to 5mn (instead of 2mn) but it can be changed by setting the property silversetup { timeout = <the number of milliseconds to wait for> } in the SILVERPEAS_HOME/bin/build.gradle file.
- Loading branch information
Showing
16 changed files
with
302 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/main/groovy/org/silverpeas/setup/SilverpeasInstallationProperties.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package org.silverpeas.setup | ||
|
||
import org.gradle.api.Action | ||
import org.gradle.api.Project | ||
import org.gradle.api.provider.Property | ||
|
||
import javax.inject.Inject | ||
/** | ||
* Properties for the installation and deployment of Silverpeas in a JBoss server. | ||
* @author mmoquillon | ||
*/ | ||
class SilverpeasInstallationProperties { | ||
|
||
/** | ||
* The distribution directory. It is the directory that contains all the content of the | ||
* constructed Silverpeas collaborative application. Defaulted into the build directory. Set a | ||
* different location is pertinent only for development mode as in this mode the distribution | ||
* directory is deployed as such in the JBoss/Wildfly application server. | ||
* environment variable. | ||
*/ | ||
final Property<File> distDir | ||
|
||
/** | ||
* Directory that have to contain all the application or resource archives to deploy into | ||
* JBoss/Wildfly. Defaulted in the SILVERPEAS_HOME/deployments directory. | ||
*/ | ||
final Property<File> deploymentDir | ||
|
||
/** | ||
* Directory that have to contain all the drivers required by Silverpeas and the Silverpeas Setup | ||
* plugin to access the data source of Silverpeas. | ||
*/ | ||
final Property<File> dsDriversDir | ||
|
||
/** | ||
* Is in development mode? (In this case, some peculiar configuration are applied to support the | ||
* dev mode in the application server.) This is a property and hence can be set by the user input | ||
* from the build script. | ||
*/ | ||
final Property<Boolean> developmentMode | ||
|
||
/** | ||
* Collections of software bundles required to construct the Silverpeas application.These bundles | ||
* will be downloaded from our software repository server (provided by our Nexus service) and then | ||
* unpacked to a given directory in order to generate the final application. | ||
*/ | ||
final SoftwareBundles bundles | ||
|
||
@Inject | ||
SilverpeasInstallationProperties(Project project, File silverpeasHome) { | ||
distDir = project.objects.property(File) | ||
distDir.set(new File(project.buildDir, "dist")) | ||
deploymentDir = project.objects.property(File) | ||
deploymentDir.set(new File(silverpeasHome, 'deployments')) | ||
dsDriversDir = project.objects.property(File) | ||
dsDriversDir.set(new File(project.buildDir, "drivers")) | ||
developmentMode = project.objects.property(Boolean) | ||
developmentMode.set(false) | ||
bundles = project.objects.newInstance(SoftwareBundles, project) | ||
} | ||
|
||
void bundles(Action<? extends SoftwareBundles> action) { | ||
action.execute(bundles) | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/groovy/org/silverpeas/setup/SilverpeasMigrationProperties.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.silverpeas.setup | ||
|
||
import org.gradle.api.Project | ||
import org.gradle.api.provider.Property | ||
|
||
import javax.inject.Inject | ||
|
||
/** | ||
* Properties for the migration of the data source used by Silverpeas when installing it or | ||
* upgrading it to a new version. | ||
* @author mmoquillon | ||
*/ | ||
class SilverpeasMigrationProperties { | ||
|
||
/** | ||
* The directory in which are all located both the data source migration descriptors | ||
* and the scripts to create or to update the schema of the database to be used by Silverpeas. | ||
* It is defaulted to SILVERPEAS_HOME/migrations. | ||
* It is expected to contain two kinds of subdirectories: | ||
* <ul> | ||
* <li><em><code>modules</code></em> in which are provided the XML descriptor of each migration | ||
* module. These descriptors refers the scripts to use to create or to update the | ||
* database schema for a given Silverpeas module;</li> | ||
* <li><em><code>db</code></em> in which are located per database type and per module the | ||
* different SQL scripts to create or to upgrade the schema of the database;</li> | ||
* <li><em><code>scripts</code></em> in which are located per module the different programming | ||
* scripts (currently, only Groovy is supported) to perform complex tasks on the database or | ||
* any other data sources used by Silverpeas (like the JCR for example). | ||
* </li> | ||
* </ul> | ||
*/ | ||
final Property<File> homeDir | ||
|
||
@Inject | ||
SilverpeasMigrationProperties(Project project, File silverpeasHome) { | ||
this.homeDir = project.objects.property(File) | ||
this.homeDir.set(new File(silverpeasHome, 'migrations')) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.