title: Drools rules will not compile because of missing Spring-injected dependencies
body: <p>I am using maven-ant-tasks-2.0.10.jar with build.xml to compile Drools rules. </p>
  
  <p>The rule goes something like this:</p>
  
  <pre><code>package example
  
  //list any import classes here.
  import example.util.Util;
  
  //declare any global variables here
  global example.util.Util util;
  
  rule "Simple rule 1"
    dialect "mvel"
    when
     //conditions
    then
     //actions
     util.handleIssue( "Simple rule 1 executed..." );
  end
  </code></pre>
  
  <p>The Util class has a method in the looks like the following:</p>
  
  <pre><code>public class Util {
      // Agent is a Spring Injected Dependency.
      private Agent agent;
  
      public void handleIssue( MyObject mo ) throws JAXBException {           
        try {
          // This is a SOAP call using a WSDL to an external Spring-WS service.
          agent.performTask( "dataneeded" );
        } catch( SoapFaultClientException sfce ) {
          // TODO
        }
  
      public void agent( Agent agent ) {
       this.agent = agent;
      }
  }
  </code></pre>
  
  <p>An error returns in the form of a SoapFaultClientException when attempting to compile the build.xml. Obviously, maven-ant-tasks-2.0.10.jar/drools compiler does not recognize the Spring-Injected dependencies and probably does not even care or know about Spring.</p>
  
  <p>How do I make the dependencies visible to maven-ant-tasks-2.0.10.jar so the drools rules can compile and run properly? Am I abusing the way Drools can be used? Does anyone know how to compile rules with Java Objects that use Spring-Inject dependencies (Spring Web Services)?</p>
  
  <p>When I take out the part calling the web service, it compiles just fine.</p>