MantisBT - CMake
View Issue Details
0013355CMakeModulespublic2012-06-27 14:172016-06-10 14:31
Marcin Wojdyr 
Andreas Schneider. 
normalminoralways
closedmoved 
Linux
CMake 2.8.8 
 
0013355: UseJava ignores resources without extensions
Resource files that have no filename extension are ignored.
With this CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.6)
find_package(Java)
include(UseJava)
project(foo Java)
add_jar(foo foo.java res1.txt res2)

file 'res2' will be ignored and not included in jar.
Any workaround would be welcome.
No tags attached.
patch 0001-Tests-Java-test-boundling-resources-in-JAR.patch (1,903) 2012-08-18 11:34
https://public.kitware.com/Bug/file/4427/0001-Tests-Java-test-boundling-resources-in-JAR.patch
Issue History
2012-06-27 14:17Marcin WojdyrNew Issue
2012-08-11 21:42David ColeStatusnew => backlog
2012-08-11 21:42David ColeNote Added: 0030449
2012-08-18 11:34Marcin WojdyrFile Added: 0001-Tests-Java-test-boundling-resources-in-JAR.patch
2012-08-18 11:35Marcin WojdyrNote Added: 0030695
2012-08-18 15:17Marcin WojdyrNote Added: 0030697
2012-08-20 03:51Andreas Schneider.Assigned To => Andreas Schneider.
2012-08-20 03:51Andreas Schneider.Statusbacklog => assigned
2016-06-10 14:28Kitware RobotNote Added: 0042072
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030449)
David Cole   
2012-08-11 21:42   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0030695)
Marcin Wojdyr   
2012-08-18 11:35   
I've added a patch to Tests/Java that shows this problems and also 0013360
(0030697)
Marcin Wojdyr   
2012-08-18 15:17   
the cause is in UseJava.cmake:289:

elseif (_JAVA_EXT STREQUAL "")
            list(APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH})
            list(APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}})

I don't know what it does, JAVA_JAR_TARGET_* is not set anywhere.
Can this block be deleted?
(0042072)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.