title: Maven, exclude all classes but one under a package
body: <p>This may sound silly, but I really want to know if I can do that (by adding some 'magic' configuration in pom.xml).</p>
  
  <p>Let's say, I have a project which has a bunch of packages, one of them, say  'com.foo.bar', has quite a few .java files, including one named 'Dummy.java'. </p>
  
  <p>Now, when generating the jar file, I want to exclude all classes under com.foo.bar, except the 'Dummy'.</p>
  
  <p>I tried regular expression in a  section, but no luck. </p>
  
  <p>Is there an easy way to go? Many thanks.</p>