Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalW committed Nov 25, 2009
1 parent 88d86a4 commit a15dd9b
Show file tree
Hide file tree
Showing 14 changed files with 469 additions and 0 deletions.
159 changes: 159 additions & 0 deletions vp/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?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>com.easymorse</groupId>
<artifactId>vp</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>vp</name>
<url>http://www.easymorse.com</url>
<developers>
<developer>
<id>mars</id>
<name>Marshal Wu</name>
<email>[email protected]</email>
<timezone>+8</timezone>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>${jdbc.grougId}</groupId>
<artifactId>${jdbc.artifactId}</artifactId>
<version>${jdbc.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
<outputDirectory>${basedir}/target/${project.artifactId}-${project.version}/WEB-INF/</outputDirectory>
<resources>
<resource>
<directory>src/main/webapp/WEB-INF/</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>http://gceclub.sun.com.cn/Java_Docs/jdk6/html/zh_CN/api</link>
</links>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<locales>zh_CN</locales>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.6</version>
<!-- <configuration>-->
<!-- <scanIntervalSeconds>10</scanIntervalSeconds>-->
<!-- <jettyConfig>src/etc/jetty-jmx.xml</jettyConfig>-->
<!-- </configuration>-->
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>http://gceclub.sun.com.cn/Java_Docs/jdk6/html/zh_CN/api</link>
</links>
<aggregate>true</aggregate>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</reporting>
<properties>
<jdbc.grougId>mysql</jdbc.grougId>
<jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
<jdbc.version>5.0.5</jdbc.version>
<jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>
</properties>
<modules>
<module>vp-backend</module>
<module>vp-manager</module>
<module>vp-client</module>
</modules>
</project>
34 changes: 34 additions & 0 deletions vp/vp-backend/bin/VideoConvertor.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env groovy

import groovy.lang.Grab;
import org.apache.log4j.*

@Grab(group="log4j",module="log4j",version="1.2.12")
class Convertor{

private static Logger logger=Logger.getLogger(Convertor.class)

static{
PropertyConfigurator.configure("log4j.properties");
}

def convert(input,output){
def time=new Date().time
def file=new File(output)

if(file.exists()){
file.delete()
logger.debug("delete file ${output}.")
}

def process="ffmpeg -i ${input} ${output}".execute()
process.waitFor()

logger.debug("生成${output}成功,耗时${new Date().time-time}毫秒。")
}
}


def input='test.mov'
def output='output.mp4'
new Convertor().convert(input,output)
1 change: 1 addition & 0 deletions vp/vp-backend/bin/VideoDirectoryMonitor.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/usr/bin/env groovy
33 changes: 33 additions & 0 deletions vp/vp-backend/bin/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
#
# The five logging levels used by Log are (in order):
#
# 1. DEBUG (the least serious)
# 2. INFO
# 3. WARN
# 4. ERROR
# 5. FATAL (the most serious)


# Set root logger level to WARN and append to stdout
log4j.rootLogger=ERROR, stdout

log4j.appender.${log4j.file.appender}=org.apache.log4j.DailyRollingFileAppender
log4j.appender.${log4j.file.appender}.layout=org.apache.log4j.PatternLayout
log4j.appender.${log4j.file.appender}.layout.ConversionPattern=%d{yy-M-d HH:mm:ss} %5p (%c:%L) - %m%n
log4j.appender.${log4j.file.appender}.file=${log4j.file.path2}
log4j.appender.${log4j.file.appender}.DatePattern='.'yyyy-MM-dd

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d{yy-M-d HH:mm:ss} %5p (%c:%L) - %m%n

# Print only messages of level ERROR or above in the package noModule.
log4j.logger.noModule=FATAL

# My business
log4j.logger.com.easymorse=DEBUG
log4j.logger.Convertor=DEBUG
Binary file added vp/vp-backend/bin/test.mov
Binary file not shown.
20 changes: 20 additions & 0 deletions vp/vp-backend/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>vp</artifactId>
<groupId>com.easymorse</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<groupId>com.easymorse</groupId>
<artifactId>vp-backend</artifactId>
<version>1.0-SNAPSHOT</version>
<name>vp-backend</name>
<dependencies>
</dependencies>
<build>
<sourceDirectory>bin</sourceDirectory>
</build>
</project>
48 changes: 48 additions & 0 deletions vp/vp-client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>vp</artifactId>
<groupId>com.easymorse</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<packaging>war</packaging>
<groupId>com.easymorse</groupId>
<artifactId>vp-client</artifactId>
<version>1.0-SNAPSHOT</version>
<name>vp-client</name>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<server>tomcat.server</server>
<url>http://localhost:8080/manager</url>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.6</version>
<!-- <configuration>-->
<!-- <scanIntervalSeconds>10</scanIntervalSeconds>-->
<!-- <jettyConfig>src/etc/jetty-jmx.xml</jettyConfig>-->
<!-- </configuration>-->
</plugin>
</plugins>
</build>
</project>
13 changes: 13 additions & 0 deletions vp/vp-client/src/main/java/com/easymorse/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.easymorse;

/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
12 changes: 12 additions & 0 deletions vp/vp-client/src/main/webapp/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Manifest-Version: 1.0
Class-Path: activeio-core-3.1.2.jar activemq-core-5.3.0.jar activemq-p
rotobuf-1.0.jar ant-1.7.1.jar ant-launcher-1.7.1.jar antlr-2.7.7.jar
aopalliance-1.0.jar asm-2.2.3.jar asm-analysis-2.2.3.jar asm-tree-2.2
.3.jar asm-util-2.2.3.jar avalon-framework-4.1.3.jar commons-logging-
1.1.jar commons-logging-api-1.1.jar commons-net-2.0.jar geronimo-j2ee
-management_1.0_spec-1.0.jar geronimo-j2ee-management_1.1_spec-1.0.1.
jar geronimo-jms_1.1_spec-1.1.1.jar groovy-1.6.5.jar jline-0.9.94.jar
jstl-1.1.0.jar kahadb-5.3.0.jar log4j-1.2.12.jar logkit-1.0.1.jar my
sql-connector-java-5.0.5.jar spring-beans-2.5.6.jar spring-context-2.
5.6.jar spring-core-2.5.6.jar standard-1.1.0.jar

38 changes: 38 additions & 0 deletions vp/vp-client/src/test/java/com/easymorse/AppTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.easymorse;

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 );
}
}
Loading

0 comments on commit a15dd9b

Please sign in to comment.