From: Patrick S. <Str...@fa...> - 2010-06-03 22:22:38
|
Is there a way to instrument a war file, but ignore a specific jar inside the war? I am instrumenting a war using an ant file. But if I specify this exclude .ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {margin-bottom:.0001pt;font-size:11.0pt;font-family:'Calibri','sans-serif';} .ExternalClass p.ecxMsoPlainText, .ExternalClass li.ecxMsoPlainText, .ExternalClass div.ecxMsoPlainText {margin-bottom:.0001pt;font-size:10.5pt;font-family:Consolas;} .ExternalClass span.ecxPlainTextChar {font-family:Consolas;} .ExternalClass .ecxMsoChpDefault {;} @page Section1 {size:8.5in 11.0in;} .ExternalClass div.ecxSection1 {page:Section1;} <fileset dir="${war.dir}"> <include name="**/*.war" /> <exclude name="**/*-client.jar" /> </fileset> it does not work. It's because the *-client.jar file is inside the war. So what I do is extract the war and then instrument the exploded war directory with this fileset <fileset dir="${explodedwar.dir}"> <include name="**/*.class" /> <include name="**/*.jar" /> <exclude name="**/*-client.jar" /> </fileset> Which works, but makes the scripting much more difficult since I must do this for each war. The reason I need to do this is our wars use enunciate (http://enunciate.codehaus.org/). This creates a *-client.jar file that is inside the war, ,but the source code may have been modified by enunciate if there are annotations. So a class file that is in the *-client.jar may not have the same line numbers that a class file in the war itself has. So when we look at coverage reports, we see strange things like comments being counted as lines. If anyone has any suggestions besides exploding the war and repackaging, let me know. Also please be aware of this if your team is using enunciate. thanks, Patrick NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. |