Skip to content

Commit

Permalink
Initial checkin for maven building
Browse files Browse the repository at this point in the history
Added options to .proto files for java package and class names
Created pom that currently builds source and binary jar files
pom also creates CPP source and header files
  • Loading branch information
Brian Roach committed Jun 27, 2012
1 parent 90fc9cc commit 2ee9442
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
99 changes: 99 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.basho.riak.protobuf</groupId>
<artifactId>riak_pb</artifactId>
<version>1.2-SNAPSHOT</version>
<packaging>jar</packaging>

<name>riak_pbj</name>

This comment has been minimized.

Copy link
@seancribbs

seancribbs Jun 27, 2012

Peanut butter jelly time!

This comment has been minimized.

Copy link
@broach

broach Jun 27, 2012

Contributor

:-D That's just a placeholder. The pom will be all nice and stuff when it's done.

<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.1.12-SNAPSHOT</version>
<configuration>
<protocExecutable>protoc</protocExecutable>
<protoSourceRoot>${project.basedir}/src</protoSourceRoot>
<languageSpecifications>
<LanguageSpecification>
<language>JAVA</language>
<outputDirectory>${project.basedir}/target/generated-sources/java</outputDirectory>
</LanguageSpecification>
<LanguageSpecification>
<language>CPP</language>
<outputDirectory>${project.basedir}/target/generated-sources/cpp</outputDirectory>
</LanguageSpecification>
</languageSpecifications>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<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>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>net.avh4.util</groupId>
<artifactId>imagecomparison</artifactId>
<version>0.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.4.1</version>
</dependency>
</dependencies>
</project>
5 changes: 5 additions & 0 deletions src/riak.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
** Revision: 1.2
*/

// Java package specifiers
option java_package = "com.basho.riak.protobuf";
option java_outer_classname = "RiakPB";


// Error response - may be generated for any Req
message RpbErrorResp {
required bytes errmsg = 1;
Expand Down
4 changes: 4 additions & 0 deletions src/riak_kv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
** Revision: 1.2
*/

// Java package specifiers
option java_package = "com.basho.riak.protobuf";
option java_outer_classname = "RiakKvPB";

import "riak.proto"; // for RpbPair

// Get ClientId Request - no message defined, just send RpbGetClientIdReq message code
Expand Down
4 changes: 4 additions & 0 deletions src/riak_search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

import "riak.proto";

// java package specifiers
option java_package = "com.basho.riak.protobuf";
option java_outer_classname = "RiakSearchPB";

message RpbSearchDoc {
repeated RpbPair fields = 1;
}
Expand Down

0 comments on commit 2ee9442

Please sign in to comment.