org.argeo.tp.factory.rcp
argeo.node.repo.type=localfs
+argeo.node.useradmin.uris=ipa:///
-org.osgi.framework.security=osgi
+#org.osgi.framework.security=osgi
+java.security.manager=
java.security.policy=file:../../all.policy
org.osgi.service.http.port=7080
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
- <location>src/main/rpm/usr/bin</location>
+ <location>rpm/usr/bin</location>
</source>
</sources>
</mapping>
+ <!-- <mapping> -->
+ <!-- <directory>/usr/sbin</directory> -->
+ <!-- <username>root</username> -->
+ <!-- <groupname>root</groupname> -->
+ <!-- <filemode>755</filemode> -->
+ <!-- <directoryIncluded>false</directoryIncluded> -->
+ <!-- <sources> -->
+ <!-- <source> -->
+ <!-- <location>rpm/usr/sbin</location> -->
+ <!-- </source> -->
+ <!-- </sources> -->
+ <!-- </mapping> -->
+ <!-- <mapping> -->
+ <!-- <directory>/usr/lib/systemd/system</directory> -->
+ <!-- <username>root</username> -->
+ <!-- <groupname>root</groupname> -->
+ <!-- <filemode>644</filemode> -->
+ <!-- <directoryIncluded>false</directoryIncluded> -->
+ <!-- <sources> -->
+ <!-- <source> -->
+ <!-- <location>rpm/usr/lib/systemd/system</location> -->
+ <!-- </source> -->
+ <!-- </sources> -->
+ <!-- </mapping> -->
<mapping>
<directory>/etc/init.d</directory>
<username>root</username>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
- <location>src/main/rpm/etc/init.d</location>
+ <location>rpm/etc/init.d</location>
</source>
</sources>
</mapping>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
- <location>src/main/rpm/etc/slc</location>
+ <location>rpm/etc/slc</location>
</source>
</sources>
</mapping>
<directoryIncluded>false</directoryIncluded>
<sources>
<source>
- <location>src/main/rpm/etc/slc-cl</location>
+ <location>rpm/etc/slc-cl</location>
</source>
</sources>
</mapping>
</sources>
</mapping>
<!-- Maven (even if not installed) -->
- <mapping>
- <directory>/var/lib/slc/.m2</directory>
- <username>slc</username>
- <groupname>slc</groupname>
- <filemode>600</filemode>
- <directoryIncluded>false</directoryIncluded>
- <sources>
- <source>
- <location>src/main/rpm/var/lib/slc/.m2</location>
- </source>
- </sources>
- </mapping>
+ <!-- <mapping> -->
+ <!-- <directory>/var/lib/slc/.m2</directory> -->
+ <!-- <username>slc</username> -->
+ <!-- <groupname>slc</groupname> -->
+ <!-- <filemode>600</filemode> -->
+ <!-- <directoryIncluded>false</directoryIncluded> -->
+ <!-- <sources> -->
+ <!-- <source> -->
+ <!-- <location>rpm/var/lib/slc/.m2</location> -->
+ <!-- </source> -->
+ <!-- </sources> -->
+ <!-- </mapping> -->
</mappings>
<preinstallScriptlet>
- <scriptFile>src/main/scripts/preinstall</scriptFile>
+ <scriptFile>rpm/scripts/preinstall</scriptFile>
</preinstallScriptlet>
<postinstallScriptlet>
- <scriptFile>src/main/scripts/postinstall</scriptFile>
+ <scriptFile>rpm/scripts/postinstall</scriptFile>
</postinstallScriptlet>
<preremoveScriptlet>
- <scriptFile>src/main/scripts/preremove</scriptFile>
+ <scriptFile>rpm/scripts/preremove</scriptFile>
</preremoveScriptlet>
<requires>
<require>slc-platform</require>
<require>osgi-boot</require>
<!-- do not require java so that it can be installed on Ubuntu -->
- <!-- <require>java-1.6.0-openjdk</require> -->
</requires>
</configuration>
</execution>
--- /dev/null
+#!/bin/bash
+#
+# slc Argeo SLC
+#
+# chkconfig: 3 92 92
+# description: Argeo SLC (http://www.argeo.org)
+
+# Source function library.
+. /etc/osgiboot/osgi-service-init-functions.sh
+
+# Application id (must be in line with header)
+APP=slc
+
+# main
+case "$1" in
+ start)
+ osgi_service_start $APP
+ ;;
+ stop)
+ osgi_service_stop $APP
+ ;;
+ restart)
+ osgi_service_stop $APP
+ osgi_service_start $APP
+ RETVAL=$?
+ ;;
+ status)
+ osgi_service_status $APP
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
+
+exit $RETVAL
--- /dev/null
+argeo.osgi.start=\
+org.eclipse.equinox.cm,\
+org.argeo.cms,\
+org.eclipse.gemini.blueprint.extender,\
+org.argeo.slc.agent,\
+org.argeo.slc.agent.jcr,\
+
+argeo.node.repo.type=localfs
+
+# DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
+
+argeo.osgi.bundles=\
+${user.home}/.slc/modules;in=**;ex=**/.git/**;ex=**/.svn/**,\
+/etc/slc-cl/modules;in=**;ex=**/.git/**;ex=**/.svn/**,\
+/usr/local/share/osgi;in=**/*.jar,\
+/usr/share/osgi;in=**/*.jar
--- /dev/null
+#log4j.rootLogger=WARN, file
+log4j.rootLogger=WARN, console
+
+## Levels
+log4j.logger.org.argeo=INFO
+
+## Appenders
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n - %t
+
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=/var/log/slc/slc.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n
--- /dev/null
+argeo.osgi.start.2.http=\
+org.eclipse.equinox.http.servlet,\
+org.eclipse.equinox.http.jetty,\
+org.eclipse.equinox.cm,\
+org.eclipse.rap.rwt.osgi
+
+argeo.osgi.start.3.node=\
+org.argeo.cms
+
+argeo.osgi.start.4.apps=\
+org.eclipse.gemini.blueprint.extender
+
+argeo.osgi.start.4.workbench=\
+org.eclipse.equinox.http.registry,\
+
+argeo.osgi.start.5.slc=\
+org.argeo.slc.node.jackrabbit,\
+org.argeo.slc.agent,\
+org.argeo.slc.agent.jcr,\
+org.argeo.slc.server.repo,\
+
+argeo.node.repo.type=localfs
+
+org.osgi.service.http.port=8080
+org.eclipse.equinox.http.jetty.log.stderr.threshold=info
+
+slc.executionModules=org.argeo.slc.demo.ant,\
+org.argeo.slc.demo.basic,\
+org.argeo.slc.demo.minimal,\
+
+org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.dist.distributionPerspective
+
+# OSGi MANAGEMENT
+osgi.console=2323
+
+# DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
+osgi.bundles=org.argeo.osgi.boot.jar@start
+argeo.osgi.baseUrl=file:///usr/share/osgi/
+argeo.osgi.distributionUrl=org/argeo/slc/org.argeo.slc.dep.backend/2.1.*/org.argeo.slc.dep.backend-2.1.*.jar
+argeo.osgi.bundles=\
+/etc/slc/modules;in=*,\
+/usr/local/share/osgi;in=**/*.jar
+#/usr/share/osgi;in=**/*.jar,\
+
+org.osgi.framework.bootdelegation=com.sun.jndi.ldap,\
+com.sun.jndi.ldap.sasl,\
+com.sun.security.jgss,\
+com.sun.jndi.dns,\
+com.sun.nio.file,\
+com.sun.nio.sctp
+
+eclipse.ignoreApp=true
+osgi.noShutdown=true
+org.eclipse.equinox.http.jetty.autostart=false
+org.eclipse.rap.workbenchAutostart=false
--- /dev/null
+log4j.rootLogger=WARN, file
+#log4j.rootLogger=WARN, console
+
+## Levels
+log4j.logger.org.argeo=INFO
+log4j.logger.org.argeo.jackrabbit.remote.ExtendedDispatcherServlet=ERROR
+log4j.logger.org.springframework.web.servlet.PageNotFound=ERROR
+log4j.logger.org.argeo.server.webextender.TomcatDeployer=WARN
+
+log4j.logger.org.apache.coyote=INFO
+log4j.logger.org.apache.catalina.core.ContainerBase=INFO
+log4j.logger.org.apache.directory.server=ERROR
+log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
+log4j.logger.org.apache.jackrabbit.core.config.ConfigurationErrorHandler=ERROR
+log4j.logger.org.apache.jackrabbit.core.util.db.DbUtility=FATAL
+
+## Appenders
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n - %t
+
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=/var/log/slc/slc.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n
--- /dev/null
+if [ $1 = "1" ];then
+ APP=%{name}
+ /sbin/chkconfig --add $APP
+ /sbin/chkconfig --level 3 $APP on
+fi
+
+# Workaround until we find a way to do it in the spec file
+chown -f slc.slc /var/lib/slc/.m2
--- /dev/null
+if [ $1 = "1" ];then
+ APP=%{name}
+
+ # check if user exists
+ /bin/id $APP 2>/dev/null
+ if [ $? -ne 0 ];then
+ # create application user (EL6)
+ echo Create user $APP...
+ useradd --system --home-dir /var/lib/$APP --shell /sbin/nologin --user-group --create-home $APP
+ fi
+
+ # give read access to group on home
+ chmod g+r /var/lib/$APP
+ mkdir -p /var/lib/$APP/{conf,data}
+ chown $APP.$APP /var/lib/$APP/{conf,data}
+fi
\ No newline at end of file
--- /dev/null
+if [ $1 = "0" ];then
+ #APP=%{name} => doesn't work
+ APP=slc
+ /sbin/chkconfig --del $APP
+
+ # Maven
+ rm -rf /var/lib/$APP/.m2/repository
+
+ #userdel $APP
+fi
--- /dev/null
+#!/bin/sh
+
+JAVA_CMD=java
+JAVA_OPTS="-client -Xmx128m"
+
+SLC_HOME_DIR=${HOME}/.local/share/slc/
+if [ -f $SLC_HOME_DIR/settings.sh ];then
+ . $SLC_HOME_DIR/settings.sh
+fi
+
+OSGI_INSTALL_AREA=/usr/share/osgi/boot
+
+ARGEO_OSGI_BUNDLES="$SLC_HOME_DIR/modules;in=**;ex=**/.git/**;ex=**/.svn/**,/etc/slc-cl/modules;in=**;ex=**/.git/**;ex=**/.svn/**,/usr/share/osgi;in=*.jar"
+
+for i in "${OSGI_INSTALL_AREA}"/*.jar
+ do
+ CLASSPATH="$CLASSPATH:$i"
+ done
+
+$JAVA_CMD $JAVA_OPTS \
+ "-Dargeo.osgi.bundles=$ARGEO_OSGI_BUNDLES" \
+ -Djava.security.manager= \
+ -Djava.security.policy="file:/etc/osgiboot/all.policy" \
+ -cp "$CLASSPATH" \
+ org.argeo.slc.cli.SlcMain "$@"
+
\ No newline at end of file
--- /dev/null
+[Unit]
+Description=Argeo SLC daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/slcd start
+ExecStop=/usr/sbin/slcd stop
+Type=forking
+PIDFile=/var/run/slcd.pid
+
+[Install]
+WantedBy=default.target
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+. /etc/osgiboot/osgi-service-init-functions.sh
+
+APP=slc
+
+case "$1" in
+ start)
+ osgi_service_start $APP
+ ;;
+ stop)
+ osgi_service_stop $APP
+ ;;
+ restart)
+ osgi_service_stop $APP
+ osgi_service_start $APP
+ RETVAL=$?
+ ;;
+ status)
+ osgi_service_status $APP
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
+
+exit $RETVAL
+++ /dev/null
-#!/bin/bash
-#
-# slc Argeo SLC
-#
-# chkconfig: 3 92 92
-# description: Argeo SLC (http://www.argeo.org)
-
-# Source function library.
-. /etc/osgiboot/osgi-service-init-functions.sh
-
-# Application id (must be in line with header)
-APP=slc
-
-# main
-case "$1" in
- start)
- osgi_service_start $APP
- ;;
- stop)
- osgi_service_stop $APP
- ;;
- restart)
- osgi_service_stop $APP
- osgi_service_start $APP
- RETVAL=$?
- ;;
- status)
- osgi_service_status $APP
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart|status}"
- exit 1
-esac
-
-exit $RETVAL
+++ /dev/null
-argeo.osgi.start=\
-org.eclipse.equinox.cm,\
-org.argeo.cms,\
-org.eclipse.gemini.blueprint.extender,\
-org.argeo.slc.agent,\
-org.argeo.slc.agent.jcr,\
-
-argeo.node.repo.type=localfs
-
-# DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
-
-argeo.osgi.bundles=\
-${user.home}/.slc/modules;in=**;ex=**/.git/**;ex=**/.svn/**,\
-/etc/slc-cl/modules;in=**;ex=**/.git/**;ex=**/.svn/**,\
-/usr/local/share/osgi;in=**/*.jar,\
-/usr/share/osgi;in=**/*.jar
+++ /dev/null
-#log4j.rootLogger=WARN, file
-log4j.rootLogger=WARN, console
-
-## Levels
-log4j.logger.org.argeo=INFO
-
-## Appenders
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n - %t
-
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.File=/var/log/slc/slc.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n
+++ /dev/null
-argeo.osgi.start.2.http=\
-org.eclipse.equinox.http.servlet,\
-org.eclipse.equinox.http.jetty,\
-org.eclipse.equinox.cm,\
-org.eclipse.rap.rwt.osgi
-
-argeo.osgi.start.3.node=\
-org.argeo.cms
-
-argeo.osgi.start.4.apps=\
-org.eclipse.gemini.blueprint.extender
-
-argeo.osgi.start.4.workbench=\
-org.eclipse.equinox.http.registry,\
-
-argeo.osgi.start.5.slc=\
-org.argeo.slc.node.jackrabbit,\
-org.argeo.slc.agent,\
-org.argeo.slc.agent.jcr,\
-org.argeo.slc.server.repo,\
-
-argeo.node.repo.type=localfs
-
-org.osgi.service.http.port=8080
-org.eclipse.equinox.http.jetty.log.stderr.threshold=info
-
-slc.executionModules=org.argeo.slc.demo.ant,\
-org.argeo.slc.demo.basic,\
-org.argeo.slc.demo.minimal,\
-
-org.argeo.security.ui.initialPerspective=org.argeo.slc.client.ui.dist.distributionPerspective
-
-# OSGi MANAGEMENT
-osgi.console=2323
-
-# DO NOT CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
-osgi.bundles=org.argeo.osgi.boot.jar@start
-argeo.osgi.baseUrl=file:///usr/share/osgi/
-argeo.osgi.distributionUrl=org/argeo/slc/org.argeo.slc.dep.backend/2.1.*/org.argeo.slc.dep.backend-2.1.*.jar
-argeo.osgi.bundles=\
-/etc/slc/modules;in=*,\
-/usr/local/share/osgi;in=**/*.jar
-#/usr/share/osgi;in=**/*.jar,\
-
-org.osgi.framework.bootdelegation=com.sun.jndi.ldap,\
-com.sun.jndi.ldap.sasl,\
-com.sun.security.jgss,\
-com.sun.jndi.dns,\
-com.sun.nio.file,\
-com.sun.nio.sctp
-
-eclipse.ignoreApp=true
-osgi.noShutdown=true
-org.eclipse.equinox.http.jetty.autostart=false
-org.eclipse.rap.workbenchAutostart=false
+++ /dev/null
-log4j.rootLogger=WARN, file
-#log4j.rootLogger=WARN, console
-
-## Levels
-log4j.logger.org.argeo=INFO
-log4j.logger.org.argeo.jackrabbit.remote.ExtendedDispatcherServlet=ERROR
-log4j.logger.org.springframework.web.servlet.PageNotFound=ERROR
-log4j.logger.org.argeo.server.webextender.TomcatDeployer=WARN
-
-log4j.logger.org.apache.coyote=INFO
-log4j.logger.org.apache.catalina.core.ContainerBase=INFO
-log4j.logger.org.apache.directory.server=ERROR
-log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
-log4j.logger.org.apache.jackrabbit.core.config.ConfigurationErrorHandler=ERROR
-log4j.logger.org.apache.jackrabbit.core.util.db.DbUtility=FATAL
-
-## Appenders
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n - %t
-
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.File=/var/log/slc/slc.log
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern= %-5p %d{ISO8601} [%15.15t] %m - %c%n
+++ /dev/null
-#!/bin/sh
-
-JAVA_CMD=/usr/lib/jvm/java-1.8.0/bin/java
-JAVA_OPTS="-client -Xmx256m"
-
-SLC_HOME_DIR=${HOME}/.local/share/slc/
-if [ -f $SLC_HOME_DIR/settings.sh ];then
- . $SLC_HOME_DIR/settings.sh
-fi
-
-OSGI_INSTALL_AREA=/usr/share/osgi/boot
-
-ARGEO_OSGI_BUNDLES="$SLC_HOME_DIR/modules;in=**;ex=**/.git/**;ex=**/.svn/**,/etc/slc-cl/modules;in=**;ex=**/.git/**;ex=**/.svn/**,/usr/share/osgi;in=*.jar"
-
-for i in "${OSGI_INSTALL_AREA}"/*.jar
- do
- CLASSPATH="$CLASSPATH:$i"
- done
-
-$JAVA_CMD $JAVA_OPTS \
- "-Dargeo.osgi.bundles=$ARGEO_OSGI_BUNDLES" \
- -Dorg.osgi.framework.security=osgi \
- -Djava.security.policy="file:/etc/osgiboot/all.policy" \
- -cp "$CLASSPATH" \
- org.argeo.slc.cli.SlcMain "$@"
-
\ No newline at end of file
+++ /dev/null
-<!--
-
- Copyright (C) 2007-2012 Argeo GmbH
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/settings-1.0.0.xsd">
- <mirrors>
- <mirror>
- <id>slc-repo</id>
- <name>SLC Repository</name>
- <url>http://localhost:7080/org.argeo.slc.repo.webapp/maven</url>
- <mirrorOf>*</mirrorOf>
- </mirror>
- </mirrors>
- <servers>
- <server>
- <id>slc-repo</id>
- <username>root</username>
- <password>demo</password>
- </server>
- <server>
- <id>localrepo</id>
- <username>root</username>
- <password>demo</password>
- </server>
- <server>
- <id>localrepo.snapshots</id>
- <username>root</username>
- <password>demo</password>
- </server>
- </servers>
-</settings>
-
+++ /dev/null
-if [ $1 = "1" ];then
- APP=%{name}
- /sbin/chkconfig --add $APP
- /sbin/chkconfig --level 3 $APP on
-fi
-
-# Workaround until we find a way to do it in the spec file
-chown -f slc.slc /var/lib/slc/.m2
+++ /dev/null
-if [ $1 = "1" ];then
- APP=%{name}
-
- # check if user exists
- /bin/id $APP 2>/dev/null
- if [ $? -ne 0 ];then
- # create application user (EL6)
- echo Create user $APP...
- useradd --system --home-dir /var/lib/$APP --shell /sbin/nologin --user-group --create-home $APP
- fi
-
- # give read access to group on home
- chmod g+r /var/lib/$APP
- mkdir -p /var/lib/$APP/{conf,data}
- chown $APP.$APP /var/lib/$APP/{conf,data}
-fi
\ No newline at end of file
+++ /dev/null
-if [ $1 = "0" ];then
- #APP=%{name} => doesn't work
- APP=slc
- /sbin/chkconfig --del $APP
-
- # Maven
- rm -rf /var/lib/$APP/.m2/repository
-
- #userdel $APP
-fi
this.confDir = confDir;
this.dataDir = dataDir;
this.modulesDir = modulesDir;
- bundlesToStart.add("org.springframework.osgi.extender");
- bundlesToStart.add("org.argeo.node.repo.jackrabbit");
- bundlesToStart.add("org.argeo.security.dao.os");
- bundlesToStart.add("org.argeo.slc.node.jackrabbit");
+
+ bundlesToStart.add("org.eclipse.equinox.cm");
+ bundlesToStart.add("org.argeo.cms");
+ bundlesToStart.add("org.eclipse.gemini.blueprint.extender");
bundlesToStart.add("org.argeo.slc.agent");
bundlesToStart.add("org.argeo.slc.agent.jcr");
- if (args.length == 0)
- bundlesToStart.add("org.argeo.slc.support.equinox");
+
+ // bundlesToStart.add("org.springframework.osgi.extender");
+ // bundlesToStart.add("org.argeo.node.repo.jackrabbit");
+ // bundlesToStart.add("org.argeo.security.dao.os");
+ // bundlesToStart.add("org.argeo.slc.node.jackrabbit");
+ // bundlesToStart.add("org.argeo.slc.agent");
+ // bundlesToStart.add("org.argeo.slc.agent.jcr");
+ // if (args.length == 0)
+ // bundlesToStart.add("org.argeo.slc.support.equinox");
// bundlesToStart.add("org.argeo.slc.agent.cli");
}
info("## Data : " + dataDir.getCanonicalPath());
// Start Equinox
- ServiceLoader<FrameworkFactory> ff = ServiceLoader
- .load(FrameworkFactory.class);
+ ServiceLoader<FrameworkFactory> ff = ServiceLoader.load(FrameworkFactory.class);
FrameworkFactory frameworkFactory = ff.iterator().next();
Map<String, String> configuration = new HashMap<String, String>();
- configuration.put("osgi.configuration.area",
- confDir.getCanonicalPath());
+ configuration.put("osgi.configuration.area", confDir.getCanonicalPath());
configuration.put("osgi.instance.area", dataDir.getCanonicalPath());
// Do clean
configuration.put("osgi.clean", "true");
// working copy modules
if (modulesDir.exists())
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(modulesDir
- .getCanonicalPath() + ";in=*;ex=.gitignore"));
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(modulesDir.getCanonicalPath() + ";in=*;ex=.gitignore"));
// system modules
if (System.getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES) != null)
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
- .getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES)));
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(System.getProperty(OsgiBoot.PROP_ARGEO_OSGI_BUNDLES)));
else
- osgiBoot.installUrls(osgiBoot.getBundlesUrls(System
- .getProperty("user.home") + "/.slc/modules/;in=**"));
+ osgiBoot.installUrls(osgiBoot.getBundlesUrls(System.getProperty("user.home") + "/.slc/modules/;in=**"));
// Start runtime
osgiBoot.startBundles(bundlesToStart);
// Find SLC Agent
ServiceReference sr = null;
while (sr == null) {
- sr = bundleContext
- .getServiceReference("org.argeo.slc.execution.SlcAgentCli");
+ sr = bundleContext.getServiceReference("org.argeo.slc.execution.SlcAgentCli");
if (System.currentTimeMillis() - begin > timeout)
throw new RuntimeException("Cannot find SLC agent CLI");
Thread.sleep(100);
// Initialization completed
long duration = System.currentTimeMillis() - begin;
- info("[[ Initialized in " + (duration / 1000) + "s "
- + (duration % 1000) + "ms ]]");
+ info("[[ Initialized in " + (duration / 1000) + "s " + (duration % 1000) + "ms ]]");
if (args.length == 0)
return null;// console mode
// Subject.doAs(Subject.getSubject(AccessController.getContext()),
// new AgentCliCall(agentCli));
Class<?>[] parameterTypes = { String[].class };
- Method method = agentCli.getClass().getMethod("process",
- parameterTypes);
+ Method method = agentCli.getClass().getMethod("process", parameterTypes);
Object[] methodArgs = { args };
Object ret = method.invoke(agentCli, methodArgs);
File slcDir;
Boolean isTransient = false;
if (isTransient) {
- File tempDir = new File(System.getProperty("java.io.tmpdir")
- + "/" + System.getProperty("user.name"));
- slcDir = new File(tempDir, "slc-"
- + UUID.randomUUID().toString());
+ File tempDir = new File(System.getProperty("java.io.tmpdir") + "/" + System.getProperty("user.name"));
+ slcDir = new File(tempDir, "slc-" + UUID.randomUUID().toString());
slcDir.mkdirs();
- System.setProperty("argeo.node.repo.configuration",
- "osgibundle:repository-memory.xml");
+ System.setProperty("argeo.node.repo.configuration", "osgibundle:repository-memory.xml");
} else {
slcDir = findSlcDir(executionDir);
if (slcDir == null) {
File modulesDir = new File(slcDir, "modules");
// JAAS
-// File jaasFile = new File(confDir, "jaas.config");
-// if (!jaasFile.exists())
-// copyResource("/org/argeo/slc/cli/jaas.config", jaasFile);
-// System.setProperty("java.security.auth.login.config",
-// jaasFile.getCanonicalPath());
+ // File jaasFile = new File(confDir, "jaas.config");
+ // if (!jaasFile.exists())
+ // copyResource("/org/argeo/slc/cli/jaas.config", jaasFile);
+ // System.setProperty("java.security.auth.login.config",
+ // jaasFile.getCanonicalPath());
// log4j
File log4jFile = new File(confDir, "log4j.properties");
if (!log4jFile.exists())
copyResource("/org/argeo/slc/cli/log4j.properties", log4jFile);
- System.setProperty("log4j.configuration",
- "file://" + log4jFile.getCanonicalPath());
+ System.setProperty("log4j.configuration", "file://" + log4jFile.getCanonicalPath());
// Run as a privileged action
-// LoginContext lc = new LoginContext(os);
-// lc.login();
-//
-// Subject subject = Subject.getSubject(AccessController.getContext());
-// Subject.doAs(subject, new SlcMain(args, confDir, dataDir,
-// modulesDir));
-SlcMain slcMain = new SlcMain(args, confDir, dataDir,
- modulesDir);
-slcMain.run();
+ // LoginContext lc = new LoginContext(os);
+ // lc.login();
+ //
+ // Subject subject =
+ // Subject.getSubject(AccessController.getContext());
+ // Subject.doAs(subject, new SlcMain(args, confDir, dataDir,
+ // modulesDir));
+ SlcMain slcMain = new SlcMain(args, confDir, dataDir, modulesDir);
+ slcMain.run();
if (args.length != 0)
System.exit(0);
} catch (Exception e) {
output.write(buf, 0, length);
}
} catch (Exception e) {
- throw new RuntimeException("Cannot write " + resource + " file to "
- + targetFile, e);
+ throw new RuntimeException("Cannot write " + resource + " file to " + targetFile, e);
} finally {
try {
input.close();
// }
//
// }
-
<parent>
<groupId>org.argeo.commons</groupId>
<artifactId>argeo-commons</artifactId>
- <version>2.1.69-SNAPSHOT</version>
+ <version>2.1.69</version>
</parent>
<groupId>org.argeo.slc</groupId>
<artifactId>argeo-slc</artifactId>