In order to extend, correct or adapt SPIS, it is also possible to rebuild the whole software from the source codes by re-compilation.
With its version 5.0, the design of SPIS has been deeply reviewed, with a new architecture fully based on an OSGi based approach. The compilation, packaging and deployment procedures have fully reviewed as well.
The compilation process is governed by the Apache Maven tool that controls not only the compilation itself, but also all needed dependencies and the packaging as OSGi bundles. Then to be run, the compiled codes must be deployed into a properly configured OSGi runtime, like Apache Felix.
We remind that SPIS is decomposed into four main components that should be recovered individually and coordinated (i.e. correspond to the same version and be cross-compliant):
- SPIS-NUM corresponding the simulation kernel;
- SPIS-NUM-Plugins corresponding to additional modules for the numerical kernel.
- SPIS-UI corresponding to the dedicated IME and GUI layer;
- SPIS-Instruments corresponding to the virtual instruments layer, enabling the communication between the GUI and the numerical kernel;
- A configured OSGI runtime.
SPIS-NUM, SPIS-UI and SPIS-INSTRUMENT can be recovered from there respective source code repositories and are multi-platform.
Regarding the runtime, if SPIS bundles are normally compliant with all OSGi runtime, they require numerous additional dependencies and configuration files and it is strongly recommended to start from a configured one like the runtime provided with the packaged releases. These packaged runtimes includes native components (e.g. Gmsh, VTK, JRE…) and are platform dependent.
The compilation and deployment procedure is the following one, considering that the link given here below correspond to the current stable version (i.e. SPIS 6.0.4 aka SPIS-EP) and the steps should be processed in the following order.
NB: The compilation procedure is presented here under UNIX/Linux like systems, but can be operated on other platforms or under an IDE, like Eclipse with the relevant plugins.
NB: Currently, the proposed links point to the legacy Web site and may require another login.
STEP 0: Retrieve the source codes
Proceed to the software forge to download the wanted source codes:
- SPIS-Instruments: /spis/instruments
git clone https://code.spis.org/spis/instruments.git
- SPIS-NUM: /spis/num
git clone https://code.spis.org/spis/num.git
- SPIS-NUM Plugins: /spis/num-plugins
git clone https://code.spis.org/spis/num-plugins.git
- SPIS-UI: /spis/ui
git clone https://code.spis.org/spis/ui.git
STEP 1: Compile the SPIS-Instruments layer:
- Go into the SPIS-Instruments sub-directory:
cd $MY_BUILD_DIR/instruments
- Compile the SPIS-INSTRUMENT layer:
mvn clean install
The result should look like (end of the Maven log message):
(...)
Installing org/spis/org-spis-instruments/2.0.0/org-spis-instruments-2.0.0.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.017 s
[INFO] Finished at: 2020-07-16T11:23:27+02:00
[INFO] Final Memory: 30M/356M
[INFO] ------------------------------------------------------------------------
Maven will take in charge automatically all dependencies and directly download them from the relevant Maven repositories. We outline that a Web access is needed here.
The generated jar are located in the target sub-directory of each sub-modules, i.e. $MY_BUILD_DIR/SpisInstrument/target
Step 2: Compile the SPIS-NUM layer:
- Go into the SPIS-NUM sub-directory:
cd $MY_BUILD_DIR/num
- Compile the SPIS-NUM layer:
mvn clean install
The result should look like (end of the Maven log message):
(...)
[INFO] Installing org/spis/num/org-spis-num-core/6.0.3-SNAPSHOT/org-spis-num-core-6.0.3-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.262 s
[INFO] Finished at: 2020-07-16T11:41:01+02:00
[INFO] Final Memory: 26M/434M
[INFO] ------------------------------------------------------------------------
The generated jar are located in the target sub-directory of each sub-modules, i.e. $MY_BUILD_DIR/SpisNum/target
.
Step 3: Compile the SPIS-NUM-Plugins layer:
- Go into the SPIS-NUM-Plugins sub-directory:
cd $MY_BUILD_DIR/num-plugins
- Compile the SPIS-NUM-Plugins layer:
mvn clean install
The result should look like (end of the Maven log message):
(...)
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SPIS-Num Super POM 6.0.2 ……………………… SUCCESS [ 2.315 s]
[INFO] SPIS-NUM Dust bundle 5.2.8 ……………………. SUCCESS [ 2.106 s]
[INFO] SPIS-NUM AISEPS bundle 5.2.8 ………………….. SUCCESS [ 1.893 s]
[INFO] SPIS-NUM High Voltage bundle 1.0.6 …………….. SUCCESS [ 1.928 s]
[INFO] SPIS-NUM Passive Discharging bundle 1.0.0 ………. SUCCESS [ 1.918 s]
[INFO] SPIS-NUM Erosion and Contamination bundle 1.0.6 …. SUCCESS [ 1.902 s]
[INFO] SPIS-NUM Electric propulsion bundle 1.0.6 ………. SUCCESS [ 0.684 s]
[INFO] SPIS-NUM Plugins 6.0.2 ……………………….. SUCCESS [ 2.315 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.553 s (Wall Clock)
[INFO] Finished at: 2020-07-16T17:15:03+02:00
[INFO] ------------------------------------------------------------------------
The generated jar are located in the target sub-directory of each sub-modules, i.e. $MY_BUILD_DIR/SpisNumPlugins/target
.
Step 4: Compile the SPIS-UI layer
- Go into the sub-directory:
cd $MY_BUILD_DIR/ui
- Compile the SPIS-UI layer:
mvn clean install
The result should look like (end of the Maven log message):
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SPIS-UI Super POM ……………………………. SUCCESS [ 1.951 s]
[INFO] SPIS UI bundle archetype ……………………… SUCCESS [ 2.428 s]
[INFO] Numerical core api …………………………… SUCCESS [ 13.721 s]
[INFO] SPIS data model ……………………………… SUCCESS [01:05 min]
[INFO] SPIS data mining module ………………………. SUCCESS [ 37.935 s]
[INFO] SPIS electrical circuit module ………………… SUCCESS [ 1.690 s]
[INFO] SPIS geometry editor …………………………. SUCCESS [ 5.272 s]
[INFO] SPIS project module ………………………….. SUCCESS [ 3.732 s]
[INFO] SPIS global parameters module …………………. SUCCESS [ 3.168 s]
[INFO] SPIS group editor ……………………………. SUCCESS [ 9.934 s]
[INFO] Spis Num numerical implementation ……………… SUCCESS [ 1.019 s]
[INFO] SPIS UI to NUM conversion module ………………. SUCCESS [ 6.106 s]
[INFO] Instruments configuration bundle ………………. SUCCESS [ 1.329 s]
[INFO] SPIS mesh module …………………………….. SUCCESS [ 2.037 s]
[INFO] SPIS project converter ……………………….. SUCCESS [ 0.991 s]
[INFO] SPIS reporting module ………………………… SUCCESS [ 10.930 s]
[INFO] SPIS simulation launch and monitoring module ……. SUCCESS [ 2.613 s]
[INFO] SPIS external tools launcher module ……………. SUCCESS [ 1.297 s]
[INFO] SPIS-UI developer module ……………………… SUCCESS [ 0.877 s]
[INFO] SpisUI ……………………………………… SUCCESS [ 0.018 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:56 min
[INFO] Finished at: 2020-07-16T11:45:46+02:00
[INFO] Final Memory: 76M/803M
[INFO] ------------------------------------------------------------------------
The generated jars are located in the target sub-directory of each sub-modules, i.e. the following jars, for instance:
./modules/org-spis-ui-archetype/target/org-spis-ui-archetype-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-data-mining/target/org-spis-ui-data-mining-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-developer/target/org-spis-ui-developer-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-electrical-circuit/target/org-spis-ui-electrical-circuit-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-geometry-editor/target/org-spis-ui-geometry-editor-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-global-parameters/target/org-spis-ui-global-parameters-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-group-editor/target/org-spis-ui-group-editor-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-instruments/target/org-spis-ui-instruments-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-mesh/target/org-spis-ui-mesh-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-model/target/org-spis-ui-model-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-numerical-core-api/target/org-spis-ui-numerical-core-api-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-project/target/org-spis-ui-project-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-project-converter/target/org-spis-ui-project-converter-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-reporting/target/org-spis-ui-reporting-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-simulation/target/org-spis-ui-simulation-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-spis-num-numerical-core-implementation/target/org-spis-ui-spis-num-numerical-core-implementation-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-tools/target/org-spis-ui-tools-6.0.5-SNAPSHOT.jar
./modules/org-spis-ui-ui2num/target/org-spis-ui-ui2num-6.0.5-SNAPSHOT.jar
Step 5: Deploy the compiled jars into the runtime
- Recover a configured packaged release adapted to the targeted platform
- Copy all needed/generated jars into the
$SPIS_RELEASE_ROOT/lib
directory. - Run/restart the Spis of the release as usual. Changes should be taken into account and eventually appears in the GUI.
Please see the relevant commercial or academic trainings for further information.