View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012886 | CMake | CMake | public | 2012-01-19 06:00 | 2014-03-05 09:58 | ||||
Reporter | Frank Glinka | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.7 | ||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||
Summary | 0012886: Add a manifest or main-class file to the created jar | ||||||||
Description | Hello, the attached patch introduces two optional options to the add_jar function: 1) CMAKE_JAVA_MANIFEST To include name : value attribute pairs from a manifest file in the created jar at META-INF/MANIFEST.MF you can set the manifest file with: set(CMAKE_JAVA_MANIFEST mymanifest.mf) add_jar(foobar foobar.java) 2) CMAKE_JAVA_EXECUTABLE To set a class as the application entry point for stand-alone applications bundled into an executable jar you can set its name with: set(CMAKE_JAVA_EXECUTABLE foo/Main) add_jar(foobar foo/Main.java) The latter one was wasn't my priority but I included it as it was easy to realize along the first patch. It is easier to use for people only wishing to create an executable jar than achieving the same by creating a manifest file. Regards, Frank P.S. The corresponding discussion for this patch on the mailing list can be found here: http://www.cmake.org/pipermail/cmake/2011-December/048015.html [^] | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | java-manifest-executable-option.patch [^] (4,336 bytes) 2012-01-19 06:00 [Show Content]
0001-Add-MANIFEST-option-to-add_jar.patch [^] (4,774 bytes) 2013-09-25 06:11 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0030352) David Cole (manager) 2012-08-11 21:09 |
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. |
(0033884) sebp (reporter) 2013-09-25 06:12 |
The attached patch adds support for specifying a manifest file in add_jar. Note that MANIFEST conflicts with ENTRY_POINT, thus only one of these options is allowed. |
(0033896) Brad King (manager) 2013-09-26 08:15 |
Coincidentally a patch was contributed for this just recently: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69aff17d [^] Does that solve this? |
(0033898) sebp (reporter) 2013-09-26 08:19 |
Yes, the patch adds the same features. My patch just adds the check that ENTRY_POINT and MANIFEST are not defined at the same time, otherwise calling "jar" will exit with an error. |
(0033899) Brad King (manager) 2013-09-26 08:44 |
According to "man jar" they are both allowed: "The letters m, f and e must appear in the same order that manifest, jarfile, entrypoint appear." |
(0033900) sebp (reporter) 2013-09-26 08:56 |
You are right, it's not allowed to specify the Main-Class attribute in the manifest at the same time as specifying an entry point. Apparently this was the case when I tested it. The patch you linked to is perfectly fine then. |
(0033901) Brad King (manager) 2013-09-26 09:08 |
Great, thanks! |
(0035270) Robert Maynard (manager) 2014-03-05 09:58 |
Closing resolved issues that have not been updated in more than 4 months |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-01-19 06:00 | Frank Glinka | New Issue | |
2012-01-19 06:00 | Frank Glinka | File Added: java-manifest-executable-option.patch | |
2012-08-11 21:09 | David Cole | Status | new => backlog |
2012-08-11 21:09 | David Cole | Note Added: 0030352 | |
2013-09-25 06:11 | sebp | File Added: 0001-Add-MANIFEST-option-to-add_jar.patch | |
2013-09-25 06:12 | sebp | Note Added: 0033884 | |
2013-09-26 08:15 | Brad King | Note Added: 0033896 | |
2013-09-26 08:19 | sebp | Note Added: 0033898 | |
2013-09-26 08:44 | Brad King | Note Added: 0033899 | |
2013-09-26 08:45 | Brad King | Assigned To | => Brad King |
2013-09-26 08:45 | Brad King | Status | backlog => assigned |
2013-09-26 08:45 | Brad King | Target Version | => CMake 3.0 |
2013-09-26 08:56 | sebp | Note Added: 0033900 | |
2013-09-26 09:08 | Brad King | Note Added: 0033901 | |
2013-09-26 09:08 | Brad King | Status | assigned => resolved |
2013-09-26 09:08 | Brad King | Resolution | open => fixed |
2013-09-26 09:08 | Brad King | Fixed in Version | => CMake 3.0 |
2014-03-05 09:58 | Robert Maynard | Note Added: 0035270 | |
2014-03-05 09:58 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |