From: <to...@us...> - 2007-02-15 21:20:14
|
Revision: 66 http://techne-dev.svn.sourceforge.net/techne-dev/?rev=66&view=rev Author: tonit Date: 2007-02-15 13:20:14 -0800 (Thu, 15 Feb 2007) Log Message: ----------- transfered project to maven2/maven-bundle-plugin project Added Paths: ----------- sandbox/tonit/techne.samples.audio.tui/.classpath sandbox/tonit/techne.samples.audio.tui/.project sandbox/tonit/techne.samples.audio.tui/pom.xml sandbox/tonit/techne.samples.audio.tui/src/ sandbox/tonit/techne.samples.audio.tui/src/main/ sandbox/tonit/techne.samples.audio.tui/src/main/java/ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/Activator.java sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/PlayerControlCommand.java sandbox/tonit/techne.samples.audio.tui/src/test/ sandbox/tonit/techne.samples.audio.tui/src/test/java/ sandbox/tonit/techne.samples.audio.tui/src/test/java/techne/ sandbox/tonit/techne.samples.audio.tui/src/test/java/techne/AppTest.java Added: sandbox/tonit/techne.samples.audio.tui/.classpath =================================================================== --- sandbox/tonit/techne.samples.audio.tui/.classpath (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/.classpath 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,14 @@ +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.foundation/0.9.0-incubator-SNAPSHOT/org.osgi.foundation-0.9.0-incubator-SNAPSHOT.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.compendium/0.9.0-incubator-SNAPSHOT/org.osgi.compendium-0.9.0-incubator-SNAPSHOT.jar"/> + <classpathentry kind="var" path="M2_REPO/techne/techne.samples.audio.player/1.0/techne.samples.audio.player-1.0.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/felix/javax.servlet/0.9.0-incubator-SNAPSHOT/javax.servlet-0.9.0-incubator-SNAPSHOT.jar"/> + <classpathentry kind="var" path="M2_REPO/org/javazoom/org.javazoom.jl/1.0-SNAPSHOT/org.javazoom.jl-1.0-SNAPSHOT.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.shell/0.9.0-incubator-SNAPSHOT/org.apache.felix.shell-0.9.0-incubator-SNAPSHOT.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/0.9.0-incubator-SNAPSHOT/org.osgi.core-0.9.0-incubator-SNAPSHOT.jar"/> +</classpath> \ No newline at end of file Added: sandbox/tonit/techne.samples.audio.tui/.project =================================================================== --- sandbox/tonit/techne.samples.audio.tui/.project (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/.project 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,13 @@ +<projectDescription> + <name>techne.samples.audio.tui</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Added: sandbox/tonit/techne.samples.audio.tui/pom.xml =================================================================== --- sandbox/tonit/techne.samples.audio.tui/pom.xml (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/pom.xml 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,55 @@ +<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">tui + <modelVersion>4.0.0</modelVersion> + <groupId>techne</groupId> + <artifactId>techne.samples.audio.tui</artifactId> + <packaging>bundle</packaging> + <version>1.0</version> + <name>techne.samples.audio.tui</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>techne</groupId> + <artifactId>techne.samples.audio.player</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.apache.felix</groupId> + <artifactId>org.osgi.core</artifactId> + <version>0.9.0-incubator-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.felix</groupId> + <artifactId>org.osgi.compendium</artifactId> + <version>0.9.0-incubator-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.felix</groupId> + <artifactId>org.apache.felix.shell</artifactId> + <version>0.9.0-incubator-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-SymbolicName>techne.samples.audio.tui</Bundle-SymbolicName> + <Private-Package>techne.audio.tui.internal</Private-Package> + <Bundle-Activator>techne.audio.tui.internal.Activator</Bundle-Activator> + <Service-Component>techne.audio.tui.internal.PlayerControlCommand;control=techne.audio.player.PlayerControl;provide:=org.apache.felix.shell.Command</Service-Component> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/Activator.java =================================================================== --- sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/Activator.java (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/Activator.java 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,15 @@ +package techne.audio.tui.internal; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + public void start(BundleContext ctx) throws Exception { + System.out.println("Shell Support ON"); + } + + public void stop(BundleContext arg0) throws Exception { + System.out.println("Shell Support OFF"); + } +} Added: sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/PlayerControlCommand.java =================================================================== --- sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/PlayerControlCommand.java (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/src/main/java/techne/audio/tui/internal/PlayerControlCommand.java 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,57 @@ +package techne.audio.tui.internal; + +import java.io.PrintStream; +import java.util.StringTokenizer; + +import org.apache.felix.shell.Command; + +import techne.audio.player.PlayerControl; + +public class PlayerControlCommand implements Command { + private PlayerControl control; + + public void execute(String s, PrintStream out, PrintStream err) { + if (control != null) { + StringTokenizer st = new StringTokenizer(s, " "); + + st.nextToken(); // Ignore the command name. + if (st.hasMoreTokens()) { + String cmd = st.nextToken(); + if ("play".equals(cmd)) { + control.play(); + }else if ("stop".equals(cmd)) { + control.stop(); + }else if ("pause".equals(cmd)) { + control.pause(); + }else if ("state".equals(cmd)) { + out.println("Current state: " + control.getState()); + }else + { + out.println("Command " + cmd + " unknown"); + out.println(getUsage()); + } + }else { + out.println(getUsage()); + } + }else { + err.println("no PlayerControl instance assigned!"); + } + } + + public String getName() { + return "audio"; + } + + public String getShortDescription() { + return "Controls PlayerControl Service with felix shell"; + } + + public String getUsage() { + return "audio <play> or <stop> or <pause> or <state>"; + } + + public void setControl(PlayerControl control) { + this.control = control; + } + +} Added: sandbox/tonit/techne.samples.audio.tui/src/test/java/techne/AppTest.java =================================================================== --- sandbox/tonit/techne.samples.audio.tui/src/test/java/techne/AppTest.java (rev 0) +++ sandbox/tonit/techne.samples.audio.tui/src/test/java/techne/AppTest.java 2007-02-15 21:20:14 UTC (rev 66) @@ -0,0 +1,38 @@ +package techne; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |