Blueprint For Updating EAR

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Blueprint for Updating EAR

1. Prepare the archive.xml in the given format:

<archives>
<archive name="data-source-ear.ear">
<jars>
<jar name= “cramer-ds-trans-webapp.war”>
<xmlsource name="web.xml">
<xpath name="" value="ldap.hostname"/>
<xpath name="" value="ldap.hostname"/>
<xpath name="" value="ldap.hostname"/>
</ xmlsource >
<xmlsource name="web1.xml">
<xpath name="" value="ldap.hostname"/>
</ xmlsource >
</jar>
<jar name= “cramer-ds-trans-webapp1.war”>
<xmlsource name="web.xml">
<xpath name="" value="ldap.hostname"/>
<xpath name="" value="ldap.hostname"/>
<xpath name="" value="ldap.hostname"/>
</ xmlsource >
<xmlsource name="web1.xml">
<xpath name="" value="ldap.hostname"/>
</ xmlsource >
</jar>
</jars>
</archive>
< archive>..</ archive>
</archives>

2. Get the Values to be updated from GUI (where user enters)

3. Load the XML and parse(Dom)

4. Perform the following tasks with the values getting in step 2 and 3:

a. Explode EAR to temp directory.

b. Explode JAR from the EAR taken above in to the jar-temp directory.

c. Update the JAR with given values of xml, xpaths and xpath-values in web.xml

d. Pack the updated JAR (taken from step 4)


e. Delete the jar-temp directory.

f. Pack the EAR.

g. Delete the directory where EAR was exploded. (Clean-up)

You might also like