On Wed, Feb 8, 2012 at 3:20 AM, Andreas Schneider <span dir="ltr">&lt;<a href="mailto:asn@cryptomilk.org">asn@cryptomilk.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tuesday 07 February 2012 13:01:49 David Cole wrote:<br>
&gt; 2012/2/7 Nicolas Desprès &lt;<a href="mailto:nicolas.despres@gmail.com">nicolas.despres@gmail.com</a>&gt;:<br>
&gt; &gt; On Sat, Dec 10, 2011 at 3:46 PM, Andreas Schneider &lt;<a href="mailto:asn@cryptomilk.org">asn@cryptomilk.org</a>&gt;<br>
wrote:<br>
&gt; &gt;&gt; On Saturday 29 October 2011 23:34:50 Frank Glinka wrote:<br>
&gt; &gt;&gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt;&gt;&gt; I am happy about the recently improved Java support within cmake.<br>
&gt; &gt;&gt;&gt; Thanks! Anyhow, I have a small point which should be easy to improve and<br>
&gt; &gt;&gt;&gt; which would deliver quite some usability, in my opinion.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; The current syntax for building and packaging Java files is:<br>
&gt; &gt;&gt;&gt; &gt; add_jar(${TARGETNAME} ${SOURCE_FILES} ${RESOURCE_FILES})<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; This has some drawbacks:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; 1) No executable jar can be created with that method. It seems there is<br>
&gt; &gt;&gt;&gt; already some effort on that issue as:<br>
&gt; &gt;&gt;&gt; <a href="https://github.com/viandfraich/CMake/commit/36b223e34f5d48339da39e833a2f" target="_blank">https://github.com/viandfraich/CMake/commit/36b223e34f5d48339da39e833a2f</a><br>
</div>&gt; &gt;&gt;&gt; 5e7d f2866e87<br>
<div><div class="h5">&gt; &gt;&gt;<br>
&gt; &gt;&gt; I don&#39;t like the way how it has been added here. I think it should be an<br>
&gt; &gt;&gt; optional vairable you set before like the others. Please open a feature<br>
&gt; &gt;&gt; request in the bug tracker. Patches are welcome.<br>
&gt; &gt;<br>
&gt; &gt; Here is a proposal:<br>
&gt; &gt; <a href="https://github.com/polrop/CMake/commits/java-executable-jar" target="_blank">https://github.com/polrop/CMake/commits/java-executable-jar</a>&gt;<br>
&gt; &gt;&gt;&gt; 2) A jar file can be annotated with a lot of more important information,<br>
&gt; &gt;&gt;&gt; e.g., version information, scope, main-class (would also catch the first<br>
&gt; &gt;&gt;&gt; issue), etc. This information is normally passed as a property/manifest<br>
&gt; &gt;&gt;&gt; file when calling the &quot;jar&quot; packager. Currently, the UseJava.cmake<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; module creates the following command within &#39;add_jar&#39;:<br>
&gt; &gt;&gt;&gt; &gt; jar cf ${TARGETNAME} ${CLASS_FILES} ${RESOURCE_FILES}<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; The following would solve my (and I guess many others&#39;) use cases:<br>
&gt; &gt;&gt;&gt; &gt; jar cmf ${TARGETNAME} MyManifest.mf ${CLASS_FILES} ${RESOURCE_FILES}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Should be an optional option and should be done like the other options.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; set(CMAKE_JAVA_MANIFEST mymanifest.mf)<br>
&gt; &gt;&gt; add_jar(foo foo.java)<br>
&gt; &gt;<br>
&gt; &gt; I don&#39;t have any patch for this issue yet. Maybe in the future.<br>
&gt; &gt;<br>
&gt; &gt;&gt;&gt; An optional command to add_jar would be desirable which allows to<br>
&gt; &gt;&gt;&gt; provide an optional manifest file. If provided, the later syntax should<br>
&gt; &gt;&gt;&gt; be used for calling the &#39;jar&#39; tool.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Will there be progress towards supporting manifest information anytime<br>
&gt; &gt;&gt;&gt; soon within cmake?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Open a feature request in the bugtracker.<br>
&gt; &gt;<br>
&gt; &gt; Please tell me what you think about the proposal.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Nicolas Desprès<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt; &gt;<br>
&gt; &gt; Visit other Kitware open-source projects at<br>
&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt;<br>
&gt; &gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; &gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt; &gt;<br>
&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
&gt; The proposed commits (3 of them, right?) at<br>
&gt; <a href="https://github.com/polrop/CMake/commits/java-executable-jar" target="_blank">https://github.com/polrop/CMake/commits/java-executable-jar</a> look<br>
&gt; reasonable to me.<br>
&gt;<br>
&gt; Any objections from people who care about Java to getting these into<br>
&gt; CMake &#39;next&#39; ...?<br>
<br>
</div></div>Hi,<br>
<br>
David they look good to me. Should I push them to staging or do you want to do<br>
it?<br>
<br>
<br>
Cheers,<br>
<div class="HOEnZb"><div class="h5"><br>
        -- andreas<br>
<br>
<br>
--<br>
Andreas Schneider                   GPG-ID: F33E3FC6<br>
<a href="http://www.cryptomilk.org" target="_blank">www.cryptomilk.org</a>                <a href="mailto:asn@cryptomilk.org">asn@cryptomilk.org</a><br>
<br>
</div></div></blockquote></div><br><div>I would love it if you would push them to the stage and merge to &#39;next&#39;...</div><div><br></div><div>Thx,</div><div>David</div><div><br></div>