title: MarkupBuilder in Eclipse: unable to resolve class groovy.xml.markupBuilder
body: <p>I feel a bit silly for making this question, but I'm out of options.</p>
  <p>Basically, I have this on a &quot;let's learn groovy&quot; project:</p>
  <pre><code>package com.mypackage.markupexercise
  
  import groovy.xml.MarkupBuilder
  
  println &quot;Hello MarkupBuilder&quot;
  
  def writer = new StringWriter()
  def builder = new MarkupBuilder(writer)
  
  builder.records() {
      example(id:1)
  }
  </code></pre>
  <p>And I'm getting the following compilation error:</p>
  <pre><code>&lt;path&gt;\markupbuilderexercise\Main.groovy: 3: unable to resolve class groovy.xml.MarkupBuilder
   @ line 3, column 1.
     import groovy.xml.MarkupBuilder
     ^
  
  1 error
  </code></pre>
  <p>Now, I've seen [this question][1], and I have imported the groovy-xml-3.09.jar file (Through right click on project -&gt; Properties -&gt; Java Build Path -&gt; Add Jars...)</p>
  <p>There is nothing on the &quot;Problems&quot; tab, and if I try to run through the groovy console, I get the following error:</p>
  <pre><code>groovy.lang.MissingMethodException: No signature of method: groovy.xml.MarkupBuilder.records() is applicable for argument types: (com.neuro.groovyhelloworld.markupbuilderexercise.Main$_run_closure1) values: [com.neuro.groovyhelloworld.markupbuilderexercise.Main$_run_closure1@2e757861]
  
      at com.neuro.groovyhelloworld.markupbuilderexercise.Main.run(Main.groovy:10)
  
      at com.neuro.groovyhelloworld.markupbuilderexercise.Main.main(Main.groovy)
  </code></pre>
  <p>My take here is that I'm not adding the dependency in the right way, but I'm a Java developer and dependencies were either what I've done or just relying on Maven/Gradle, so I'm kind of out of ideas here.</p>
  <p>What am I missing?</p>
  <pre><code>  [1]: https://stackoverflow.com/questions/59132101/eclipse-groovy-unable-to-resolve-class
  </code></pre>