#!/bin/sh

cp="@l_prefix@/etc/nexus"
for jar in \
    @l_prefix@/lib/nexus/*.jar \
    @l_prefix@/lib/nexus/boot/*.jar \
    @l_prefix@/lib/nexus/support/*.jar; do
    cp="$cp:$jar"
done
exec @l_prefix@/bin/java \
    -Vsun-jdk \
    -cp "$cp" \
    -Xms1200M -Xmx1200M \
    -XX:+UnlockDiagnosticVMOptions \
    -XX:+UnsyncloadClass \
    -Djava.net.preferIPv4Stack=true \
    -Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" \
    -Dsun.net.inetaddr.ttl=3600 \
    -Djava.io.tmpdir=@l_prefix@/var/nexus/tmp \
    -Djava.util.logging.config.file=@l_prefix@/etc/nexus/java.util.logging.properties \
    -Djava.util.prefs.userRoot=@l_prefix@/var/nexus/data \
    -Dkaraf.home=@l_prefix@/share/nexus \
    -Dkaraf.base=@l_prefix@/lib/nexus \
    -Dkaraf.etc=@l_prefix@/etc/nexus \
    -Dkaraf.data=@l_prefix@/var/nexus/data \
    -Dkaraf.startLocalConsole=false \
    org.sonatype.nexus.karaf.NexusMain \
    ${1+"$@"}

