Skip to content

Commit d49e985

Browse files
committed
Update the set of data with which a user will start when testing
Silverpeas. Now the H2 database is no more accessed directly through its database file but through a database server that will be launched before Silverpeas.
1 parent 6219a87 commit d49e985

File tree

396 files changed

+155
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+155
-444
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,10 @@ RUN wget -nc https://www.silverpeas.org/files/silverpeas-${SILVERPEAS_VERSION}-w
9595
# the Silverpeas Nexus Repository
9696
COPY src/repository /root/.m2/repository
9797
COPY src/settings.xml /root/.m2/
98-
COPY src/config.properties /opt/silverpeas/configuration/
99-
COPY src/CustomerSettings.xml /opt/silverpeas/configuration/silverpeas/
100-
COPY src/99-confAuroraLooks.groovy /opt/silverpeas/configuration/silverpeas/
10198
COPY src/h2 /opt/silverpeas/h2
99+
COPY src/configuration /opt/silverpeas/configuration
102100
COPY src/data /opt/silverpeas/data
103-
COPY src/silverpeas.gradle /opt/silverpeas/bin/
101+
COPY src/bin /opt/silverpeas/bin
104102

105103
RUN sed -i -e "s/APP_VER/${SILVERPEAS_VERSION}/g" /opt/silverpeas/bin/silverpeas.gradle
106104

@@ -109,7 +107,6 @@ WORKDIR ${SILVERPEAS_HOME}/bin
109107

110108
# Copy this container init script that will be run each time the container is ran
111109
COPY src/run.sh /opt/
112-
COPY src/setup.sh ${SILVERPEAS_HOME}/bin
113110

114111
# Assemble Silverpeas
115112
RUN ./setup.sh ${SILVERPEAS_VERSION}

README.md

Lines changed: 3 additions & 3 deletions

src/bin/h2database

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
H2_JAR=`ls ${JBOSS_HOME}/modules/system/layers/base/com/h2database/h2/main/h2-*.jar`
4+
5+
print_help() {
6+
echo "$0 start|stop"
7+
echo "requires SILVERPEAS_HOME and JBOSS_HOME to be set"
8+
}
9+
10+
case "$1" in
11+
start)
12+
echo "Start H2 database..."
13+
exec java -classpath "$H2_JAR" org.h2.tools.Server -tcp -baseDir "$SILVERPEAS_HOME/h2" &
14+
;;
15+
stop)
16+
echo "Stop H2 database..."
17+
exec java -classpath "$H2_JAR" org.h2.tools.Server -tcpShutdown tcp://localhost:9092
18+
;;
19+
-h)
20+
print_help
21+
;;
22+
*)
23+
print_help
24+
exit 1
25+
esac

src/bin/setup.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Installation of Silverpeas $1"
4+
./h2database start
5+
./silverpeas clean install
6+
ret=$?
7+
if [ $ret -eq 0 ]; then
8+
rm ../log/build-*
9+
touch .install
10+
else
11+
echo "An error has occurred :-("
12+
echo
13+
for f in ../log/build-*; do
14+
cat "$f"
15+
done
16+
fi
17+
./h2database stop
18+
exit $ret
File renamed without changes.

src/config.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/configuration/config.properties

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (C) 2000 - 2022 Silverpeas
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU Affero General Public License as
5+
# published by the Free Software Foundation, either version 3 of the
6+
# License, or (at your option) any later version.
7+
#
8+
# As a special exception to the terms and conditions of version 3.0 of
9+
# the GPL, you may redistribute this Program in connection withWriter Free/Libre
10+
# Open Source Software ("FLOSS") applications as described in Silverpeas's
11+
# FLOSS exception. You should have recieved a copy of the text describing
12+
# the FLOSS exception, and it is also available here:
13+
# "http://www.silverpeas.org/legal/licensing"
14+
#
15+
# This program is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU Affero General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU Affero General Public License
21+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
22+
23+
DB_SERVERTYPE=H2
24+
DB_SERVER=localhost
25+
DB_USER=silverpeas
26+
DB_PASSWORD=silverpeas
27+
DB_NAME=Silverpeas

src/99-confAuroraLooks.groovy renamed to src/configuration/silverpeas/99-confAuroraLooks.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ def auroraProps = [
1717
'home.events.appId': 'almnanach5',
1818
'home.faq.appId': 'questionReply7',
1919
'zoom.componentId': 'kmelia4',
20-
'Shortcut.home.1.Url': '/silverpeas/Component/kmelia4',
21-
'Shortcut.home.2.Url': '/silverpeas/Component/gallery9',
20+
'Shortcut.home.1.Url': 'http://localhost:8000/silverpeas/Component/kmelia4',
21+
'Shortcut.home.2.Url': 'http://localhost:8000/silverpeas/Component/gallery9',
2222
'Shortcut.home.2.AltText': 'M&eacute;diath&egrave;que',
23-
'Shortcut.home.3.Url': '/silverpeas/Rdirectory/jsp/Main?Sort=NEWEST',
24-
'Shortcut.home.4.Url': '/silverpeas/Space/WA3',
23+
'Shortcut.home.3.Url': 'http://localhost:8000/silverpeas/Rdirectory/jsp/Main?Sort=NEWEST',
24+
'Shortcut.home.4.Url': 'http://localhost:8000/silverpeas/Space/WA3',
2525
'Shortcut.home.4.AltText': 'Demandes en ligne',
26-
'Shortcut.home.5.Url': '/silverpeas/Component/forums11',
26+
'Shortcut.home.5.Url': 'http://localhost:8000/silverpeas/Component/forums11',
2727
'Shortcut.home.5.AltText': 'Forums',
28-
'Shortcut.home.6.Url': '/silverpeas/Component/suggestionBox12',
28+
'Shortcut.home.6.Url': 'http://localhost:8000/silverpeas/Component/suggestionBox12',
2929
'Shortcut.home.6.AltText': 'Vos id&eacute;es',
3030
]
3131
service.updateProperties(

src/CustomerSettings.xml renamed to src/configuration/silverpeas/CustomerSettings.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
<parameter key="attachment.data.fromMetadata">true</parameter>
6060
</configfile>
6161

62+
<!-- H2 doesn't support the COUNT() OVER() windowing function -->
63+
<configfile name="general.properties">
64+
<parameter key="jdbc.pagination.method.countOver">false</parameter>
65+
</configfile>
66+
6267
</fileset>
6368

6469
</silverpeas-settings>

0 commit comments

Comments
 (0)