- restructure bbb-fsesl-client

This commit is contained in:
Richard Alam 2015-06-10 20:13:40 +00:00
parent d184968bfa
commit e7df7b3ef5
56 changed files with 145 additions and 4995 deletions

55
bbb-fsesl-client/.gitignore vendored Normal file → Executable file
View File

@ -1,5 +1,56 @@
.DS_Store
._.DS_Store*
.metadata
.project
.classpath
lib
org.freeswitch.esl.client/target
.settings
.history
.worksheet
gen
**/*.swp
**/*~.nib
**/build/
**/*.pbxuser
**/*.perspective
**/*.perspectivev3
*.xcworkspace
*.xcuserdatad
**/target
target
*.iml
project/*.ipr
project/*.iml
project/*.iws
project/out
project/*/target
project/target
project/*/bin
project/*/build
project/*.iml
project/*/*.iml
project/.idea
project/.idea/*
.idea
.idea/*
.idea/**/*
.DS_Store
project/.DS_Store
project/*/.DS_Store
tm.out
tmlog*.log
*.tm*.epoch
out/
provisioning/.vagrant
provisioning/*/.vagrant
provisioning/*/*.known
/sbt/akka-patterns-store/
/daemon/src/build/
*.lock
log/
tmp/
build/
akka-patterns-store/
lib_managed/
.cache
bin/

85
bbb-fsesl-client/build.sbt Executable file
View File

@ -0,0 +1,85 @@
name := "bbb-fsesl-client"
organization := "org.bigbluebutton"
version := "0.0.1-SNAPSHOT"
// We want to have our jar files in lib_managed dir.
// This way we'll have the right path when we import
// into eclipse.
retrieveManaged := true
testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", "junitxml")
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports")
libraryDependencies ++= {
Seq(
"org.jboss.netty" % "netty" % "3.2.1.Final",
"junit" % "junit" % "4.11",
"ch.qos.logback" % "logback-classic" % "1.0.3"
)}
seq(Revolver.settings: _*)
//-----------
// Packaging
//
// Reference:
// http://xerial.org/blog/2014/03/24/sbt/
// http://www.scala-sbt.org/sbt-pgp/usage.html
// http://www.scala-sbt.org/0.13/docs/Using-Sonatype.html
// http://central.sonatype.org/pages/requirements.html
// http://central.sonatype.org/pages/releasing-the-deployment.html
//-----------
// Build pure Java lib (i.e. without scala)
// Do not append Scala versions to the generated artifacts
crossPaths := false
// This forbids including Scala related libraries into the dependency
autoScalaLibrary := false
//publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository")))
publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/dev/repo/maven-repo/releases" )) )
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
// Enables publishing to maven repo
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { _ => false }
pomExtra := (
<description>
BigBlueButton custom FS-ESL client built on top of FS-ESL Java library.
</description>
<scm>
<url>git@github.com:bigbluebutton/bigbluebutton.git</url>
<connection>scm:git:git@github.com:bigbluebutton/bigbluebutton.git</connection>
</scm>
<developers>
<developer>
<id>ritzalam</id>
<name>Richard Alam</name>
<url>http://www.bigbluebutton.org</url>
</developer>
</developers>)
licenses := Seq("Apache License, Version 2.0" -> url("http://opensource.org/licenses/Apache-2.0"))
homepage := Some(url("http://www.bigbluebutton.org"))

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.freeswitch.esl.client.example</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -1,6 +0,0 @@
#Sun Jan 03 23:33:58 EST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -1,9 +0,0 @@
#Sat Jan 02 16:18:40 EST 2010
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright 2010 david varnes.
*
* 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.
-->
<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.freeswitch.esl.client</groupId>
<artifactId>java-esl-client</artifactId>
<version>0.9.0</version>
</parent>
<artifactId>org.freeswitch.esl.client.example</artifactId>
<name>FreeSWITCH Event Socket Library - Java Client example usage</name>
<dependencies>
<dependency>
<groupId>org.freeswitch.esl.client</groupId>
<artifactId>org.freeswitch.esl.client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +0,0 @@
#Generated by Maven
#Tue Jun 15 23:36:06 EDT 2010
version=0.9.0-SNAPSHOT
groupId=org.freeswitch.esl.client
artifactId=org.freeswitch.esl.client.example

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.freeswitch.esl.client.netty</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -1,13 +0,0 @@
#Sun Jan 03 23:33:57 EST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -1,9 +0,0 @@
#Sat Dec 12 17:44:54 EST 2009
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1

View File

@ -1,35 +0,0 @@
As at 2010.01.03
Features still to be implemented
* [Fixed]: Fix the event parser to properly use Content-Length header, reports of misshandling missing \n
* Problem using latest netty release in an OSGi container
* Chase down the apparent issue with Netty when using executor in pipeline (wierd).
* Improve exception handling - implement exceptionCaught()
* More testing of the outbound socket client template code
* Implement Send event command
* Testing of SendMsg command
* Refactor the api of the inbound client into the abstract handler so it is also available in outbound handlers as well
* Per event(s) listener
* Provide XML event handling - not sure if this is useful since the raw event is not exposed, although it could be if needed.
* Implement 'myevent' event subscription for inbound - not a priority here, easy if required.
* Provide timeout protection on the client.sendSyncApiCommand(). It will currently block for ever if get no response from server.
* Working examples in an example project (started).
* Add OSGi example
Distribution
* [Fixed - using Sonatype] Find out how (if ok) to put binary distribution on files.freeswitch.org
* [Done] Cut a release, look at usage of tags in FS git repo.
* [Started] FreeSWITCH wiki pages
* Basic usage docs
* Package jar, javadocs, source and dependencies (slf4j, netty) for people to trial without having to build.
* Host the javadoc API somewhere in the org.freeswitch domain .. files ?
Quality items
* [No] Is there a git equivalent to svn $Id$ tag ?
* Ask FS dev team for any ESL event generation test strategies/suites.
* Are all message header names in the enum ?
* Improve Javadoc coverage
* Add cross references to the FS wiki in the Javadocs .. eg list of api commands and events.
* Add unit test coverage
* Investigate availability of FS JIRA for issue tracking

View File

@ -1,85 +0,0 @@
apply plugin: 'java'
apply plugin: 'eclipse'
version = '0.9.0'
jar.enabled = true
def appName = 'fs-esl-client'
archivesBaseName = appName
artifacts {
archives jar
}
sourceSets {
main {
java {
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
task resolveDeps(type: Copy) {
into('lib')
from configurations.default
from configurations.default.allArtifacts.file
}
repositories {
add(new org.apache.ivy.plugins.resolver.ChainResolver()) {
name = 'remote'
returnFirst = true
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "googlecode"
addArtifactPattern "http://red5.googlecode.com/svn/repository/[artifact](-[revision]).[ext]"
addArtifactPattern "http://red5.googlecode.com/svn/repository/[organisation]/[artifact](-[revision]).[ext]"
}
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "blindside-repos"
addArtifactPattern "http://blindside.googlecode.com/svn/repository/[artifact](-[revision]).[ext]"
addArtifactPattern "http://blindside.googlecode.com/svn/repository/[organisation]/[artifact](-[revision]).[ext]"
}
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "maven2-central"
m2compatible = true
addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]"
addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]"
}
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = "netty-dependency"
m2compatible = true
addArtifactPattern "http://repository.jboss.org/nexus/content/groups/public-jboss/[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]"
addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]"
}
}
flatDir name: 'fileRepo', dirs: "/home/firstuser/dev/repo"
}
dependencies {
// Logging
compile 'ch.qos.logback:logback-core:1.0.9@jar'
compile 'ch.qos.logback:logback-classic:1.0.9@jar'
compile 'org.slf4j:log4j-over-slf4j:1.7.2@jar'
compile 'org.slf4j:jcl-over-slf4j:1.7.2@jar'
compile 'org.slf4j:jul-to-slf4j:1.7.2@jar'
compile 'org.slf4j:slf4j-api:1.7.2@jar'
testRuntime 'junit:junit:4.8.1.@jar'
compile 'org.jboss.netty:netty:3.2.9.Final@jar'
}
uploadArchives {
uploadDescriptor = false
repositories {
add project.repositories.fileRepo
}
}

View File

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright 2010 david varnes.
*
* 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.
-->
<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.freeswitch.esl.client</groupId>
<artifactId>java-esl-client</artifactId>
<version>0.9.0</version>
</parent>
<artifactId>org.freeswitch.esl.client</artifactId>
<name>FreeSWITCH Event Socket Library - Java Client</name>
<packaging>bundle</packaging>
<build>
<plugins>
<!-- this plugin will create the target jar as a correct OSGi bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<configuration>
<unpackBundle>true</unpackBundle>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-DocURL>http://www.freeswitch.org</Bundle-DocURL>
<Export-Package>
!org.freeswitch.esl.client.internal,
!org.freeswitch.esl.client.internal.debug,
org.freeswitch.esl.client.*
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/ClientTest.java</exclude>
<exclude>**/SocketClientTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- tcp socket and codec library see http://jboss.org/netty -->
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.2.1.Final</version>
</dependency>
<!-- logging library see http://slf4j.org -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.24</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>jboss-public-repository</id>
<!-- for netty dependency -->
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</project>

View File

View File

@ -0,0 +1 @@
sbt.version=0.13.8

View File

@ -0,0 +1,6 @@
addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")