i have project that has 2 archives and 12 global variables. i want to build and deploy only one EAR which uses only 6 GVs. but when i build the EAR it will have all the 12 GVs. i tried using Appmanage command with -deployconfig in which the config.xml file will have only the 6 required GVs but it does not override the GVs present in EAR. the unwanted GVs are still visible in the Admin. Is there any tool or a way i can override the Tibco.xml present in the EAR with the GVs that i want to put in the EAR?
Try putting the GVs for archive 1 in a folder and the GVs for archive 2 in another folder. From memory (I'm a bit hazy on this area) when you build the ear, it will include all the GVs from a particular folder if one or more of the GVs in that folder are referenced.
Otherwise you could also consider splitting the project into two projects, one for each archive. To share resources from one project to another, have one of the projects produce a design time library, which is used by the other project.
Lastly, if you want to go for a hack, just remove the unwanted gvars from the Tibco.xml in the EAR. You could do this quite easily using Ant to extract the Tibco.xml, use XSLT to strip out the unwanted GVs and then use Ant again to replace the Tibco.xml in the EAR with your modified version. However I suspect TIBCO Support will be reluctant to assist you if there are any problems with the resulting EAR.