On Mon, 25 Jun 2018 19:40:27 -0400 Christopher Schultz <ch...@christopherschultz.net> wrote:
> I'm confused about what you're asking, here. Do you want Tomcat to > change its own directory layout? Ideally yes, like a directory per jar, with src/java/main src/java/resources Jetty is good example or Netbeans https://github.com/eclipse/jetty.project https://github.com/apache/incubator-netbeans > Why? Because I am crazy :) It makes packaging it easier IMHO. Each directory contains what ends up in a given jar. Right now they are all mixed together in java, including resources. Fine if you use the build system. But then its all or nothing. Cannot really build a jar, or just those needed/wanted. Tomcat on Gentoo used to use ant and was a monolithic package short of servlet-api. Which still exists in Gentoo. https://github.com/gentoo/gentoo/blob/master/www-servers/tomcat/tomcat-9.0.7.ebuild https://github.com/gentoo/gentoo/blob/master/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.7.ebuild I have split it out to be a package per jar. Its working great, it was just a bit of a pain to find what goes in each jar. If that changes, I will have to match jar contents again. Make sure correct classes are going in the correct jar, and resources. See all the tomcat-* packages here, one per jar https://github.com/Obsidian-StudiosInc/os-xtoo/tree/master/dev-java Some are a bit tricky to package I have to remove some files or specify which to include. It is not really ideal. Example of matching jar contents https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-java/tomcat-jasper/tomcat-jasper-9999.ebuild#L39 Then I have a meta package, that just pulls in all others to form the actual tomcat installation. Meta package https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/www-servers/tomcat/tomcat-9999.ebuild The individual packages allow for embedded use and for development etc. Like say using Tomcat in Netbeans. This way Netbeans has access to all Tomcat jars, but does not require a server package to be installed. Even better Netbeans can have its own "Tomcat install", linking in jars into its own local server space with its own config, etc. Before others were doing stuff with the server package. If making an embedded app, you can pull in what jars you need, rather than building all of tomcat and having init scripts and other stuff laying around unused. Just makes it a bit more modular. A different way of shipping Tomcat :) -- William L. Thomson Jr.
pgp0e4GA3mO9H.pgp
Description: OpenPGP digital signature