SonarQube does not show imported rules in quality profile
<p>I'm trying to import rules (for Java and other languages) from a .xml file to SonarQube. I've used an exemple plugin to do so. That sample was downloaded from <a href="https://github.com/SonarSource/sonar-examples" rel="nofollow">https://github.com/SonarSource/sonar-examples</a> - project <em>sonar-reference-plugin</em>.
The quality profile is indeed created but doesn't show any rules on it.
<a href="http://i.stack.imgur.com/MLeVC.jpg" rel="nofollow">(screen image SonarQube profile page)</a></p>

<p>This is the Override method where it supposedly would load the rules, by using the <em>RulesDefinitionXmlLoader class</em>:</p>

<pre><code>private void defineRulesForLanguage(Context context, String repositoryKey, String repositoryName, String languageKey) {
     NewRepository repository = context.createRepository(repositoryKey, languageKey).setName(repositoryName);

    InputStream rulesXml = this.getClass().getResourceAsStream("/resources/rules-TESTE.xml");
    if (rulesXml != null) {
      RulesDefinitionXmlLoader rulesLoader = new RulesDefinitionXmlLoader();
      rulesLoader.load(repository, rulesXml, StandardCharsets.UTF_8.name());
    }

    repository.done();
  }

  @Override
  public void define(Context context) {
    String repositoryKey = FooLintRulesDefinition.getRepositoryKeyForLanguage(FooLanguage.KEY);
    String repositoryName = FooLintRulesDefinition.getRepositoryNameForLanguage(FooLanguage.KEY);
    defineRulesForLanguage(context, repositoryKey, repositoryName, FooLanguage.KEY);
  }
</code></pre>

<p>I have already tried different paths to the .xml file containing the rules in order to outwit any possible issues. That .xml file looks like this right now (also it is now very simple and has only one rule to make it easier to apply):</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;

&lt;rules&gt;
  &lt;rule&gt;
    &lt;key&gt;da-rule-key&lt;/key&gt;
    &lt;name&gt;Nome da regra&lt;/name&gt;
  &lt;/rule&gt;
&lt;/rules&gt;
</code></pre>

<p>I'm using local SonarQube 5.3 but I've unsuccessfully tried different versions.
Thanks in advance.</p>