forked from gwestersf/QualityFoundry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed dropwizard and went with jersey, grizzly. got riak bucket set up
- Loading branch information
Greg Wester
committed
Jul 15, 2012
1 parent
9b0e0aa
commit ed3d9f5
Showing
12 changed files
with
1,589 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,231 +1,74 @@ | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.salesforce</groupId> | ||
<artifactId>QualityFoundry</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<description>A test runner for the Salesforce platform. | ||
</description> | ||
<url>http://salesforce.com</url> | ||
<scm> | ||
<connection>scm:git:[email protected]:forcedotcom/QualityFoundry.git</connection> | ||
<developerConnection>scm:git:[email protected]:forcedotcom/QualityFoundry.git</developerConnection> | ||
<url>http://github.com/forcedotcom/TempStore</url> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>gwester</id> | ||
<name>Greg Wester</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
<developer> | ||
<id>bbirman</id> | ||
<name>Brianna Birman</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
|
||
<prerequisites> | ||
<maven>2.2.1</maven> | ||
</prerequisites> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<!-- Licensing --> | ||
<licenses> | ||
<license> | ||
<name>BSD, Version 3.0</name> | ||
<url>http://www.opensource.org/licenses/BSD-3-Clause</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<organization> | ||
<name>salesforce.com</name> | ||
<url>http://salesforce.com</url> | ||
</organization> | ||
|
||
<dependencies> | ||
<!-- Core service dependencies: DropWizard and its Friends --> | ||
|
||
<dependency> | ||
<groupId>com.yammer.dropwizard</groupId> | ||
<artifactId>dropwizard-core</artifactId> | ||
<version>0.4.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.yammer.dropwizard</groupId> | ||
<artifactId>dropwizard-views</artifactId> | ||
<version>0.4.0</version> | ||
</dependency> | ||
|
||
<!-- Storage with Riak --> | ||
<dependency> | ||
<groupId>com.basho.riak</groupId> | ||
<artifactId>riak-client</artifactId> | ||
<version>1.0.5</version> | ||
</dependency> | ||
<!-- LZF for compressing files --> | ||
<dependency> | ||
<groupId>com.ning</groupId> | ||
<artifactId>compress-lzf</artifactId> | ||
<version>0.9.4</version> | ||
</dependency> | ||
<!-- Joda for Date calculations --> | ||
<dependency> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time</artifactId> | ||
<version>2.1</version> | ||
</dependency> | ||
<!-- And Jackson 2.0 for 'custom' JSON, Smile needs --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>2.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.0.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-smile</artifactId> | ||
<version>2.0.2</version> | ||
</dependency> | ||
<!-- Async-http-client for HTTP access --> | ||
<dependency> | ||
<groupId>com.ning</groupId> | ||
<artifactId>async-http-client</artifactId> | ||
<version>1.7.5</version> | ||
</dependency> | ||
<!-- and actually also Apache HttpCore/Client, since it is much easier | ||
to use for actual blocking I/O | ||
--> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>4.2</version> | ||
</dependency> | ||
<!-- We'll use junit to run our tests --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.8.2</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!-- DropWizard suggest doing "fat JARs", so let's: --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>1.4</version> | ||
<configuration> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
<filters> | ||
<filter> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*.SF</exclude> | ||
<exclude>META-INF/*.DSA</exclude> | ||
<exclude>META-INF/*.RSA</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>com.qualityfoundry.WebApp</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- other settings are pretty vanilla... --> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.1</version> | ||
<configuration> | ||
<mavenExecutorId>forked-path</mavenExecutorId> | ||
</configuration> | ||
</plugin> | ||
<plugin><!-- plug-in to attach source bundle in repo --> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.1.2</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.6.1</version> | ||
<configuration> | ||
<source>1.5</source> | ||
<target>1.5</target> | ||
<encoding>UTF-8</encoding> | ||
<maxmemory>512m</maxmemory> | ||
<links> | ||
<link>http://docs.oracle.com/javase/6/docs/api/</link> | ||
</links> | ||
</configuration> | ||
<executions> | ||
<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.force.taas</groupId> | ||
<artifactId>qf</artifactId> | ||
<packaging>jar</packaging> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>qf</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun.jersey</groupId> | ||
<artifactId>jersey-grizzly2</artifactId> | ||
<version>${jersey-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.jersey</groupId> | ||
<artifactId>jersey-json</artifactId> | ||
<version>${jersey-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.jersey.contribs</groupId> | ||
<artifactId>jersey-multipart</artifactId> | ||
<version>${jersey-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.10</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.jersey</groupId> | ||
<artifactId>jersey-client</artifactId> | ||
<version>${jersey-version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.basho.riak</groupId> | ||
<artifactId>riak-client</artifactId> | ||
<version>1.0.5</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<inherited>true</inherited> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
<goal>java</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<!-- Ugh. Oracle can't push to central repo? --> | ||
<repositories> | ||
<repository> | ||
<id>oracleReleases</id> | ||
<name>Oracle Released Java Packages</name> | ||
<url>http://download.oracle.com/maven</url> | ||
<layout>default</layout> | ||
</repository> | ||
<repository> | ||
<id>project.local</id> | ||
<name>local</name> | ||
<layout>legacy</layout> | ||
<url>file:${project.basedir}/lib</url> | ||
</repository> | ||
</repositories> | ||
</project> | ||
</executions> | ||
<configuration> | ||
<mainClass>com.force.taas.qf.WebServer</mainClass> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<properties> | ||
<jersey-version>1.13</jersey-version> | ||
</properties> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) 2012 Gregory D. Wester | ||
// | ||
// 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. | ||
package com.force.taas.qf; | ||
|
||
import com.basho.riak.client.RiakException; | ||
import com.basho.riak.client.RiakFactory; | ||
import com.basho.riak.client.bucket.Bucket; | ||
import com.basho.riak.client.bucket.FetchBucket; | ||
|
||
/** | ||
* | ||
* @author gwester | ||
* | ||
*/ | ||
public class PersistenceService { | ||
|
||
protected static final String BUCKET_NAME = "prodtest"; | ||
|
||
public static Bucket getBucket() throws RiakException { | ||
return RiakFactory.httpClient().fetchBucket(BUCKET_NAME).execute(); | ||
} | ||
} |
Oops, something went wrong.