[cmake-developers] Add a manifest file to the created jar

Matthew Woehlke matthew.woehlke at kitware.com
Mon Jun 17 12:51:30 EDT 2013


On 2013-06-17 12:25, Matthew Woehlke wrote:
> On 2013-06-17 09:59, paul.chavent at fnac.net wrote:
>> Following this thread¹ and bug², i would like to submit a patch that
>> allow to specify a Manifest.txt when creating a jar.
>>
>> ¹ http://www.cmake.org/pipermail/cmake/2011-December/048015.html
>> ² http://public.kitware.com/Bug/view.php?id=12886
>>
>> Could you review it please ?
>
> I am probably not the best person to have final say, but having also
> worked on this module recently...

Also, patches should be posted to cmake-devel, please :-).

>> +    if(DEFINED CMAKE_JAVA_JAR_MANIFEST)
>> +        set(_add_jar_MANIFEST "${CMAKE_JAVA_JAR_MANIFEST}")
>> +    endif()
>
> I would strongly suggest omitting this. The other incantations to accept
> variables in lieu of named arguments are for backwards compatibility
> (add_jar in CMake 2.8.10 did not have named arguments and could only be
> tweaked in this manner) and are no longer the preferred method. Since
> this is new functionality, there is no need to support the alternate
> method of specifying a manifest file.

I pushed document-add_jar-compat-shims to stage to make this more 
explicit. Brad/Andreas/Nicolas, can you please verify that it looks 
reasonable?

Thanks,

-- 
Matthew




More information about the cmake-developers mailing list