start servermanager via gradle task
Author: larsquitsch
Publication Date: 12/8/2023 11:42
Hallo,
it is possible to start a sitearchitect with a gradle task via the bootstrap class. Is it also possible to start the ServerManager this way?
Kind regards and thank you,
Lars
0
-
Author: Windmüller - 12/11/2023 8:07
Yes, it is possible. However, this is not a documented feature and may therefore break without notice.
val clientRuntime: Configuration by configurations.creating dependencies { clientRuntime(group = "de.espirit.firstspirit", name = "fs-isolated-client", version = "<insert-your-fs-version-here>") } fun clientStartArgs(registryFile: String): List<String> { val baseArgs = listOf( "-Xmx512m", "-Djava.security.manager=allow", "-Dcheckedtviolation=1", "-DlogLevel=DEBUG", "-Dlocale=" + Locale.getDefault().language, "-Dregistry.file=$registryFile", "--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED", "--add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED", "--add-exports=java.desktop/sun.swing=ALL-UNNAMED", "--add-exports=java.desktop/sun.swing.plaf.synth=ALL-UNNAMED", "--add-exports=java.desktop/sun.swing.table=ALL-UNNAMED" ) return baseArgs + listOf( "-Dhost=localhost", "-Dport=1088", "-Dmode=socket", "-Dlogin=plain", "-Dlogin.user=Admin", "-Dlogin.password=your-password" ) } /* WARNING: Starting FirstSpirit clients this way is undocumented and may change without notice! */ val startSiteArchitect by tasks.creating(JavaExec::class.java) { classpath = files(clientRuntime) mainClass.set("de.espirit.common.bootstrap.Bootstrap") jvmArgs = clientStartArgs("FactoryRegistry.properties") } val startServerManager by tasks.creating(JavaExec::class.java) { classpath = files(clientRuntime) mainClass.set("de.espirit.common.bootstrap.Bootstrap") jvmArgs = clientStartArgs("AdminManager.properties") }0 -
Author: larsquitsch - 12/11/2023 9:17
Vielen Dank , funktioniert einwandfrei!
Für alle die kein Kotlin nutzen und auf Basis des Modultemplates arbeiten, es reicht die Zeile
"-Dregistry.file=FactoryRegistry.properties", zu "-Dregistry.file=AdminManager.properties",zu ändern.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires