I have just experienced this same error.
Based on previous answers, I found the another root cause.
I have 2 plugins : PluginA and PluginB.
The pluginA provides a class plugina.ClassA correctly declared in its atlassian-plugin.xml with as public component.
The pluginB requires this Component plugina.ClassA of pluginA and has a valid reference with in its atlassian-plugin.xml.
The related error "[c.a.p.osgi.factory.OsgiPlugin] Plugin 'pluginB' never resolved service '&ClassA' with filter '(&(objectClass=plugina.ClassA)(objectClass=plugina.ClassA))'" is also occurring.
The root cause was not in the atlassian-plugin.xml declaration, but in the POM file.
In Plugin B, I have declared the dependency on Plugin A as follow
<dependency>
<groupId>com.company</groupId>
<artifactId>jira-plugin-a</artifactId>
<version>${company.plugina.version}</version>
</dependency>
Without specifying the scope provided , the code of pluginA was embedded in pluginB.
The scope is required ...
<dependency>
<groupId>com.company</groupId>
<artifactId>jira-plugin-a</artifactId>
<version>${company.plugina.version}</version>
<scope>provided</scope>
</dependency>
Take care too with your dependencies.