title: Exclude class from sonar qube coverage with attribute java
body: <p>There is way to exclude class from coverage by attribute in java?</p>
  <p>In C# I can use [ExcludeFromCodeCoverage].</p>
  <p>In java I am trying:</p>
  <pre><code>@Retention(RetentionPolicy.CLASS)
  public @interface ExcludeFromCodeCoverage  {
  }
  </code></pre>
  <p>and use @ExcludeFromCodeCoverage for class which I want exclude. But it don't work.</p>
  <p>I saw solution to add properties to pom.xml:</p>
  <pre><code>&lt;properties&gt;
      &lt;sonar.coverage.exclusions&gt;foo/**/*,**/bar/* 
      &lt;/sonar.coverage.exclusions&gt;
  &lt;/properties&gt;
  </code></pre>
  <p>but for me it don't look good. I have some files which are models from my database. And I don't need test it.</p>