Wow,
this looks exciting, care to introduce/explain?

/peter

http://www.oredev.se - Be there or be gone.

GTalk:        neubauer.peter
Skype        peter.neubauer
ICQ            18762544
Phone       +46704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org     - New Energy for Data - the Graph Database.
http://www.ops4j.org     - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org        - New Energy for Java - Domain Driven Development.




On Wed, Nov 12, 2008 at 8:14 PM,  <[EMAIL PROTECTED]> wrote:
> Author: open4thomas
> Date: Wed Nov 12 20:14:16 2008
> New Revision: 13226
>
> Log:
> + Basic working sample of packman
> + Removed ttb structure
>
> Added:
>   laboratory/users/open4thomas/pax-packman/
>   laboratory/users/open4thomas/pax-packman/pom.xml   (contents, props changed)
>   laboratory/users/open4thomas/pax-packman/src/
>   laboratory/users/open4thomas/pax-packman/src/main/
>   laboratory/users/open4thomas/pax-packman/src/main/resources/
>   laboratory/users/open4thomas/pax-packman/src/main/resources/bin/
>   
> laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setclasspath.sh
>   laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setenv.sh
>   laboratory/users/open4thomas/pax-packman/src/main/resources/bin/start.sh   
> (contents, props changed)
>   laboratory/users/open4thomas/pax-packman/src/main/resources/bin/stop.sh   
> (contents, props changed)
>   laboratory/users/open4thomas/pax-packman/src/main/resources/conf/
>   laboratory/users/open4thomas/pax-packman/src/main/resources/conf/runner.args
>   laboratory/users/open4thomas/pax-packman/src/main/resources/lib/
>   laboratory/users/open4thomas/pax-packman/src/main/resources/logs/
>   laboratory/users/open4thomas/pax-packman/src/main/resources/work/
> Removed:
>   laboratory/users/open4thomas/branches/
>   laboratory/users/open4thomas/tags/
>   laboratory/users/open4thomas/trunk/
>
> Added: laboratory/users/open4thomas/pax-packman/pom.xml
> ==============================================================================
> --- (empty file)
> +++ laboratory/users/open4thomas/pax-packman/pom.xml    Wed Nov 12 20:14:16 
> 2008
> @@ -0,0 +1,104 @@
> +<?xml version='1.0' encoding='UTF-8' ?>
> +<project 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/maven-v4_0_0.xsd";>
> +
> +    <modelVersion>4.0.0</modelVersion>
> +
> +    <parent>
> +       <groupId>org.ops4j.pax</groupId>
> +       <artifactId>master</artifactId>
> +       <version>1.10</version>
> +    </parent>
> +
> +    <groupId>org.ops4j.pax</groupId>
> +    <artifactId>packman</artifactId>
> +    <version>0.1.0-SNAPSHOT</version>
> +    <packaging>jar</packaging>
> +
> +    <name>Pax Packager</name>
> +    <description>Produces distribution unit, that can run as standalone OSGi 
> platform.</description>
> +
> +    <properties>
> +    </properties>
> +
> +    <dependencies>
> +       <dependency>
> +               <groupId>org.ops4j.pax.runner</groupId>
> +               <artifactId>pax-runner-assembly</artifactId>
> +               <version>0.15.0</version>
> +               <classifier>jdk15</classifier>
> +               <type>zip</type>
> +       </dependency>
> +    </dependencies>
> +
> +    <build>
> +       <plugins>
> +               <plugin>
> +                       <groupId>org.apache.maven.plugins</groupId>
> +                       <artifactId>maven-dependency-plugin</artifactId>
> +                       <version>2.0</version>
> +                       <executions>
> +                               <execution>
> +                                       <id>unpack</id>
> +                                       <phase>process-resources</phase>
> +                                       <goals>
> +                                               
> <goal>unpack-dependencies</goal>
> +                                       </goals>
> +                                       <inherited>false</inherited>
> +                                       <configuration>
> +                                               
> <excludeTransitive>true</excludeTransitive>
> +                                               
> <includeArtifactIds>pax-runner-assembly</includeArtifactIds>
> +                                               <type>zip</type>
> +                                               
> <stripVersion>true</stripVersion>
> +                                               
> <includeTypes>zip</includeTypes>
> +                                               <classifier>jdk15</classifier>
> +                                               <outputDirectory>
> +                                                       src/main/resources/bin
> +                                               </outputDirectory>
> +                                       </configuration>
> +                               </execution>
> +                       </executions>
> +               </plugin>
> +
> +               <plugin>
> +                       <groupId>org.apache.maven.plugins</groupId>
> +                       <artifactId>maven-clean-plugin</artifactId>
> +                       <configuration>
> +                               <filesets>
> +                                       <fileset>
> +                                               
> <directory>src/main/resources/bin</directory>
> +                                               <includes>
> +                                                       
> <include>**/*.*</include>
> +                                                       
> <include>**/runner</include>
> +                                                       
> <include>**/bundles</include>
> +                                               </includes>
> +                                               <excludes>
> +                                                       
> <exclude>start.sh</exclude>
> +                                                       
> <exclude>start.bat</exclude>
> +                                                       
> <exclude>stop.sh</exclude>
> +                                                       
> <exclude>stop.bat</exclude>
> +                                <exclude>setenv.sh</exclude>
> +                                <exclude>setenv.bat</exclude>
> +                                <exclude>setclasspath.sh</exclude>
> +                                <exclude>setclasspath.bat</exclude>
> +                                               </excludes>
> +                                               
> <followSymlinks>true</followSymlinks>
> +                                       </fileset>
> +                               </filesets>
> +                       </configuration>
> +               </plugin>
> +       </plugins>
> +    </build>
> +
> +    <repositories>
> +       <repository>
> +               <id>ops4j.releases</id>
> +               <url>http://repository.ops4j.org/maven2</url>
> +               <snapshots>
> +                       <enabled>false</enabled>
> +               </snapshots>
> +       </repository>
> +    </repositories>
> +</project>
> \ No newline at end of file
>
> Added: 
> laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setclasspath.sh
> ==============================================================================
> --- (empty file)
> +++ 
> laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setclasspath.sh
>      Wed Nov 12 20:14:16 2008
> @@ -0,0 +1,131 @@
> +#!/bin/sh
> +
> +# Licensed to the Apache Software Foundation (ASF) under one or more
> +# contributor license agreements.  See the NOTICE file distributed with
> +# this work for additional information regarding copyright ownership.
> +# The ASF licenses this file to You 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.
> +
> +# 
> -----------------------------------------------------------------------------
> +#  Set CLASSPATH and Java options
> +#
> +#  $Id: setclasspath.sh 589060 2007-10-27 08:19:24Z jfclere $
> +# 
> -----------------------------------------------------------------------------
> +
> +# First clear out the user classpath
> +CLASSPATH=
> +
> +# Make sure prerequisite environment variables are set
> +if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
> +  # Bugzilla 37284 (reviewed).
> +  if $darwin; then
> +    if [ -d 
> "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
> +      export 
> JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
> +    fi
> +  else
> +    JAVA_PATH=`which java 2>/dev/null`
> +    if [ "x$JAVA_PATH" != "x" ]; then
> +      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
> +      JRE_HOME=`dirname $JAVA_PATH 2>/dev/null`
> +    fi
> +    if [ "x$JRE_HOME" = "x" ]; then
> +      # XXX: Should we try other locations?
> +      if [ -x /usr/bin/java ]; then
> +        JRE_HOME=/usr
> +      fi
> +    fi
> +  fi
> +  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
> +    echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is 
> defined"
> +    echo "At least one of these environment variable is needed to run this 
> program"
> +    exit 1
> +  fi
> +fi
> +if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
> +  echo "JAVA_HOME should point to a JDK in order to run in debug mode."
> +  exit 1
> +fi
> +if [ -z "$JRE_HOME" ]; then
> +  JRE_HOME="$JAVA_HOME"
> +fi
> +
> +# If we're running under jdb, we need a full jdk.
> +if [ "$1" = "debug" -o "$1" = "javac" ] ; then
> +  if [ "$os400" = "true" ]; then
> +    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
> +      echo "The JAVA_HOME environment variable is not defined correctly"
> +      echo "This environment variable is needed to run this program"
> +      echo "NB: JAVA_HOME should point to a JDK not a JRE"
> +      exit 1
> +    fi
> +  else
> +    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x 
> "$JAVA_HOME"/bin/javac ]; then
> +      echo "The JAVA_HOME environment variable is not defined correctly"
> +      echo "This environment variable is needed to run this program"
> +      echo "NB: JAVA_HOME should point to a JDK not a JRE"
> +      exit 1
> +    fi
> +  fi
> +fi
> +if [ -z "$BASEDIR" ]; then
> +  echo "The BASEDIR environment variable is not defined"
> +  echo "This environment variable is needed to run this program"
> +  exit 1
> +fi
> +if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then
> +  if $os400; then
> +    # -x will Only work on the os400 if the files are:
> +    # 1. owned by the user
> +    # 2. owned by the PRIMARY group of the user
> +    # this will not work if the user belongs in secondary groups
> +    eval
> +  else
> +    echo "The BASEDIR environment variable is not defined correctly"
> +    echo "This environment variable is needed to run this program"
> +    exit 1
> +  fi
> +fi
> +
> +# Set the default -Djava.endorsed.dirs argument
> +JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
> +
> +# Set standard CLASSPATH
> +if [ "$1" = "javac" ] ; then
> +  if [ ! -f "$JAVA_HOME"/lib/tools.jar ]; then
> +    echo "Can't find tools.jar in JAVA_HOME"
> +    echo "Need a JDK to run javac"
> +    exit 1
> +  fi
> +fi
> +if [ "$1" = "debug" -o "$1" = "javac" ] ; then
> +  if [ -f "$JAVA_HOME"/lib/tools.jar ]; then
> +    CLASSPATH="$JAVA_HOME"/lib/tools.jar
> +  fi
> +fi
> +
> +# OSX hack to CLASSPATH
> +JIKESPATH=
> +if [ `uname -s` = "Darwin" ]; then
> +  
> OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
> +  if [ -d "$OSXHACK" ]; then
> +    for i in "$OSXHACK"/*.jar; do
> +      JIKESPATH="$JIKESPATH":"$i"
> +    done
> +  fi
> +fi
> +
> +# Set standard commands for invoking Java.
> +  _RUNJAVA="$JRE_HOME"/bin/java
> +if [ "$os400" != "true" ]; then
> +  _RUNJDB="$JAVA_HOME"/bin/jdb
> +fi
> +_RUNJAVAC="$JAVA_HOME"/bin/javac
>
> Added: 
> laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setenv.sh
> ==============================================================================
> --- (empty file)
> +++ laboratory/users/open4thomas/pax-packman/src/main/resources/bin/setenv.sh 
>   Wed Nov 12 20:14:16 2008
> @@ -0,0 +1,13 @@
> +
> +JAVA_OPTS="$JAVA_OPTS "-Djava.util.Date=java.util.Date
> +
> +if [ "${RUNNER_ARGS}" != "" ]
> +then
> +  RUNNER_ARGS="$RUNNER_ARGS "
> +fi
> +
> +RUNNER_ARGS="$RUNNER_ARGS"--args=file:../conf/runner.args
> +
> +
> +
> +
>
> Added: 
> laboratory/users/open4thomas/pax-packman/src/main/resources/bin/start.sh
> ==============================================================================
> --- (empty file)
> +++ laboratory/users/open4thomas/pax-packman/src/main/resources/bin/start.sh  
>   Wed Nov 12 20:14:16 2008
> @@ -0,0 +1,44 @@
> +#!/bin/sh
> +#
> +# Script to run Pax Runner, which starts OSGi frameworks with applications.
> +#
> +#
> +
> +
> +RUNNER_HOME=../
> +BASEDIR="$RUNNER_HOME"
> +EXECUTABLE_DIR="$RUNNER_HOME"bin/pax*/bin/
> +
> +# ===== Detect JAVA_HOME and set CLASSPATH ======
> +if [ ! -f "$RUNNER_HOME"bin/setclasspath.sh ]; then
> +    echo "Can't set classpath."
> +    exit 1
> +else
> +    . "$RUNNER_HOME"bin/setclasspath.sh
> +fi
> +
> +
> +# ====== Set Other Environment Variable ========
> +if [ ! -f "$RUNNER_HOME"bin/setenv.sh ]; then
> +    echo "Can't set environment variables."
> +    exit 1
> +else
> +    . "$RUNNER_HOME"bin/setenv.sh
> +fi
> +
> +
> +echo '====================================='
> +echo 'The following variables have been set'
> +echo '====================================='
> +echo JAVA_OPTS   = $JAVA_OPTS
> +echo JAVA_HOME   = $JAVA_HOME
> +echo CLASSPATH   = $CLASSPATH
> +echo RUNNER_ARGS = $RUNNER_ARGS
> +echo Command Line Arguments = $@
> +echo '====================================='
> +
> +echo ''
> +echo ''
> +
> +
> +exec java $JAVA_OPTS -jar $EXECUTABLE_DIR/pax-runner-*.jar "$RUNNER_ARGS" 
> "$@"
>
> Added: laboratory/users/open4thomas/pax-packman/src/main/resources/bin/stop.sh
> ==============================================================================
>
> Added: 
> laboratory/users/open4thomas/pax-packman/src/main/resources/conf/runner.args
> ==============================================================================
> --- (empty file)
> +++ 
> laboratory/users/open4thomas/pax-packman/src/main/resources/conf/runner.args  
>       Wed Nov 12 20:14:16 2008
> @@ -0,0 +1,2 @@
> +--log=INFO
> +--p=e
>
> _______________________________________________
> notify mailing list
> [EMAIL PROTECTED]
> http://lists.ops4j.org/mailman/listinfo/notify
>
>

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to