It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
  • Community
  • Answers Developer Questions
  • Questions
  • The plugin key '${project.groupId}.${project.artifactId}-tests' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header

The plugin key '${project.groupId}.${project.artifactId}-tests' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header

I am trying to follow the example given at Compilation seems to be ok, but when I try to run I get the following error:

[INFO] [talledLocalContainer] INFO: Initializing Spring root WebApplicationContext
[INFO] [talledLocalContainer] 2013-06-18 12:54:49,941 INFO  [localhost-startStop-1]  c.a.s.i.server.BuildInfoLogger Starting Stash 2.5.0 (9e87d57 built on Mon Jun 10 21:02:40 CEST 2013)
[INFO] [talledLocalContainer] 2013-06-18 12:54:50,650 INFO  [localhost-startStop-1]  c.a.s.i.server.BuildInfoLogger JVM: Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM 1.6.0_43-b01
[INFO] [talledLocalContainer] 2013-06-18 12:54:52,983 INFO  [localhost-startStop-1]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /work/2013/atlassian/stash_plugin/plugin-example/target/stash/home for 9741@jobbpc.bitfrost
[INFO] [talledLocalContainer] 2013-06-18 12:54:54,915 WARN  [localhost-startStop-1]  com.jolbox.bonecp.BoneCPConfig JDBC password not set in driver properties, copying it from pool config
[INFO] [talledLocalContainer] 2013-06-18 12:55:13,495 INFO  [localhost-startStop-1]  com.atlassian.stash Switching to log level [DEBUG]
[INFO] [talledLocalContainer] 2013-06-18 12:55:13,530 DEBUG [localhost-startStop-1]  c.a.s.i.t.SemaphoreThrottleService Configured resource [scm-hosting] with 6 tickets and an acquire timeout of 300 s
[INFO] [talledLocalContainer] 2013-06-18 12:55:13,534 DEBUG [localhost-startStop-1]  c.a.s.i.t.SemaphoreThrottleService Configured resource [scm-command] with 25 tickets and an acquire timeout of 2 s
[INFO] [talledLocalContainer] 2013-06-18 12:55:13,635 DEBUG [localhost-startStop-1]  c.a.s.i.avatar.DiskAvatarRepository Not purging temporary avatars; /work/2013/atlassian/stash_plugin/plugin-example/target/stash/home/data/avatars/tmp does not exist
[INFO] [talledLocalContainer] 2013-06-18 12:55:16,411 INFO  [localhost-startStop-1]  c.a.s.i.hook.DefaultHookService Hook callback socket listening on
[INFO] [talledLocalContainer] 2013-06-18 12:55:18,442 DEBUG [localhost-startStop-1]  c.a.s.i.i.ChangesetIndexingScheduler Starting changeset indexing thread pool with a maximum of 2 threads
[INFO] [talledLocalContainer] 2013-06-18 12:55:28,469 WARN  [localhost-startStop-1]  c.a.p.o.f.t.s.ScanDescriptorForHostClassesStage The plugin 'atlassian-universal-plugin-manager-plugin-2.11.1.jar' uses a package 'org.apache.commons.fileupload.servlet' that is also exported by the application.  It is highly recommended that the plugin use its own packages.
[INFO] [talledLocalContainer] 2013-06-18 12:55:34,985 ERROR [localhost-startStop-1]  o.s.web.context.ContextLoader Context initialization failed
[INFO] [talledLocalContainer] java.lang.IllegalArgumentException: The plugin key '${project.groupId}.${project.artifactId}-tests' must either match the OSGi bundle symbolic name (Bundle-SymbolicName) or be specified in the Atlassian-Plugin-Key manifest header
[INFO] [talledLocalContainer]   at com.atlassian.plugin.osgi.factory.OsgiPluginUninstalledHelper.install( ~[atlassian-plugins-osgi-3.0.0-m34.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.plugin.osgi.factory.OsgiPlugin.installInternal( ~[atlassian-plugins-osgi-3.0.0-m34.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.plugin.impl.AbstractPlugin.install( ~[atlassian-plugins-core-3.0.0-m34.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins( ~[atlassian-plugins-core-3.0.0-m34.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.plugin.manager.DefaultPluginManager.init( ~[atlassian-plugins-core-3.0.0-m34.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.plugin.CorePluginManager.onApplicationEvent( ~[stash-platform-2.5.0.jar:na]
[INFO] [talledLocalContainer]   at com.atlassian.stash.internal.plugin.CorePluginManager.onApplicationEvent( ~[stash-platform-2.5.0.jar:na]
[INFO] [talledLocalContainer]   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent( ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext( ~[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at org.springframework.web.context.ContextLoader.initWebApplicationContext( ~[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at com.atlassian.johnson.spring.web.context.JohnsonContextLoaderListener.initWebApplicationContext( [atlassian-johnson-spring-2.1.0.jar:na]
[INFO] [talledLocalContainer]   at org.springframework.web.context.ContextLoaderListener.contextInitialized( [spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
[INFO] [talledLocalContainer]   at org.apache.catalina.core.StandardContext.listenerStart( [catalina.jar:7.0.40]

Searching for the string "must either match the OSGi bundle symbolic name" on google only gives 8 references, all to pages at (one Following all of those did not make me much wiser, only that the issue could perhaps be related to less common java versions like IBM's JDK. I am running Fedora 17 with the default java-1.7.0-openjdk- package, but I also downloaded the latest java 6 sdk from Oracle and used that.

export JAVA_HOME

export PATH

This made no difference.

I have made the following changes to the code base:

$ git log --oneline 
22d5a90 Update according to
fab8cb1 Add project.groupId and project.artifactId properties
6eaa59e Specify resource text encoding
7706f90 Ran atlas-create-stash-plugin-module
9626676 Ran atlas-create-stash-plugin
4eb2a4c initial commit

The Initial commit is just a .gitignore file added, and here are full details for the other changes (excluding the generated code):

$ git log --oneline -p 7706f90..22d5a90
22d5a90 Update according to
diff --git a/src/main/java/com/mycompany/stash/plugin/hook/ b/src/main/java/com/mycompany/stash/plugin/hook/
index a57b4b9..9ae09f9 100644
--- a/src/main/java/com/mycompany/stash/plugin/hook/
+++ b/src/main/java/com/mycompany/stash/plugin/hook/
@@ -4,21 +4,28 @@ import com.atlassian.stash.hook.*;
 import com.atlassian.stash.hook.repository.*;
 import com.atlassian.stash.repository.*;
 import java.util.Collection;
+import java.util.Calendar;
+ * Prevent pushes after 5pm on a Friday
+ */
 public class BeerOClockHook implements PreReceiveRepositoryHook
-    /**
-     * Disables deletion of branches
-     */
     public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
         for (RefChange refChange : refChanges)
-            if (refChange.getType() == RefChangeType.DELETE)
+            // check if master is being updated
+            if ("refs/heads/master".equals(refChange.getRefId()))
-                hookResponse.err().println("The ref '" + refChange.getRefId() + "' cannot be deleted.");
-                return false;
+                // if it's after 5pm on a friday (Beer O'Clock), prevent the push
+                Calendar now = Calendar.getInstance();
+                if (now.get(Calendar.DAY_OF_WEEK) == Calendar.FRIDAY && now.get(Calendar.HOUR_OF_DAY) >= 17) {
+                    hookResponse.err().println("Pushing to master is *not allowed* after beer o'clock!");
+                    return false;
+                }
+                break;
         return true;
fab8cb1 Add project.groupId and project.artifactId properties
diff --git a/pom.xml b/pom.xml
index 8b2b834..7892f7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -109,6 +109,10 @@
+        <project.groupId>com.mycompany.stash.plugin</project.groupId>
+        <project.artifactId>my-fun-plugin</project.artifactId>
6eaa59e Specify resource text encoding
diff --git a/pom.xml b/pom.xml
index 53df00a..8b2b834 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,6 +108,7 @@
+        <>UTF-8</>

The file target/test-classes/META-INF/MANIFEST.MF contains the following

Manifest-Version: 1.0
Bundle-Version: 1.0
Bundle-Name: my-fun-plugin-1.0-SNAPSHOT-tests
DynamicImport-Package: *

and "${project.groupId}.${project.artifactId}-tests" is not equal to "" which osgi understandably complains about. But obviously the variables should somehow have been expanded by something (maven?).

Adding project.groupId and project.artifactId as properties (suggested by one of my collueages) did not make any difference.

So what do I have to do to get the local stash instance running without problems?


The original generated pom.xml containen


Changing to version 2.2.0 (as used by or 2.4.1 (which is the version our company is using) made the problem go away. So apparently the problem described above is specific to stash version 2.5.0 only.

1 answer

1 accepted

4 votes
Answer accepted

Hi Håkon,

Sorry for the delay and thanks for reporting the issue with so much detail. It appears something has changed between 2.4.x and 2.5.0 (most likely AMPS). The good news is there is a simple fix, by removing the src/test/resources/atlassian-plugin.xml (and maybe cleaning the target directory) the issue goes away. See here for more details.

As mentioned on that page I will raise an issue internally and we will investigate further.


Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Thursday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

113 views 0 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you