-
1. Re: adding Struts modules
sebersole Aug 11, 2005 2:50 PM (in response to ccrouch)I would also suggest breaking up the stuff in WEB-INF a little bit. Something like:
WEB-INF/ hibernate/ struts-config.xml tiles-defs.xml ...
Otherwise, that directory will get unwieldy once we get many more modules...
They are all explicitly defined paths, so it won't really matter where they live -
2. Re: adding Struts modules
ccrouch Aug 11, 2005 3:05 PM (in response to ccrouch)Agreed. We might as well go the whole hog and have:
WEB-INF/ conf/ hibernate/ jms/ ...
That way we have:WEB-INF/ classes/ jsp/ conf/
Lets start this way with the Hibernate module and we can migrate across the other modules as we progress. -
3. Re: adding Struts modules
peterj Aug 11, 2005 7:15 PM (in response to ccrouch)Charles, I like your suggestion, makes the WEB_INF directory less cluttered andm ore orgranized. I'll schedule the migration for the JMS component.
-
4. Re: adding Struts modules
sebersole Aug 11, 2005 9:22 PM (in response to ccrouch)Another thing I have noticed is "common" resource bundle stuff contained in the module-specific bundles. For example, the datasource bundle defines keys for the various deployments states; I guarentee these will get used by other modules.
I started a common.properties resource bundle to contain these kinds of view label keys. I am using it from the hibernate module; I'll leave it to the other modules to migrate if they wish. -
5. Re: adding Struts modules
peterj Aug 12, 2005 3:16 PM (in response to ccrouch)Since we are in the mood for some restructuring...
Charles and I talked earlier about an alternate directory scheme where each component was kept in it sown source tree. Right now, the directory that corresponds to the component is at the end of the list (e.g., admin-console/src/main/org/jboss/admin/model/jms). To foster separation of components, it might be best to have the module directory first, as in admin-console/jms/src/main/org/jboss/admin/model/jms (or perhaps admin-console/jms/src/main/org/jboss/admin/model). We could set ruls such that any module could referenbce the 'base' module but not any other module (e.g., jms could not reference datasource). The build.xml in admin-console would call the build.xml in ./base, ./datasource, ./jms, etc. This might make it easier to package the components as individual portlets when we move to the portal server.
We did want to do this originally because my team wanted to be a little more familiar with the processes and the admin console source before we tackled such a thing. But maybe now is the time. -
6. Re: adding Struts modules
ccrouch Sep 14, 2005 2:12 PM (in response to ccrouch)"PeterJ" wrote:
To foster separation of components, it might be best to have the module directory first, as in admin-console/jms/src/main/org/jboss/admin/model/jms . We could set ruls such that any module could referenbce the 'base' module but not any other module (e.g., jms could not reference datasource). The build.xml in admin-console would call the build.xml in ./base, ./datasource, ./jms, etc. This might make it easier to package the components as individual portlets when we move to the portal server.
Agreed. Having talked to Ruel, master of the JBoss build system, he suggested we follow the example used in the 'aspects' component for handling the multiple src folders.
So riffing off that I thought we could have the following:
jboss-head\admin-console\src\main\.
\jms (includes org\jboss\admin\model\jms\*, org\jboss\admin\service\jms\*, org\jboss\admin\console\web\struts\jms\*)
\datasource (includes org\jboss\admin\model\datasource\*, org\jboss\admin\service\datasource\*, org\jboss\admin\console\web\struts\datasource\*)
\hibernate (includes org\jboss\admin\model\hibernate\*, org\jboss\admin\service\hibernate\*, org\jboss\admin\console\web\struts\hibernate\*)
\common (any .java files not in one of the other categories)
I think it is a good idea, for clarity and to reduce code changes, to maintain the current package names.
Once this is done we would remove the current main\org\* folder structure.
We can enforce the "rules" you refer to by ensuring the classpath for building the component source trees only includes \common and the standard jar dependencies. Clearly the build.xml, .classpath and .project will need to be updated to support this and also the general eclipse build jboss-head\build\eclipse.psf will need changing.
Since the tests will never get packaged up I don't think it makes much sense to refactor them.
First things first, Peter can you create a JIRA issue for this so we can track it? -
7. Re: adding Struts modules
ccrouch Sep 14, 2005 2:13 PM (in response to ccrouch)"PeterJ" wrote:
Charles, I like your suggestion, makes the WEB_INF directory less cluttered andm ore orgranized. I'll schedule the migration for the JMS component.
Excellent. You should be able to use WEB-INF\conf\hibernate\* as a template.
Can you create a JIRA issue to track this one too? -
8. Re: adding Struts modules
ccrouch Sep 14, 2005 2:52 PM (in response to ccrouch)"charles.crouch@jboss.com" wrote:
Clearly the build.xml, .classpath and .project will need to be updated to support this and also the general eclipse build jboss-head\build\eclipse.psf will need changing.
To clarify: I would expect us to continue only using a single build.xml file in .\admin-console\, just that it would have several compile steps, one for each module. -
9. Re: adding Struts modules
peterj Sep 14, 2005 5:16 PM (in response to ccrouch)An alternative would be to have a build.xml file for each component, and a master build.xml for the admin console as a whole. The component build.xml files could have targets to compile, test and package just that component. The master build.xml would call the component build.xml files to compile and test the components, but have its own target for packaging.
-
10. Re: adding Struts modules
walkerrl49 Sep 20, 2005 3:41 PM (in response to ccrouch)An alternative would be to have a build.xml file for each component, ...
And we keep our fingers out of each others' build.xmls! -
11. Re: adding Struts modules
peterj Oct 10, 2005 2:45 PM (in response to ccrouch)The Struts-related configuration files for JMS have been moved to WEB-INF/conf/jms.
The web service and datasource configuration files still have to be moved.