One of things that I really like about the JBossBuild is that it can clearly separate different portions of the build (e.g. compilation declaration, deployment steps). The final step of releasing files is clearly described in the top level jbossas/jbossbuild.xml file. I also feel that this is perhaps one of the areas that is most in need of added flexibility.
For example when building the server and its different configurations we include a number of jboss-service.xml files, one in the minimal/conf, one in the all/conf and one in the default/conf folder. Looking at the deployment declaration for server we see the following:
<!--TODO this is a problem area as it is not easy to understand Currently we store a number of files and then rename and release them as jboss-service.xml to the various server configurations. --> <!-- conf --> <artifact id="jboss-minimal.xml" release="server/minimal/conf" outputpath="etc/conf/default" rename="true" tofile="jboss-service.xml"/> <artifact id="jboss-service.xml" outputpath="resources/jmx-invoker-adaptor/META-INF" filename="jmx-invoker-service.xml" release="server/all/deploy, server/default/deploy"/> <artifact id="conf-jboss-service.xml" release="server/all/conf, server/default/conf" filename="jboss-service.xml" outputpath="etc/conf/default"/>
In server/etc/conf/default a file exists called jboss-minimal.xml. It must be moved to server/minimal/conf and renamed to jboss-service.xml as part of the release process.
The file jmx-invoker-service.xml is located at resources/jmx-invoker-adaptor/META-INF and must be renamed to jboss-service.xml and placed in server/all/deploy and server/default/deploy.
Finally the file jboss-service.xml is located in /etc/conf/default. It is given an artifact id of ?conf-jboss-service.xml? to avoid the duplicate id problem and it will be released to server/all/conf and server/default/conf. An example problem would be deploying an artifact to two locations with two different names. This is currently not possible.
We tend to release files to multiple locations and I like the idea of breaking anything that is a list into seperate xml elements (saw this in Maven). A possible way of making this cleaner would like this:
<artifact id="jboss-minimal.xml" outputpath="etc/conf/default"> <release name="jboss-service.xml">server/minimal/conf</release> </artifact> <artifact id="jmx-invoker-service.xml" outputpath="resources/jmx-invoker-adaptor/META-INF"> <release name="jboss-service.xml">server/all/deploy</release> <release name="jboss-service.xml">server/default/deploy</release> </artifact> <artifact id="jboss-service.xml" outputpath="etc/conf/default" > <release>server/all/conf</release> <release>server/default/conf</release> </artifact>
In this case release would be a type that describes what to do with an artifact. We would have to come up with a way to uniquely identify each release.