blob: e8ca7ffdfaf599a77f888b4b324e7c142fdb2a9e [file] [log] [blame]
# Licensed 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.
# set the version in the POM file to match the CMake version string
execute_process(COMMAND mvn versions:set -DnewVersion=${ORC_VERSION}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
set(ORC_JARS
${CMAKE_CURRENT_BINARY_DIR}/storage-api/hive-storage-api-2.1.1-pre-orc.jar
${CMAKE_CURRENT_BINARY_DIR}/core/orc-core-${ORC_VERSION}.jar
${CMAKE_CURRENT_BINARY_DIR}/mapreduce/orc-mapreduce-${ORC_VERSION}.jar
)
add_custom_command(
OUTPUT ${ORC_JARS}
COMMAND mvn -Pcmake -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} -DskipTests package
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Build the java directory"
VERBATIM)
add_custom_target(java_build ALL DEPENDS ${ORC_JARS})
add_test(
NAME java-test
COMMAND mvn -Pcmake -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} test
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
install(
FILES ${ORC_JARS}
DESTINATION share)