1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Greetings Dwight, |
5 |
|
6 |
On Sun June 15 2003 5:31 pm, D. Tuinstra wrote: |
7 |
> 1) Should there be a virtual for servlet containers? At present |
8 |
> there are several containers available including tomcat, jetty, and |
9 |
> jboss (and that's just open source). I've only worked with tomcat, |
10 |
> but some of the references I've read say that each servlet |
11 |
> container has its own directory structure and its own way to |
12 |
> install servlet-based webapps. When writing an ebuild for a webapp |
13 |
> it would be nice to know, in a standard way, whether a container is |
14 |
> available and if so, which. |
15 |
|
16 |
Since the servlet 2.2 API spec, WAR files have a standard structure and this |
17 |
is used by all current versions of 2.2-compliant servlet containers I'm |
18 |
aware of. |
19 |
|
20 |
Some packages build WAR files that are entirely optional to the set of |
21 |
classes that the package provides. For this reason and others, it doesn't |
22 |
make sense (from my perspective) to have an ebuild automatically deploy a |
23 |
WAR. In doing so, it could have potential security issues ... especially |
24 |
on a server that is already running stuff live. |
25 |
|
26 |
Since the installation of a WAR is typically just a matter of copying the |
27 |
file in, and maybe touching a config file or two -- WARs should be |
28 |
installed into: |
29 |
|
30 |
/usr/share/${PN}/war/ |
31 |
...or |
32 |
/usr/share/${PN}-${PV}/war/ for slotted apps |
33 |
|
34 |
I would like to keep a distinct line between installing a package and |
35 |
deploying it. If the user wants to deploy the application, it has to be a |
36 |
separate action; no different than adding a script in /etc/init.d to a |
37 |
given runlevel. |
38 |
|
39 |
Adding support to java-config, supposing a virtual exists for servlet |
40 |
containers, is the ideal solution to installing WAR files in the long-term. |
41 |
Part of that will be some way of coupling WAR deployment and any |
42 |
corresponding config files in the same feature. Currently java-config is |
43 |
undergoing a rewrite, so between Todd Berman and myself finishing that up, |
44 |
expect to see that sometime soon. |
45 |
|
46 |
Either way, I don't expect to support non-WAR servlet packages as there's |
47 |
just much that can go wrong. Those types of packages will be put in |
48 |
/usr/share/${PN}/ until they can be installed as WARs, in which case the |
49 |
user will have to install them manually (not via java-config). |
50 |
|
51 |
|
52 |
> 2) Related question: what should the default container dependency be |
53 |
> if none is installed? Tomcat? |
54 |
|
55 |
We'll have to pick one for a virtual. Tomcat is the official reference |
56 |
implementation; also considering everything else Apache produces, it makes |
57 |
overall sense for Tomcat to be the default. |
58 |
|
59 |
|
60 |
> 3) Some Java tools, such as Struts Console, can be installed |
61 |
> standalone or as a plugin to one or more Java IDE's. Should there |
62 |
> be a USE variable for each of the IDE's, that an ebuild can consult |
63 |
> to see which IDE's it should install itself into? If so, how would |
64 |
> version dependency/compatability issues be handled? |
65 |
|
66 |
That's a complicated issue. It might make sense to make a plugin a separate |
67 |
package (which depends on the main struts package for the member classes). |
68 |
e.g., dev-util/eclipse-struts. |
69 |
|
70 |
Alternatively, the ebuild can check for the presence of another package |
71 |
during src_compile (which is somewhat ugly but it works). It depends on |
72 |
the circumstances. |
73 |
|
74 |
Either one of those two scenarios is more preferable IMO, than piling on |
75 |
more USE flags- even local ones. Some may disagree with me, but USE flags |
76 |
should be conservative and restricted to compile-time options as much as |
77 |
possible. |
78 |
|
79 |
Cheers, |
80 |
Dylan Carlson [absinthe@g.o] |
81 |
Developer, Java Lead -- Gentoo Linux |
82 |
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x708E165F |
83 |
-----BEGIN PGP SIGNATURE----- |
84 |
Version: GnuPG v1.2.2 (GNU/Linux) |
85 |
|
86 |
iD8DBQE+7uKiPQS8wXCOFl8RAmTMAJ4n7/KvV2CfE4uJ0cfnyE/B1JHOYgCgly53 |
87 |
tzUw3Q4NdL7/MhF1E1oXsc8= |
88 |
=x1tv |
89 |
-----END PGP SIGNATURE----- |
90 |
|
91 |
|
92 |
-- |
93 |
gentoo-dev@g.o mailing list |