Seems I found the cause of the problem and solution.
The cause: when using com.atlassian.bitbucket.web.conditions.IsPersonalRepositoryCondition, the plugin misses com.atlassian.bitbucket.auth.AuthenticationContext in META-INF/plugin-components/imports file. AuthenticationContext is used by the condition class, but its implementation is not found at runtime. When I copied code of IsPersonalRepositoryCondition into the plugin project and annotated it for Spring scanner, AuthenticationContext got annotated with @ComponentImport and therefore Maven plugin added the missing line to imports file.
Solution: adding <component-import> to atlassian-plugin.xml is rejected by Maven plugin. Therefore I added ComponentsImporter class to the project. This class annotates the required components with @ComponentImport and let the generated plugin to include them in imports file. See example