Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven will autogenerate RiakMessageCodes #82

Merged
merged 3 commits into from
Feb 28, 2014
Merged

Maven will autogenerate RiakMessageCodes #82

merged 3 commits into from
Feb 28, 2014

Conversation

broach
Copy link
Contributor

@broach broach commented Feb 28, 2014

Uses a template and generates com.basho.riak.protobuf.RiakMessageCodes
which will now be packaged along with the protobufs

To verify, run: mvn clean install then inspect target/generated-sources/protobuf/com/basho/riak/protobuf/RiakMessageCodes.java as well as check the jar: jar tvf target/riak-pb-2.0.0.12-SNAPSHOT.jar |grep MessageCod

Brian Roach added 2 commits February 28, 2014 02:35
Uses a template and generates com.basho.riak.protobuf.RiakMessageCodes
which will now be packaged along with the protobufs

}

result.put("packageName", "com.basho.riak.protobuf");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's worth adding a "This file was generated etc" comment in the generated source?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't hurt.

@bookshelfdave
Copy link

+1, although, although I'm sure @mgodave should review too.

R16B02b4:[autogen-java]prime:~/basho/riak_pb/target$ javap -classpath ./riak-pb-2.0.0.12-SNAPSHOT.jar com.basho.riak.protobuf.RiakMessageCodes
Compiled from "RiakMessageCodes.java"
public final class com.basho.riak.protobuf.RiakMessageCodes {
  public static final byte MSG_ErrorResp;
  public static final byte MSG_PingReq;
  public static final byte MSG_PingResp;
  public static final byte MSG_GetClientIdReq;
  public static final byte MSG_GetClientIdResp;
  public static final byte MSG_SetClientIdReq;
  public static final byte MSG_SetClientIdResp;
  public static final byte MSG_GetServerInfoReq;
  public static final byte MSG_GetServerInfoResp;
  public static final byte MSG_GetReq;
  public static final byte MSG_GetResp;
  public static final byte MSG_PutReq;
  public static final byte MSG_PutResp;
  public static final byte MSG_DelReq;
  public static final byte MSG_DelResp;
  public static final byte MSG_ListBucketsReq;
  public static final byte MSG_ListBucketsResp;
  public static final byte MSG_ListKeysReq;
  public static final byte MSG_ListKeysResp;
  public static final byte MSG_GetBucketReq;
  public static final byte MSG_GetBucketResp;
  public static final byte MSG_SetBucketReq;
  public static final byte MSG_SetBucketResp;
  public static final byte MSG_MapRedReq;
  public static final byte MSG_MapRedResp;
  public static final byte MSG_IndexReq;
  public static final byte MSG_IndexResp;
  public static final byte MSG_SearchQueryReq;
  public static final byte MSG_SearchQueryResp;
  public static final byte MSG_ResetBucketReq;
  public static final byte MSG_ResetBucketResp;
  public static final byte MSG_GetBucketTypeReq;
  public static final byte MSG_SetBucketTypeReq;
  public static final byte MSG_CSBucketReq;
  public static final byte MSG_CSBucketResp;
  public static final byte MSG_CounterUpdateReq;
  public static final byte MSG_CounterUpdateResp;
  public static final byte MSG_CounterGetReq;
  public static final byte MSG_CounterGetResp;
  public static final byte MSG_YokozunaIndexGetReq;
  public static final byte MSG_YokozunaIndexGetResp;
  public static final byte MSG_YokozunaIndexPutReq;
  public static final byte MSG_YokozunaIndexDeleteReq;
  public static final byte MSG_YokozunaSchemaGetReq;
  public static final byte MSG_YokozunaSchemaGetResp;
  public static final byte MSG_YokozunaSchemaPutReq;
  public static final byte MSG_DtFetchReq;
  public static final byte MSG_DtFetchResp;
  public static final byte MSG_DtUpdateReq;
  public static final byte MSG_DtUpdateResp;
  public static final byte MSG_AuthReq;
  public static final byte MSG_AuthResp;
  public static final byte MSG_StartTls;
  public com.basho.riak.protobuf.RiakMessageCodes();
}

@seancribbs
Copy link

Yay! 💃

@mgodave
Copy link
Contributor

mgodave commented Feb 28, 2014

I can't get this to build. Looking into it further...

[ERROR] Failed to execute goal com.webguys:string-template-maven-plugin:1.1:render (default) on project riak-pb: Execution default of goal com.webguys:string-template-maven-plugin:1.1:render failed: An API incompatibility was encountered while executing com.webguys:string-template-maven-plugin:1.1:render: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

@mgodave
Copy link
Contributor

mgodave commented Feb 28, 2014

It's a maven incompatibility issue

@mgodave
Copy link
Contributor

mgodave commented Feb 28, 2014

There is a conflict between the the plugin and maven 3.1

@bookshelfdave
Copy link

verified that I get the same error w/ Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00)

@broach
Copy link
Contributor Author

broach commented Feb 28, 2014

So, we're good with "We need to use maven 3.0.x right now, but we'll submit a patch to the plug-in repo" ?

@mgodave
Copy link
Contributor

mgodave commented Feb 28, 2014

Yeah, logged #83 to track it.

@mgodave
Copy link
Contributor

mgodave commented Feb 28, 2014

👍

broach pushed a commit that referenced this pull request Feb 28, 2014
Maven will autogenerate RiakMessageCodes
@broach broach merged commit 1f93ad6 into develop Feb 28, 2014
@seancribbs seancribbs deleted the autogen-java branch July 24, 2014 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants