<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Instrumentation Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/instrumentation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/instrumentation/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:18:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Ant Example code for Emma Instrumentation</title>
		<link>https://www.scmgalaxy.com/tutorials/ant-example-code-for-emma-instrumentation/</link>
					<comments>https://www.scmgalaxy.com/tutorials/ant-example-code-for-emma-instrumentation/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 09 Dec 2017 08:21:44 +0000</pubDate>
				<category><![CDATA[source code analysis tools]]></category>
		<category><![CDATA[Instrumentation]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2621</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Ant Example code for Emma Instrumentation In-place instrument a certain subset of already compiled classes using [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ant-example-code-for-emma-instrumentation/">Ant Example code for Emma Instrumentation</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Ant Example code for Emma Instrumentation</strong></p>
<p>In-place instrument a certain subset of already compiled classes using overwrite mode and several coverage filters:</p>
<pre class="brush: css; title: ; notranslate">
&lt;emma enabled=&quot;${emma.enabled}&quot; &gt;
      &lt;instr instrpathref=&quot;${out.dir}/classes&quot;
             mode=&quot;overwrite&quot;
      &gt;
        &lt;!-- always exclude every class with a &quot;Test&quot; in the name: --&gt;
        &lt;filter excludes=&quot;*Test*&quot; /&gt;
        &lt;!-- don't instrument everything in &quot;${out.dir}/classes&quot;,
             only the stuff I am working on now: --&gt;
        &lt;filter file=&quot;myincludes.txt&quot; /&gt;
        &lt;!-- additional ANT command line hook: --&gt;
        &lt;filter value=&quot;${emma.filter}&quot; /&gt;
      &lt;/instr&gt;
    &lt;/emma&gt;
</pre>
<p>Don&#8217;t overwrite compiled classes that later need to go into official release jars (stay in copy mode). However, use incremental instrumentation for fast personal testing:</p>
<pre class="brush: css; title: ; notranslate">
 &lt;emma enabled=&quot;${emma.enabled}&quot; &gt;
          &lt;instr instrpathref=&quot;${out.dir}/classes&quot;
                 outdir=&quot;${out.dir}/classes-instrumented&quot;
                 merge=&quot;yes&quot;
                 filter=&quot;${emma.filter}&quot;
          /&gt;
    &lt;/emma&gt;
</pre>
<p>Take all jars already produced by the product build and make test (coverage-enabled) copies of them:</p>
<pre class="brush: css; title: ; notranslate">
  &lt;emma enabled=&quot;${emma.enabled}&quot; &gt;
          &lt;instr mode=&quot;fullcopy&quot;
                 outdir=&quot;${out.instr.dir}&quot;
                 merge=&quot;no&quot;
                 filter=&quot;${emma.filter}&quot;
          &gt;
            &lt;instrpath&gt;
              &lt;fileset dir=&quot;${out.dir}&quot; includes=&quot;**/*.jar&quot; /&gt;
            &lt;/instrpath&gt;
          &lt;/instr&gt;
    &lt;/emma&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
&lt;copy todir=&quot;${dist}&quot;&gt;
      &lt;fileset dir=&quot;${src}&quot;
               includes=&quot;**/images/*&quot;
               excludes=&quot;**/*.gif&quot;
      /&gt;
    &lt;/copy&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
&lt;copy todir=&quot;${dist}&quot;&gt;
      &lt;fileset dir=&quot;${src}&quot;&gt;
        &lt;include name=&quot;**/images/*&quot;/&gt;
        &lt;exclude name=&quot;**/*.gif&quot;/&gt;
      &lt;/fileset&gt;
    &lt;/copy&gt;
 
</pre>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
      &lt;include name=&quot;**/*.java&quot;/&gt;
      &lt;exclude name=&quot;**/*Test*&quot;/&gt;
&lt;/fileset&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
      &lt;patternset id=&quot;non.test.sources&quot;&gt;
        &lt;include name=&quot;**/*.java&quot;/&gt;
        &lt;exclude name=&quot;**/*Test*&quot;/&gt;
      &lt;/patternset&gt;
&lt;/fileset&gt;
</pre>
<p>Groups all files in directory ${client.src}, using the same patterns as the above example.</p>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;${client.src}&quot; &gt;
  	&lt;patternset refid=&quot;non.test.sources&quot;/&gt;
&lt;/fileset&gt;
 
</pre>
<p>Groups the same files as the top example, but using the <filename> selector.</p>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
  &lt;filename name=&quot;**/*.java&quot;/&gt;
  &lt;filename name=&quot;**/*Test*&quot; negate=&quot;true&quot;/&gt;
&lt;/fileset&gt;

</pre>
<p>Groups the same files as the previous example using a combination of the <filename> selector and the <not> selector container.</p>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;${server.src}&quot; casesensitive=&quot;yes&quot;&gt;
  &lt;filename name=&quot;**/*.java&quot;/&gt;
  &lt;not&gt;
    &lt;filename name=&quot;**/*Test*&quot;/&gt;
  &lt;/not&gt;
&lt;/fileset&gt;
</pre>
<p>Selects all files in src/main</p>
<pre class="brush: css; title: ; notranslate">
&lt;fileset dir=&quot;src&quot; includes=&quot;main/&quot; /&gt;
 
     	&lt;emma enabled=&quot;${emma.enabled}&quot; &gt;
          &lt;instr mode=&quot;overwrite&quot; 
          	 instrpath=&quot;${jar.location}&quot;
                 destdir=&quot;${inst.jar.location}&quot;	
                 metadatafile=&quot;${inst.jar.location}/metadata.emma&quot;
                 merge=&quot;no&quot; &gt;
            	&lt;instrpath&gt;
              		&lt;fileset dir=&quot;${jar.location}&quot; includes=&quot;elance-services.jar,web-classes.jar,applet.jar,application-ejb.jar&quot; /&gt;
            	&lt;/instrpath&gt;
 
         &lt;/instr&gt;
      	&lt;/emma&gt;
 
 
      	&lt;emma enabled=&quot;${emma.enabled}&quot; &gt;
	          &lt;instr mode=&quot;fullcopy&quot; 
	          	 instrpath=&quot;${jar.location}&quot;
	          	 outdir=&quot;${inst.jar.location}&quot;
 
	                 metadatafile=&quot;${inst.jar.location}/metadata.emma&quot;
	                 merge=&quot;no&quot; &gt;
	            	&lt;instrpath&gt;
	              		&lt;fileset dir=&quot;${jar.location}&quot; includes=&quot;elance-services.jar,web-classes.jar,applet.jar,application-ejb.jar&quot; /&gt;
	            	&lt;/instrpath&gt;
 
	         &lt;/instr&gt;
      	&lt;/emma&gt;
</pre>
<p>Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ant-example-code-for-emma-instrumentation/">Ant Example code for Emma Instrumentation</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/ant-example-code-for-emma-instrumentation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
