Skip to content

Commit ab578d1

Browse files
committed
Merge branch 'feature-11549'
2 parents 3b85c1d + cb154a2 commit ab578d1

28 files changed

+398
-171
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ node {
66
checkout scm
77
}
88
stage('Build and deployment') {
9-
sh "./gradlew clean test install publish -Djava.awt.headless=true"
9+
sh "./gradlew clean build publish -Djava.awt.headless=true"
1010
}
1111
}
1212
}

build.gradle

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
import org.apache.tools.ant.filters.ReplaceTokens
2525

2626
buildscript {
27-
dependencies {
28-
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
29-
}
3027
repositories {
3128
maven {
3229
url 'https://www.silverpeas.org/nexus/content/groups/silverpeas'
@@ -38,15 +35,13 @@ buildscript {
3835

3936
plugins {
4037
id 'java-gradle-plugin'
41-
id 'org.ajoberstar.grgit' version '3.0.0' apply true
38+
id 'org.ajoberstar.grgit' version '4.0.2' apply true
4239
id 'idea'
43-
id 'maven'
4440
id 'maven-publish'
4541
id 'groovy'
42+
id "net.linguica.maven-settings" version "0.5"
4643
}
4744

48-
apply plugin: 'maven-publish-auth'
49-
5045
description = 'The Gradle plugin to set up Silverpeas. It is used both to install or to upgrade Silverpeas.'
5146
group = 'org.silverpeas'
5247
version = '6.1-SNAPSHOT'
@@ -73,7 +68,7 @@ project.configure(project) {
7368
repositories {
7469
maven {
7570
name 'silverpeas'
76-
url 'http://www.silverpeas.org/nexus/content/groups/silverpeas'
71+
url 'https://www.silverpeas.org/nexus/content/groups/silverpeas'
7772
}
7873
maven {
7974
name 'gradle-plugins'
@@ -82,46 +77,49 @@ repositories {
8277
mavenLocal()
8378
}
8479

80+
java {
81+
sourceCompatibility = JavaVersion.VERSION_1_8
82+
targetCompatibility = JavaVersion.VERSION_1_8
83+
withSourcesJar()
84+
}
85+
8586
publishing {
8687
publications {
87-
mavenJava(MavenPublication) {
88+
maven(MavenPublication) {
8889
from components.java
89-
90-
artifact sourceJar {
91-
classifier 'sources'
92-
}
9390
}
9491
}
92+
9593
repositories {
9694
maven {
9795
if (project.snapshot) {
9896
name 'silverpeas-snapshots'
99-
url 'http://www.silverpeas.org/nexus/content/repositories/snapshots/'
97+
url 'https://www.silverpeas.org/nexus/content/repositories/snapshots/'
10098
} else {
10199
name 'silverpeas'
102-
url 'http://www.silverpeas.org/nexus/content/repositories/releases/'
100+
url 'https://www.silverpeas.org/nexus/content/repositories/releases/'
103101
}
104102
}
105103
}
106104
}
107105

108106

109107
dependencies {
110-
compile gradleApi()
111-
compile 'org.apache.commons:commons-lang3:3.6'
112-
compile 'commons-io:commons-io:2.4'
113-
compile 'org.apache.commons:commons-dbcp2:2.2.0'
114-
compile 'commons-codec:commons-codec:1.10'
115-
compile 'javax.jcr:jcr:2.0'
116-
compile 'org.apache.jackrabbit:jackrabbit-core:2.18.2'
117-
runtime 'org.eclipse.jetty:jetty-jndi:9.4.8.v20171121'
118-
runtime 'org.eclipse.jetty:jetty-util:9.4.8.v20171121'
119-
runtime 'com.h2database:h2:1.4.196'
120-
runtime 'org.postgresql:postgresql:42.1.4'
121-
runtime 'net.sourceforge.jtds:jtds:1.3.1'
122-
testCompile gradleTestKit()
123-
testCompile 'junit:junit:4.12'
124-
testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') {
108+
api gradleApi()
109+
api 'org.apache.commons:commons-lang3:3.10'
110+
api 'commons-io:commons-io:2.7'
111+
api 'org.apache.commons:commons-dbcp2:2.7.0'
112+
api 'commons-codec:commons-codec:1.14'
113+
api 'javax.jcr:jcr:2.0'
114+
api 'org.apache.jackrabbit:jackrabbit-core:2.18.4'
115+
runtimeOnly 'org.eclipse.jetty:jetty-jndi:9.4.29.v20200521'
116+
runtimeOnly 'org.eclipse.jetty:jetty-util:9.4.29.v20200521'
117+
runtimeOnly 'com.h2database:h2:1.4.200'
118+
runtimeOnly 'org.postgresql:postgresql:42.2.12'
119+
runtimeOnly 'net.sourceforge.jtds:jtds:1.3.1'
120+
testImplementation gradleTestKit()
121+
testImplementation 'junit:junit:4.13'
122+
testImplementation('org.spockframework:spock-core:1.3-groovy-2.4') {
125123
exclude module: 'groovy-all'
126124
}
127125
}

gradle/wrapper/gradle-wrapper.jar

4.03 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Jan 23 14:16:56 CET 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip

gradlew

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,16 +44,16 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
3551

36-
warn ( ) {
52+
warn () {
3753
echo "$*"
3854
}
3955

40-
die ( ) {
56+
die () {
4157
echo
4258
echo "$*"
4359
echo
@@ -66,6 +82,7 @@ esac
6682

6783
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6884

85+
6986
# Determine the Java command to use to start the JVM.
7087
if [ -n "$JAVA_HOME" ] ; then
7188
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
109126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110127
fi
111128

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
116134
JAVACMD=`cygpath --unix "$JAVACMD"`
117135

118136
# We build the pattern for arguments to be converted via cygpath
@@ -138,35 +156,30 @@ if $cygwin ; then
138156
else
139157
eval `echo args$i`="\"$arg\""
140158
fi
141-
i=$((i+1))
159+
i=`expr $i + 1`
142160
done
143161
case $i in
144-
(0) set -- ;;
145-
(1) set -- "$args0" ;;
146-
(2) set -- "$args0" "$args1" ;;
147-
(3) set -- "$args0" "$args1" "$args2" ;;
148-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154172
esac
155173
fi
156174

157175
# Escape application args
158-
save ( ) {
176+
save () {
159177
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160178
echo " "
161179
}
162-
APP_ARGS=$(save "$@")
180+
APP_ARGS=`save "$@"`
163181

164182
# Collect all arguments for the java command, following the shell quoting and substitution rules
165183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166184

167-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169-
cd "$(dirname "$0")"
170-
fi
171-
172185
exec "$JAVACMD" "$@"

gradlew.bat

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -13,8 +29,11 @@ if "%DIRNAME%" == "" set DIRNAME=.
1329
set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
1635
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1837

1938
@rem Find java.exe
2039
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -65,7 +84,9 @@ set CMD_LINE_ARGS=%*
6584

6685
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
6786

87+
6888
@rem Execute Gradle
89+
set JAVA_OPTS="%JAVA_OPTS% -Dillegal-access=permit"
6990
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7091

7192
:end

src/main/groovy/org/silverpeas/setup/SilverpeasConfigurationProperties.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ package org.silverpeas.setup
2525

2626
import org.gradle.api.Project
2727
import org.gradle.api.provider.Property
28+
import org.gradle.api.tasks.InputDirectory
29+
import org.gradle.api.tasks.Internal
2830

2931
import javax.inject.Inject
3032
import java.nio.file.Files
@@ -42,24 +44,28 @@ class SilverpeasConfigurationProperties {
4244
* configuration properties, the Silverpeas and the JBoss configuration directory. By default
4345
* SILVERPEAS_HOME/configuration.
4446
*/
47+
@InputDirectory
4548
final Property<File> configurationHome
4649

4750
/**
4851
* The directory that contains all the configuration scripts to configure JBoss/Wildfly for
4952
* Silverpeas. By default SILVERPEAS_HOME/configuration/jboss.
5053
*/
54+
@InputDirectory
5155
final Property<File> jbossConfigurationDir
5256

5357
/**
5458
* The directory that contains all the configuration scripts to configure specifically the
5559
* Silverpeas web portal and components. By default SILVERPEAS_HOME/configuration/silverpeas.
5660
*/
61+
@InputDirectory
5762
final Property<File> silverpeasConfigurationDir
5863

5964
/**
6065
* The directory that contains the additional JBoss/Wildfly modules to install in JBoss/Wildfy
6166
* for Silverpeas. By default SILVERPEAS_HOME/configuration/jboss/modules.
6267
*/
68+
@InputDirectory
6369
final Property<File> jbossModulesDir
6470

6571
/**
@@ -68,6 +74,7 @@ class SilverpeasConfigurationProperties {
6874
* that it can be retrieved in the next configuration process by the different steps so that they
6975
* can adapt their behaviour according to the properties they have set.
7076
*/
77+
@Internal
7178
final Context context
7279

7380
@Inject

src/main/groovy/org/silverpeas/setup/SilverpeasInstallationProperties.groovy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ package org.silverpeas.setup
33
import org.gradle.api.Action
44
import org.gradle.api.Project
55
import org.gradle.api.provider.Property
6+
import org.gradle.api.tasks.Input
7+
import org.gradle.api.tasks.Nested
8+
import org.gradle.api.tasks.OutputDirectory
69

710
import javax.inject.Inject
811
/**
@@ -18,32 +21,37 @@ class SilverpeasInstallationProperties {
1821
* directory is deployed as such in the JBoss/Wildfly application server.
1922
* environment variable.
2023
*/
24+
@OutputDirectory
2125
final Property<File> distDir
2226

2327
/**
2428
* Directory that have to contain all the application or resource archives to deploy into
2529
* JBoss/Wildfly. Defaulted in the SILVERPEAS_HOME/deployments directory.
2630
*/
31+
@OutputDirectory
2732
final Property<File> deploymentDir
2833

2934
/**
3035
* Directory that have to contain all the drivers required by Silverpeas and the Silverpeas Setup
3136
* plugin to access the data source of Silverpeas.
3237
*/
38+
@OutputDirectory
3339
final Property<File> dsDriversDir
3440

3541
/**
3642
* Is in development mode? (In this case, some peculiar configuration are applied to support the
3743
* dev mode in the application server.) This is a property and hence can be set by the user input
3844
* from the build script.
3945
*/
46+
@Input
4047
final Property<Boolean> developmentMode
4148

4249
/**
4350
* Collections of software bundles required to construct the Silverpeas application.These bundles
4451
* will be downloaded from our software repository server (provided by our Nexus service) and then
4552
* unpacked to a given directory in order to generate the final application.
4653
*/
54+
@Nested
4755
final SoftwareBundles bundles
4856

4957
@Inject

src/main/groovy/org/silverpeas/setup/SilverpeasMigrationProperties.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.silverpeas.setup
22

33
import org.gradle.api.Project
44
import org.gradle.api.provider.Property
5+
import org.gradle.api.tasks.InputDirectory
56

67
import javax.inject.Inject
78

@@ -29,6 +30,7 @@ class SilverpeasMigrationProperties {
2930
* </li>
3031
* </ul>
3132
*/
33+
@InputDirectory
3234
final Property<File> homeDir
3335

3436
@Inject

0 commit comments

Comments
 (0)