title: Why do modules use classes in puppet (instead of defines)
body: <p>I've been creating a couple of classes (in different modules) for puppet. Both, separately, require maven. So both classes have something like the following:</p>
  
  <pre><code>    class { "maven::maven":
          version =&gt; "3.0.5"
      }
  </code></pre>
  
  <p>(using the <a href="https://forge.puppetlabs.com/maestrodev/maven" rel="noreferrer">https://forge.puppetlabs.com/maestrodev/maven</a> module from puppet forge)</p>
  
  <p>But, if I have one node that has both of my classes, puppet complains because class 'maven::maven' is declared twice. I feel like each of my classes should be free to declare all of the things it needs. If a node has more than one class both of which require maven, then I don't see the problem.</p>
  
  <p>So, my question is: was the author of that maven module wrong to use a class, should he have used a define instead? (because you can use/call/whatever a define multiple times). It appears that if he had used a define I would be able to have the block of code as many times as I like, so if he was right to use a class, why?</p>
  
  <p>Thanks.</p>