atom feed10 messages in net.java.dev.glassfish.adminRe: text man page integration with v3...
FromSent OnAttachments
Kedar MhaswadeMar 20, 2009 11:36 am 
Byron NevinsMar 20, 2009 12:00 pm 
Kedar MhaswadeMar 20, 2009 12:09 pm 
Paul DaviesMar 20, 2009 1:09 pm 
Byron NevinsMar 20, 2009 1:39 pm 
Kedar MhaswadeMar 20, 2009 2:04 pm 
Byron NevinsMar 20, 2009 3:40 pm 
Bill ShannonMar 20, 2009 5:56 pm 
Kedar MhaswadeMar 20, 2009 10:03 pm 
Kedar MhaswadeMar 20, 2009 10:08 pm 
Subject:Re: text man page integration with v3 commands ...
From:Byron Nevins (Byro@Sun.COM)
Date:Mar 20, 2009 1:39:09 pm
List:net.java.dev.glassfish.admin

In

public class CommandRunnerImpl implements CommandRunner {

public InputStream getManPage(String commandName, AdminCommand command) { // bnevins -- too bad there is no AdminCommand baseclass. We could make it // do the work but, alas, there is no such thing. Class clazz = command.getClass(); Package pkg = clazz.getPackage(); String manPage = pkg.getName().replace('.', '/'); manPage += "/" + commandName + ".1"; ClassLoader loader = clazz.getClassLoader(); InputStream in = loader.getResourceAsStream(manPage); return in; }

Kedar Mhaswade wrote:

Oops, you are right. But the way we get the resources is not very clear to me. Do we do ClassLoader.getResourceAsStream there? Yes (see code above) Is that going to work, always? Always is a long time!

-Kedar

But it *is* a resource. Or am I misunderstanding??

E.g.

Directory of C:\gf\v3\core\kernel\src\main\*resources*\com\sun\enterprise\v3\admin\commands

03/19/2009 11:03 PM 12,013 create-jvm-options.1 03/19/2009 11:03 PM 10,769 delete-jvm-options.1 03/19/2009 11:03 PM 17,351 generate-jvm-report.1 03/19/2009 11:03 PM 7,381 list-jvm-options.1 4 File(s) 47,514 bytes

This is a topic that keeps on coming up and I realize that we never really solved it properly.

The text help page should reside along with the command implementation (per module) as a "resource", which is not the case right now.

It may also be a good idea to be more agile here and get the man page from the web, such that the freshness of content is addressed. Too many times have I observed that bundled docs are just wrong or incomplete. (This is not a criticism, just observation.)

I want two things: - Scheduling of this on iteam meeting (Sreeni). - A volunteer who is willing to work on this. Creative solutions are encouraged. This is NOT a negligible item.

-Kedar