-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
2
-
Severity 3 - Minor
-
9
-
Summary
Running atlas-create-bitbucket-plugin and subsequently atlas-integration-test fails on MyComponentWiredTest.
Atlassian SDK installed from the https://packages.atlassian.com/atlassian-sdk-deb
Environment
Ubuntu 17.10.1
atlas-version ATLAS Version: 6.3.10 ATLAS Home: /usr/share/atlassian-plugin-sdk-6.3.10 ATLAS Scripts: /usr/share/atlassian-plugin-sdk-6.3.10/bin ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-6.3.10/apache-maven-3.2.1 AMPS Version: 6.3.15 -------- Executing: /usr/share/atlassian-plugin-sdk-6.3.10/apache-maven-3.2.1/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-6.3.10/apache-maven-3.2.1/conf/settings.xml OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00) Maven home: /usr/share/atlassian-plugin-sdk-6.3.10/apache-maven-3.2.1 Java version: 1.8.0_162, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.13.0-39-generic", arch: "amd64", family: "unix"
Steps to Reproduce
- Install Atlassian SDK from https://packages.atlassian.com/atlassian-sdk-deb to Ubuntu 17.10 with openjdk-8-jdk
- Create plugin base: atlas-create-bitbucket-plugin
- Run the integration test atlas-integration-test
Expected Results
Tests are successfully passed
Actual Results
The tests build failed and the following exception is shown:
java.lang.NoClassDefFoundError: org/junit/internal/runners/rules/RuleFieldValidator at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.collectInitializationErrors(AtlassianPluginsTestRunner.java:156) at org.junit.runners.ParentRunner.validate(ParentRunner.java:416) at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84) at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65) at com.atlassian.plugins.osgi.test.AtlassianPluginsTestRunner.<init>(AtlassianPluginsTestRunner.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:250) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: java.lang.ClassNotFoundException: org.junit.internal.runners.rules.RuleFieldValidator at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 27 more
Form Name |
---|
AMPS 8 paired with Bitbucket Server 6.0.0+ fixes this issue. Creating a Bitbucket plugin using atlas-create-bitbucket-plugin should now result in a plugin that builds without issue and runs all tests without failures.
Upgrading to AMPS 8 with Bitbucket Server 5.x releases may generate a plugin that builds and tests without issue, but it may not. (Bitbucket Server 6 includes many library upgrades that are relevant to this issue.)
Upgrading to Bitbucket Server 6 with any previous version of AMPS will still result in generated plugins that fail to build and run their tests. (For compatibility reasons with other Atlassian Server products, it's not possible to apply the necessary fix in an AMPS 6.x patch release.)