mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
7004a61e44
Client: java THRIFT-4294: Java Configure Fails for Ant >= 1.10 THRIFT-4259: Thrift does not compile due to Ant Maven task errors THRIFT-4178: Java libraries missing from package when using cmake THRIFT-3983: libthrift is deployed on central with pom packaging instead of jar THRIFT-1507: Maven can't download resource from central when behind a proxy and won't use local repository THRIFT-1418: Compiling Thrift from source: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "typefound" element Refactor CMake install hook to allow using "sudo make install/fast" which avoids the THRIFT-1507 and THRIFT-1418 issues. New Gradle based build system for Thrift Java Library * Add Gradle 4.4.1 Wrapper artifacts to enable builds Using the Gradle Wrapper helps normalize the builds on all platforms so we use a consistent build tool independent of package managers. The Gradle build logic was partitioned into multiple specific scripts to simplify understanding and maintenance of the build. This is now hooked into CMake and Autoconf processing steps and can build/test/publish to Maven. The README.md was updated to illustrate the new build options and add some documentation on the requirements for Maven publication. Cleaned up the CMake files to reduce reliance on file globbing which is known to cause confusion when multiple users contribute. * Fix two minor issues in Javadoc and unit test Return values were undeclared in Javadoc Test was asserting on the wrong test object instance * Create simple runner scripts for cross-check Using Gradle as a java execution wrapper is too heavy. I simplified the test client/server execution by using a three generated scripts in the build directory direcly callable by the cross-check test harness. * Cleanup the remaining Ant build scripts Pulled the Maven Ant task properties out of the Java build since they are no longer used there. Deleted the no longer used build.xml and build.properties files from the Java build. Made each Ant build own the Maven Ant task details in their build.properties file. * Fix the build issue with Java SSL in the ubuntu-trusty container The latest Trusty JDK7 builds seem to have encountered this issue because the OpenJDK removed the SunEC algorithms. * Update the developer info as requested in review Use the generic Apache Thrift developer list for contact information * Add Clover Code coverage for easy access by developers Clover plugin for Gradle was applied and configured which enables code coverage reports to be available on demand via a command line option. The documentation in the README.md was enhanced to give the details of this change and how to take advantage of it.
93 lines
3.3 KiB
XML
93 lines
3.3 KiB
XML
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you 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.
|
|
-->
|
|
<project name="tutorial" default="test" basedir=".">
|
|
|
|
<description>Thrift JavaScript Tutorial</description>
|
|
|
|
<property name="src" location="src" />
|
|
<property name="javasrc" location="../java/src" />
|
|
<property name="gen" location="../java/gen-java" />
|
|
<property name="build" location="build" />
|
|
|
|
<!-- the root directory, where you unpack thrift distibution (e.g. thrift-0.x.x.tar.gz) -->
|
|
<property name="thrift.dir" location="../../" />
|
|
<!-- JavaScript tutorial depends on the java tutorial thrift handler and server infrastructure -->
|
|
<property name="thrift.java.dir" location="${thrift.dir}/lib/java" />
|
|
|
|
<path id="libs.classpath">
|
|
<fileset dir="${thrift.java.dir}/build/libs">
|
|
<include name="libthrift*.jar" />
|
|
<exclude name="libthrift*test.jar" />
|
|
<exclude name="libthrift*javadoc.jar" />
|
|
<exclude name="libthrift*sources.jar" />
|
|
</fileset>
|
|
<fileset dir="${thrift.java.dir}/build/deps">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
<path id="build.classpath">
|
|
<path refid="libs.classpath" />
|
|
<pathelement path="${gen}" />
|
|
<pathelement path="${build}" />
|
|
</path>
|
|
|
|
<target name="init">
|
|
<tstamp />
|
|
<mkdir dir="${build}"/>
|
|
</target>
|
|
|
|
<target name="compile" depends="init">
|
|
<javac compiler="modern" includeantruntime="false" srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
|
|
<javac compiler="modern" includeantruntime="false" srcdir="${javasrc}" destdir="${build}" classpathref="build.classpath">
|
|
<exclude name="JavaClient.java"/>
|
|
<exclude name="JavaServer.java"/>
|
|
<include name="CalculatorHandler.java"/>
|
|
</javac>
|
|
<javac compiler="modern" includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="build.classpath">
|
|
<compilerarg value="-Xlint:all"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="test" depends="tutorial" />
|
|
|
|
<target name="tutorial" depends="compile">
|
|
<jar jarfile="tutorial-js.jar" basedir="${build}"/>
|
|
</target>
|
|
|
|
<target name="tutorialserver" description="run the test server" depends="tutorial, generate">
|
|
<java classname="Httpd" fork="true"
|
|
classpathref="build.classpath" failonerror="true">
|
|
<arg value="../../" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="generate">
|
|
<exec executable="../../compiler/cpp/thrift" failonerror="true">
|
|
<arg line="--gen js -r ../tutorial.thrift"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="clean">
|
|
<delete dir="${build}" />
|
|
<delete dir="gen-js"/>
|
|
<delete file="tutorial-js.jar" />
|
|
</target>
|
|
|
|
</project>
|