<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>To get expected result, I modified three line codes  in NewRuleCalculator.java<br> line 45:   ruleMap.put(new Pattern("*/computation"), new ComputationAction2());<br> line 51:   ruleMap.put(new Pattern("/computation/new-rule"), new NewRuleAction());<br> line 57:   simpleConfigurator.doConfigure("src/main/java/chapters/onJoran/newrule/newRule.xml");<br><br><br>Below are outputs from IDE:<br><br>cd C:\opensourcecodes\qpid\logback\logback-examples; JAVA_HOME=C:\\Java\\jdk1.7.0_15 M2_HOME=C:\\Maven\\apache-maven-3.0.4 C:\\Maven\\apache-maven-3.0.4\\bin\\mvn.bat "-Dexec.args=-classpath %classpath chapters.onJoran.newRule.NewRuleCalculator" -Dexec.executable=C:\\Java\\jdk1.7.0_15\\bin\\java.exe -Dexec.classpathScope=runtime -DskipTests=true process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec<br>Scanning for projects...<br>                                                                        <br>------------------------------------------------------------------------<br>Building Logback Examples Module 1.0.12-SNAPSHOT<br>------------------------------------------------------------------------<br><br>[build-helper:add-test-source]<br>Test Source directory: C:\opensourcecodes\qpid\logback\logback-examples\src\test\scala added.<br><br>[resources:resources]<br>[debug] execute contextualize<br>Using 'UTF-8' encoding to copy filtered resources.<br>Copying 3 resources<br><br>[compiler:compile]<br>Compiling 1 source file to C:\opensourcecodes\qpid\logback\logback-examples\target\classes<br><br>[exec:exec]<br>The computation named [toto] resulted in the value 30<br>------------------------------------------------------------------------<br>BUILD SUCCESS<br>------------------------------------------------------------------------<br>Total time: 2.254s<br>Finished at: Mon Apr 01 13:08:33 PDT 2013<br>Final Memory: 11M/182M<br><br><font style="color: rgb(153, 51, 0); font-weight: bold; font-size: 12pt;" size="3"><span style="font-family:Tahoma,Helvetica,Sans-Serif;"><font style="font-size:10pt;" size="2">Ming Qin<br><br>Cell Phone Number: <font style="font-size:10pt;" size="2">949-388-9898</font></font></span></font><font style="font-weight: bold; color: rgb(153, 51, 0); font-size: 12pt;" size="3"><span style="font-family:Tahoma,Helvetica,Sans-Serif;"><br></span></font><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: mingqin@live.com<br>To: logback-dev@qos.ch<br>Subject: No expected Result from Running NewRuleCalculator.java in LogBack Example Module<br>Date: Sun, 31 Mar 2013 17:54:47 -0600<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr"><div>Hi:</div><div>  I run the NewRuleCalculator.java  to learn Joran feature - interpreter to
  learn new rules on the fly.</div><div><br></div><div>  I modified line of 57 as  </div><div><br></div><div>   simpleConfigurator.doConfigure("src/main/java/chapters/onJoran/newRule/newRule.xml");</div><div><br></div><div>  first of all, newRule.xml has  typo for xml element "new-rule" , it should be "newRule"</div><div>  after correcting above error, the NewRuleCalculator.java run fine but didn't generate expected result as "The computation named [toto] resulted in the value 30"</div><div><br></div><div>See below output from my IDE:</div><div><br></div><div><br></div><div><div>cd D:\OpenSourceCodes\logback-master\logback-examples; JAVA_HOME=D:\\Java\\jdk1.7.0_15 "\"D:\\Program Files\\NetBeans 7.3\\java\\maven\\bin\\mvn.bat\"" "-Dexec.args=-classpath %classpath chapters.onJoran.newRule.NewRuleCalculator" -Dexec.executable=D:\\Java\\jdk1.7.0_15\\bin\\java.exe -Dexec.classpathScope=runtime -DskipTests=true process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</div><div>Scanning for projects...</div><div>                                                                        </div><div>------------------------------------------------------------------------</div><div>Building Logback Examples Module 1.0.12-SNAPSHOT</div><div>------------------------------------------------------------------------</div><div><br></div><div>[build-helper:add-test-source]</div><div>Test Source directory: D:\OpenSourceCodes\logback-master\logback-examples\src\test\scala added.</div><div><br></div><div>[resources:resources]</div><div>[debug] execute contextualize</div><div>Using 'UTF-8' encoding to copy filtered resources.</div><div>Copying 3 resources</div><div><br></div><div>[compiler:compile]</div><div>Compiling 1 source file to D:\OpenSourceCodes\logback-master\logback-examples\target\classes</div><div><br></div><div>[exec:exec]</div><div>------------------------------------------------------------------------</div><div>BUILD SUCCESS</div><div>------------------------------------------------------------------------</div><div>Total time: 1.532s</div><div>Finished at: Sun Mar 31 16:53:19 PDT 2013</div><div>Final Memory: 9M/24M</div><div>------------------------------------------------------------------------</div></div><div><br></div><div><br></div>Source code : downloading logback-master.zip from <a href="https://github.com/qos-ch/logback" target="_blank">https://github.com/qos-ch/logback</a><div>IDE: NetBeans 7.3</div><div>JDK version: <span style="font-size:12pt;"> </span><span style="font-size:12pt;">32  bit window version</span><span style="font-size:12pt;"> Oracle JDK 1.7.0_15</span></div><div>Platform: window xp<br><br><font style="color:rgb(153, 51, 0);font-weight:bold;" size="3"><span style="font-family:Tahoma,Helvetica,Sans-Serif;"><font style="font-size:10pt;" size="2">Ming Qin<br><br>Cell Phone Number: <font style="font-size:10pt;" size="2">949-388-9898</font></font></span></font><font style="font-weight:bold;color:rgb(153, 51, 0);" size="3"><span style="font-family:Tahoma,Helvetica,Sans-Serif;"><br></span></font></div>                                           </div></div>                                        </div></body>
</html>