Hi,

I am happy about the recently improved Java support within cmake. Thanks! Anyhow, I have a small point which should be easy to improve and which would deliver quite some usability, in my opinion.

The current syntax for building and packaging Java files is:

add_jar(${TARGETNAME} ${SOURCE_FILES} ${RESOURCE_FILES})

This has some drawbacks:

1) No executable jar can be created with that method. It seems there is already some effort on that issue as: https://github.com/viandfraich/CMake/commit/36b223e34f5d48339da39e833a2f5e7df2866e87

2) A jar file can be annotated with a lot of more important information, e.g., version information, scope, main-class (would also catch the first issue), etc. This information is normally passed as a property/manifest file when calling the "jar" packager. Currently, the UseJava.cmake module creates the following command within 'add_jar':

jar cf ${TARGETNAME} ${CLASS_FILES} ${RESOURCE_FILES}

The following would solve my (and I guess many others') use cases:

jar cmf ${TARGETNAME} MyManifest.mf ${CLASS_FILES} ${RESOURCE_FILES}

An optional command to add_jar would be desirable which allows to provide an optional manifest file. If provided, the later syntax should be used for calling the 'jar' tool.

Will there be progress towards supporting manifest information anytime soon within cmake?

Regards,
Frank



P.S. More information on manifest files can be found, e.g., here: http://download.oracle.com/javase/tutorial/deployment/jar/manifestindex.html
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to