thrift maven编译运行

2015年5月22日 | 由 helight | 300字 | 阅读大约需要1分钟 | 归档于 linux 应用 | 标签 #thrift #java #scons


<build >
    <sourceDirectory> src/main/java </sourceDirectory>
            <!-- Bind the maven-assembly-plugin to the package phase this will create
                a jar file without the storm dependencies suitable for deployment to a cluster. -->
                <artifactId> maven-assembly- plugin</artifactId>
                                <descriptorRef> jar-with-dependencies </descriptorRef >
                                        <mainClass></mainClass >
                                <id> make-assembly </id >
                                <phase> package</phase >
                                        <goal> single</goal >
                <groupId> org.apache.maven.plugins </groupId >
                <artifactId> maven-compiler- plugin</artifactId>
                        <source> 1.7</source >
                        <target> 1.7</target >

                <groupId> org.apache.maven.plugins </groupId >
                <artifactId> maven- surefire-plugin </artifactId >
                        <skip> true</skip ><!-- 跳过测试用例 -->



<dependencies >
<dependency >
    <groupId > junit</groupId>
    <artifactId > junit</artifactId>
    <version >3.8.1 </version>
    <scope >test </scope>
</dependency >

        <groupId> org.apache.thrift </groupId >
        <artifactId> libthrift </artifactId >
        <version> 0.9.2</version >
            <groupId> org.slf4j </groupId >
            <artifactId> slf4j-log4j12 </artifactId >
            <version> 1.5.8</version >
</dependencies >


E:\idata_spark_work\test\target>java -cp .\test-0.0.1-SNAPSHOT-jar-with-dependencies.jar org.zhwen.test.HelloServerDemo
E:\idata_spark_work\test\target>java -cp .\test-0.0.1-SNAPSHOT-jar-with-dependencies.jar org.zhwen.test.HelloClientDemo