***************************
*** ONGOING MAINTENANCE ***
***************************
PLEASE NOTE: THIS CODE HAS BEEN CONTRIBUTED BACK TO ASF.
https://issues.apache.org/jira/browse/THRIFT-1536
Any future work I do on this plugin, will be as patches submitted to their version.
I am not planning to perform any further maintenance on this fork (or accept any patches / pull requests).
***********************
*** VERSION WARNING ***
***********************
Drop to the command line and type:
thrift -version
To find out what version of the compiler you are using.
Older Compiler Versions (Less than 0.7.0)
===
You must use version 0.1.10 of this plugin.
+ Check out the source.
+ Switch to the old branch: git checkout -b old maven-thrift-plugin-0.1.10
And build/use that version.
Newer Compiler Versions (0.7.0 or newer)
===
0.7.0 should work fine with the latest version of this plugin.
However I have seen incompatibilities between the compiler and libthrift.
To resolve these check out the source for the compiler from the 0.7.0 branch (Do not trust the TAR BALLS)
svn co http://svn.apache.org/repos/asf/thrift/tags/thrift-0.7.0
That version should work fine with the maven version of lib thrift:
org.apache.thriftlibthrift0.7.0
Note: If you have problems building on OSX you might want to look at this article:
http://lueb.be/2009/02/23/installing-apache-thrift-on-mac-os-x-105-leopard/
The fastest way to build the compiler is:
$ svn co http://svn.apache.org/repos/asf/thrift/tags/thrift-0.7.0
$ cd thrift-0.7.0
$ cp /usr/X11/share/aclocal/pkg.m4 aclocal/
$ ./bootstrap.sh
$ ./configure
$ cd compiler/cpp/
$ make
***************************
*** Maven Thrift Plugin ***
***************************
A minimal configuration to invoke this plugin would be:
4.0.0com.mycompany.exampleexample-thriftjar1.0-SNAPSHOTthrift-exampleorg.apache.maven.pluginsmaven-compiler-plugin1.51.5org.apache.thrift.toolsmaven-thrift-plugin0.1.10/usr/local/bin/thriftthrift-sourcesgenerate-sourcescompilethrift-test-sourcesgenerate-test-sourcestestCompileorg.apache.hadooplibthrift0.5.0.0org.slf4jslf4j-api1.5.8log4jlog4j1.2.14
You must:
+ Use Java 1.5 or newer due to the usage of Generics
+ Either ensure the "thrift" executable is in your PATH or set the
parameter to the correct location.
+ Define the executions you want (you probably don't need the testCompile
unless you have custom thrift objects in your tests.
+ Include the dependencies on libthrift and slf4j or your compile will fail.
Once this is all done add your *.thrift files to the directory: src/main/thrift
Everything should then build with a: mvn clean install
You may also need to add the following to your settings.xml to download the
plugin:
dtrotthttp://maven.davidtrott.com/repository
在客户端访问subversion版本库时出现这个错误:
svnserve.conf:12: Option expected
为什么会出现这个错误呢,就是因为subversion读取配置文件svnserve.conf时,无法识别有前置空格的配置文件,如### This file controls the configuration of the svnserve daemon, if you##
什么是Akka
Message-Driven Runtime is the Foundation to Reactive Applications
In Akka, your business logic is driven through message-based communication patterns that are independent of physical locatio
zabbix_api网上比较多的写法是python或curl。上次我用java--http://bossr.iteye.com/blog/2195679,这次用perl。for example: #!/usr/bin/perl
use 5.010 ;
use strict ;
use warnings ;
use JSON :: RPC :: Client ;
use
package com.test;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class TestMap {
public static v
MySQL server has gone away 问题解决方法,需要的朋友可以参考下。
应用程序(比如PHP)长时间的执行批量的MYSQL语句。执行一个SQL,但SQL语句过大或者语句中含有BLOB或者longblob字段。比如,图片数据的处理。都容易引起MySQL server has gone away。 今天遇到类似的情景,MySQL只是冷冷的说:MySQL server h
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml&