Reputation: 1291
I'm using Eclipse Helios and JBoss Tools to develop a Seam project.
In the WEB-INF/components.xml file there is a setting to enable or disable the Seam debug mode. Obviously, for development I would like that to be enabled. For production, I would like that to be disabled.
Right now, I deploy by right-clicking on the associated EAR project and exporting the EAR file to disk, then scp it do the production server and deploy it.
Is there a way to have Eclipse change this debug setting in the components.xml file automatically from true to false whenever I export the EAR file? It is tedious to do the switch by hand all the time, especially since the application consists of several EAR files.
I have the feeling that the answer somehow involves Ant or Maven, but I have to admit that I have no clue about these tools and would be happy for this whole thing to be as simple as possible.
Upvotes: 0
Views: 247
Reputation: 29139
You cannot arbitrarily customize your app at export time using the standard Eclipse EAR export wizard.
As you've alluded, using an outside build system like Ant or Maven to construct your EAR files is a way to have complete control of how they are created, but you will have invest quite a bit in learning those technologies.
An alternative is to look into whether JBoss supports a notion of a deployment plan. I am not a JBoss user, but I believe that most/all app servers at this point support some form of a deployment plan. A deployment plan is a file that is provided to the server along with the EAR file that tells the server to alter values specified in descriptors. It is a feature that is designed to let an existing app be customized at deployment time without re-packing the archive. Think things like changing database connection information, tuning performance parameters, etc.
Upvotes: 1