The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15962 
====================================================================== 
Reported By:                nitroamos
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15962
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
====================================================================== 
Date Submitted:             2016-02-09 15:00 EST
Last Modified:              2016-02-09 15:00 EST
====================================================================== 
Summary:                    can't unzip jar file on windows
Description: 
I'd like to use cmake to unpack a .jar file. To do this, I use the following
command in my CMakeLists.txt:

execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf ${MY_JAR} --format=zip
${CMAKE_CURRENT_BINARY_DIR}/ )


Which I run through the CMake GUI. This command works as intended on OSX. On
Windows, I get the following error when configuring:


COMMAND C:/Program Files (x86)/CMake/bin/cmake.exe -E tar xf my.jar --format=zip
build
CMake Error: Problem with archive_write_header(): Can't create '\\?\C:\Program
Files (x86)\CMake\META-INF\MANIFEST.MF'

CMake Error: Current file: META-INF/MANIFEST.MF

CMake Error: Problem extracting tar: my.jar



Steps to Reproduce: 
cmake_minimum_required(VERSION 2.8.9)
project(extractjar)

message("COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_SOURCE_DIR}/my.jar
--format=zip ${CMAKE_CURRENT_BINARY_DIR}/")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_SOURCE_DIR}/my.jar
--format=zip ${CMAKE_CURRENT_BINARY_DIR}/ )
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-02-09 15:00 nitroamos      New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to