Skip to content

Commit

Permalink
Add a sample container project based on PojoSR. It works :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin authored and alesj committed Oct 12, 2012
1 parent ba2c4ce commit 50329b7
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 0 deletions.
177 changes: 177 additions & 0 deletions environments/osgi/examples/container-lite/pom.xml
@@ -0,0 +1,177 @@
<?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>
<groupId>org.jboss.weld.osgi.examples</groupId>
<artifactId>weld-osgi-container-lite</artifactId>
<version>1.1.3-SNAPSHOT</version>
<name>Weld OSGi (Examples Container Lite)</name>

<description>Standalone example for Weld-OSGi</description>

<url>http://www.seamframework.org/Weld</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>

<developers>
<developer>
<name>Mathieu Ancelin</name>
<email>mathieu.ancelin@serli.com</email>
</developer>
<developer>
<name>Matthieu Clochard</name>
<email>matthieu.clochard@serli.com</email>
</developer>
</developers>

<dependencies>

<dependency>
<groupId>org.jboss.weld.osgi.examples</groupId>
<artifactId>weld-osgi-paint-api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi.examples</groupId>
<artifactId>weld-osgi-paint-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi.examples</groupId>
<artifactId>weld-osgi-paint-square</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi.examples</groupId>
<artifactId>weld-osgi-paint-triangle</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi</groupId>
<artifactId>weld-osgi-core-api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi</groupId>
<artifactId>weld-osgi-core-spi</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi</groupId>
<artifactId>weld-osgi-core-extension</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi</groupId>
<artifactId>weld-osgi-core-mandatory</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.osgi</groupId>
<artifactId>weld-osgi-core-integration</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
</dependency>

<dependency>
<groupId>com.googlecode.pojosr</groupId>
<artifactId>de.kalpatec.pojosr.framework</artifactId>
<version>0.1.4</version>
</dependency>

<dependency>
<groupId>org.apache.felix.gogo</groupId>
<artifactId>org.apache.felix.gogo.commands</artifactId>
<version>0.4.0</version>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.shell.tui</artifactId>
<version>1.0.2</version>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.shell</artifactId>
<version>1.0.2</version>
</dependency>

<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${maven.dependency.com.googlecode.pojosr.de.kalpatec.pojosr.framework.jar.path}" tofile="${project.build.directory}/pojosr.jar"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-executable-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
10 changes: 10 additions & 0 deletions environments/osgi/examples/container-lite/run.sh
@@ -0,0 +1,10 @@
#!/bin/sh

cd ./target/weld-osgi-container-lite-1.1.3-SNAPSHOT-all/weld-osgi-container-lite-1.1.3-SNAPSHOT/;

LIBS=./modules
LIBS_CLASSPATH=`find $LIBS -type f -name \*.jar`
LIBS_CLASSPATH=`echo $LIBS_CLASSPATH | tr ' ' ':'`

java -cp bin/pojosr.jar:$LIBS_CLASSPATH de.kalpatec.pojosr.framework.PojoSR

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>all</id>
<formats>
<format>dir</format>
</formats>
<dependencySets>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>modules</outputDirectory>
<includes>
<include>org.apache.felix.gogo:org.apache.felix.gogo.commands</include>
<include>org.apache.felix.gogo:org.apache.felix.gogo.runtime</include>
<include>org.jboss.weld.osgi.examples:weld-osgi-paint-api</include>
<include>org.jboss.weld.osgi.examples:weld-osgi-paint-core</include>
<include>org.jboss.weld.osgi.examples:weld-osgi-paint-triangle</include>
<include>org.jboss.weld.osgi.examples:weld-osgi-paint-square</include>
<include>org.jboss.weld.osgi:weld-osgi-core-integration</include>
<include>org.jboss.weld.osgi:weld-osgi-core-api</include>
<include>org.jboss.weld.osgi:weld-osgi-core-spi</include>
<include>org.jboss.weld.osgi:weld-osgi-core-extension</include>
<include>org.jboss.weld.osgi:weld-osgi-core-mandatory</include>
<include>org.apache.felix:org.apache.felix.shell.tui</include>
<include>org.apache.felix:org.apache.felix.shell</include>
</includes>
</dependencySet>
</dependencySets>
<files>
<file>
<source>${project.build.directory}/pojosr.jar</source>
<outputDirectory>bin</outputDirectory>
</file>
</files>
</assembly>

0 comments on commit 50329b7

Please sign in to comment.