I've been having some issues running my tests in the plugin test console. I'm getting a "No runnable methods" exception, but the unit and integration tests run fine outside of the plugin test console.
I've been able to recreate the problem by creating a new plugin using atlas-create-jira-plugin, setting the JIRA version to 6.0 and adding the jira-testkit-client dependency. I don't even need to use anything from the jira-testkit-client for this issue to pop up. I don't see any exceptions in the output from atlas-debug.
The pom.xml looks like this, the rest of the files remain the same as atlas-create-jira-plugin created them:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>plugin.test</groupId> <artifactId>consoletest</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Example Company</name> <url>http://www.example.com/</url> </organization> <name>consoletest</name> <description>This is the plugin.test:consoletest plugin for Atlassian JIRA.</description> <packaging>atlassian-plugin</packaging> <dependencies> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-api</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. --> <!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x --> <!-- <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.2-atlassian-1</version> </dependency> <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId> <version>${testkit.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> <properties> <jira.version>6.0</jira.version> <amps.version>4.2.3</amps.version> <plugin.testrunner.version>1.1.1</plugin.testrunner.version> <testkit.version>6.0.29</testkit.version> </properties> </project>
Without the testkit dependency, the plugin test console runs the tests just fine.
The same issue occurs when I include jira-func-tests or jira-func-test-basics dependencies, probably because they both depend on jira-testkit-client.
Community moderators have prevented the ability to post new answers.
Sander,
yea, this annoying problem blocked me for waaay too long recently. The problem is that testkit bundles junit-dep, and everything else pretty much brings junit to the testing party.
So, what happens is the following(and if I sould like I know WTF I'm talking about that's just an illusion):
the junit bundle gets loaded and it builds a hash of every annotation it's going to look for in your test classes (size = 5, number of elements = 5)
the junit-dep bundle gets loaded by a different classloader and it injects junit.TestClass into test
Junit, seeing (what to it is a) new annotation adds the 'junit.TestClass' class to it's hashset. Not the hashset has size=6, number of elements 5 - the second classloader loading junit.TestClass not only hosed the hashset of annotations, it ensured that no test would ever be found 'runnable' as they all have to be annotated by a class of the same name but, since it was loaded by another classloader, can never be equal.
The fix is easy. just add the following to your testkit-client dependency:
<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit --> <!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit --> <!-- enabling the testkit client causes all tests to have no runnable methods (as far as the test runner is concerned --> <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId> <version>${testkit.version}</version> <scope>test</scope> <exclusions> <exclusion> <artifactId>com.atlassian.jira.tests</artifactId> <groupId>jira-testkit-common</groupId> </exclusion> <exclusion> <artifactId>commons-io</artifactId> <groupId>commons-io</groupId> </exclusion> <exclusion> <artifactId>junit</artifactId> <groupId>junit-dep</groupId> </exclusion> <exclusion> <artifactId>junit</artifactId> <groupId>junit</groupId> </exclusion> <exclusion> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> </exclusion> </exclusions> </dependency>
NOTE: There's a lot more in there than just 'junit-dep' - and I cannot remember currently why I added those others. I know that mvn dependency:tree helped a lot to see what was loading from where and through what other bundle. I built a basic example that's opensourced here:
https://bitbucket.org/capitalplugins/atlassian-marketplace-licensetesting
The best Atlassian supplied example of this is the workflow sharing plugin - get the parent one, also on bitbucket, from here:
https://bitbucket.org/atlassian/jira-workflow-sharing-plugin-parent
I can approve that this method works. Excluding only junit-dep and junit was sufficient in my case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
William,
I'm sorry If I have confused you. When I'm started to investigate "No Runnuble methods.." exception I've found few similar discussions at ansewers.atlassian.comand you was alone person who deeply investigated this issue and explain what to do to avoid exception. As I remember in one topic you've wrote about excluding junit-dep from test plugin building:
<testBundleExcludes> <testBundleExclude> <groupId>atlassian</groupId> </testBundleExclude> <testBundleExclude> <artifactId>junit</artifactId> <groupId>junit</groupId> </testBundleExclude> <testBundleExclude> <groupId>junit</groupId> <artifactId>junit-dep</artifactId> </testBundleExclude> </testBundleExcludes>
This worked for me, but after upgrade to 5.0.4 I found the same "No runnable methods" with old code. So, I've excluded junit and junit-dep from atlassian-plugins-osgi-testrunner (not from testkit) similar to your reccomendation:
<dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> <exclusions> <exclusion> <artifactId>junit</artifactId> <groupId>junit</groupId> </exclusion> <exclusion> <artifactId>junit</artifactId> <groupId>junit-dep</groupId> </exclusion> </exclusions> </dependency>
I don't know why but it wasn't helped me. Then I've changed junit dependency scope from test to provided and...oh! it's working!
And as conclusion I've decided to post my working pom.xml here to help someone else.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi William
Looks like I have the same issue. Your solution worked for me when I've used AMPS 4.2.10 but after upgrade to 5.0.4 I got troubles again... After my long investigation I've excluded junit-dep and junit evrywhere and marked junit dependency as provided and now it's works fine.
My pom.xml:
<dependencies> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-api</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>provided</scope> </dependency> <!-- WIRED TEST RUNNER DEPENDENCIES --> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> <exclusions> <exclusion> <artifactId>junit</artifactId> <groupId>junit</groupId> </exclusion> <exclusion> <artifactId>junit</artifactId> <groupId>junit-dep</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.2.2-atlassian-1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.activeobjects</groupId> <artifactId>activeobjects-plugin</artifactId> <version>${ao.version}</version> <scope>provided</scope> </dependency> </dependencies> <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <testResources> <testResource> <directory>src/test/resources</directory> </testResource> <testResource> <directory>src/test/xml</directory> <targetPath>xml</targetPath> </testResource> </testResources> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <containerId>${tomcat.container.id}</containerId> <useFastdevCli>false</useFastdevCli> <testBundleExcludes> <testBundleExclude> <groupId>atlassian</groupId> </testBundleExclude> <testBundleExclude> <artifactId>junit</artifactId> <groupId>junit</groupId> </testBundleExclude> <testBundleExclude> <groupId>junit</groupId> <artifactId>junit-dep</artifactId> </testBundleExclude> </testBundleExcludes> <testGroups> <testGroup> <id>wired-integration</id> <productIds> <productId>jira</productId> </productIds> <includes> <include>it/**/*WiredTest.java</include> </includes> </testGroup> </testGroups> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <!--Workaround to avoid atlas-run failure--> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-amps-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> </plugin> </plugins> </build> <properties> <jira.version>6.2.6</jira.version> <amps.version>5.0.4</amps.version> <ao.version>0.23.2</ao.version> <plugin.testrunner.version>1.2.2</plugin.testrunner.version> <tomcat.container.id>tomcat7x</tomcat.container.id> <maven-dependency-plugin-version>2.8</maven-dependency-plugin-version> </properties>
I hope it should help someone more.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dmitriy,
Could you be more specific as to what you had to modify to enable the testing with TestKit in AMPS 5.0.4? Or include the output from a diff between the versions? All I can see is that you blocked junit and junit-deps with extreme prejudice - which is what I thought you had to do with 4.2.10 to get it working consistently.
Thanks!
-wc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
William,
Here's my dependency tree:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ employee-skills --- [INFO] com.jira.skills:employee-skills:atlassian-plugin:1.0.20140826-1116 [INFO] +- com.atlassian.jira:jira-api:jar:6.2.6:provided [INFO] | +- com.atlassian.annotations:atlassian-annotations:jar:0.9:provided [INFO] | +- com.atlassian.ofbiz:entityengine-share:jar:1.0.55:provided [INFO] | +- com.atlassian.ofbiz:entityengine:jar:1.0.55:provided [INFO] | | +- org.weakref:jmxutils:jar:1.8:provided [INFO] | | \- net.ju-n.commons-dbcp-jmx:commons-dbcp-jmx-jdbc4:jar:0.2:provided [INFO] | +- opensymphony:webwork:jar:1.4-atlassian-30:provided [INFO] | | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided [INFO] | +- webwork:pell-multipart-request:jar:1.31.0:provided [INFO] | +- org.apache.lucene:lucene-core:jar:3.3.0:provided [INFO] | +- com.atlassian.core:atlassian-core:jar:4.6.15:provided [INFO] | | +- org.apache.sanselan:sanselan:jar:0.97-incubator:provided [INFO] | | +- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided [INFO] | | \- javax.media:jai-core:jar:1.1.3:provided [INFO] | +- com.atlassian.extras:atlassian-extras:jar:2.2.2:provided [INFO] | +- com.atlassian.velocity:atlassian-velocity:jar:1.3:provided [INFO] | +- osworkflow:osworkflow:jar:2.8.1:provided [INFO] | +- opensymphony:propertyset:jar:1.5:provided [INFO] | +- com.atlassian.cache:atlassian-cache-api:jar:2.0.8:provided [INFO] | +- com.atlassian.crowd:embedded-crowd-api:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | | +- org.apache.commons:commons-lang3:jar:3.1:provided [INFO] | | \- com.google.code.findbugs:jsr305:jar:2.0.2:provided [INFO] | +- com.google.guava:guava:jar:10.0.1:provided [INFO] | +- com.atlassian.fugue:fugue:jar:1.1:provided [INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.1:provided [INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.1:provided [INFO] | +- com.atlassian.mail:atlassian-mail:jar:2.5.0:provided [INFO] | +- oro:oro:jar:2.0.7:provided [INFO] | +- atlassian-bandana:atlassian-bandana:jar:0.1.13:provided [INFO] | +- com.atlassian.threadlocal:atlassian-threadlocal:jar:1.3:provided [INFO] | +- com.atlassian.applinks:applinks-api:jar:4.1.1:provided [INFO] | +- com.atlassian.velocity.htmlsafe:velocity-htmlsafe:jar:1.2.1-m2:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment:jar:3.0.0-m9:provided [INFO] | +- jfree:jfreechart:jar:1.0.13:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource:jar:3.0.0-m24:provided [INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-common:jar:3.0.0:provided [INFO] | | \- com.atlassian.plugins:atlassian-plugins-webresource-api:jar:3.0.0-m24:provided [INFO] | +- jfree:jcommon:jar:1.0.8:provided [INFO] | +- com.atlassian.sal:sal-api:jar:2.10.11:provided [INFO] | +- com.atlassian.gadgets:atlassian-gadgets-api:jar:3.3.4:provided [INFO] | +- com.atlassian.johnson:atlassian-johnson:jar:1.1.2:provided [INFO] | +- joda-time:joda-time:jar:2.3:provided [INFO] | +- commons-lang:commons-lang:jar:2.6:provided [INFO] | +- commons-io:commons-io:jar:1.4:provided [INFO] | +- commons-httpclient:commons-httpclient:jar:3.0.1:provided [INFO] | +- log4j:log4j:jar:1.2.16:provided [INFO] | +- org.slf4j:slf4j-api:jar:1.6.4:provided [INFO] | +- quartz:quartz:jar:1.5.1-atlassian-2:provided [INFO] | +- com.atlassian.profiling:atlassian-profiling:jar:1.9:provided [INFO] | +- com.atlassian.analytics:analytics-api:jar:2.28:provided [INFO] | \- javax.servlet:servlet-api:jar:2.4:provided [INFO] +- com.atlassian.jira:jira-core:jar:6.2.6:provided [INFO] | +- com.atlassian.crowd:embedded-crowd-core:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:embedded-crowd-spi:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-api:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-server-api:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-core:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | | +- net.sf.ehcache:ehcache:jar:2.7.5:provided [INFO] | | \- org.springframework:spring-context-support:jar:3.2.5.RELEASE:provided [INFO] | +- com.atlassian.crowd:crowd-integration-api:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-integration-client-rest:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | | \- com.atlassian.crowd:crowd-integration-client-common:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-persistence:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-events:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-ldap:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-remote:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-server-common:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.crowd:crowd-password-encoders:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- com.atlassian.ip:atlassian-ip:jar:3.0:provided [INFO] | +- com.atlassian.security:atlassian-password-encoder:jar:3.2.1:provided [INFO] | +- com.atlassian.security:atlassian-secure-utils:jar:3.2.1:provided [INFO] | +- org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:provided [INFO] | | +- aopalliance:aopalliance:jar:1.0:provided [INFO] | | \- org.springframework.security:spring-security-crypto:jar:3.1.0.RELEASE:provided [INFO] | +- org.springframework:spring-core:jar:2.5.6.SEC01:provided [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:provided [INFO] | +- org.springframework:spring-beans:jar:2.5.6.SEC01:provided [INFO] | +- org.springframework.ldap:spring-ldap-core:jar:1.3.1.RELEASE:provided [INFO] | +- org.springframework:spring-tx:jar:2.5.6.SEC01:provided [INFO] | +- com.atlassian.crowd:crowd-integration-seraph25:jar:2.8.0-OD-6-JIRA-01:provided [INFO] | +- wsdl4j:wsdl4j:jar:1.6.1:provided [INFO] | +- org.codehaus.xfire:xfire-core:jar:1.2.6:provided [INFO] | +- org.codehaus.xfire:xfire-aegis:jar:1.2.6:provided [INFO] | +- com.atlassian.soy:soy-template-renderer-api:jar:2.1.1:provided [INFO] | +- com.atlassian.sal:sal-spi:jar:2.10.11:provided [INFO] | +- com.atlassian.aui:auiplugin-spi:jar:5.3.5:provided [INFO] | +- com.atlassian.gadgets:atlassian-gadgets-spi:jar:3.3.4:provided [INFO] | | \- net.jcip:jcip-annotations:jar:1.0:provided [INFO] | +- com.atlassian.oauth:atlassian-oauth-api:jar:1.9.0-m3:provided [INFO] | +- com.atlassian.p4package:atlassian-p4package:jar:2007.12.14:provided [INFO] | +- com.atlassian.cache:atlassian-cache-ehcache:jar:2.0.8:provided [INFO] | | \- com.atlassian.cache:atlassian-cache-common-impl:jar:2.0.8:provided [INFO] | +- com.atlassian.cache:atlassian-cache-memory:jar:2.0.8:provided [INFO] | +- com.atlassian.config:atlassian-config:jar:0.15:provided [INFO] | | \- com.atlassian.spring:atlassian-spring:jar:1.1:provided [INFO] | | +- org.springframework:spring-hibernate2:jar:2.0.6:provided [INFO] | | | +- org.springframework:spring-dao:jar:2.0.6:provided [INFO] | | | \- org.springframework:spring-jdbc:jar:2.0.6:provided [INFO] | | \- hibernate:hibernate:jar:2.1.8-atlassian:provided [INFO] | +- com.sun:jai_core:jar:1.1.3:provided [INFO] | +- com.sun:jai_codec:jar:1.1.3:provided [INFO] | +- commons-collections:commons-collections:jar:3.2.1:provided [INFO] | +- com.atlassian.activeobjects:activeobjects-spi:jar:0.23.2:provided [INFO] | +- dom4j:dom4j:jar:1.4:provided [INFO] | +- com.atlassian.util.concurrent:atlassian-util-concurrent:jar:2.4.1:provided [INFO] | +- com.atlassian.instrumentation:atlassian-instrumentation-core:jar:1.7.1:provided [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.6.4:provided [INFO] | +- org.slf4j:jul-to-slf4j:jar:1.6.4:provided [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.6.4:provided [INFO] | +- atlassian-logging:atlassian-logging:jar:1.1:provided [INFO] | +- com.atlassian.jdk.utilities:atlassian-jdk-utilities:jar:0.4:provided [INFO] | +- com.atlassian.scheduler:atlassian-scheduler:jar:0.15-alpha4:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-core:jar:3.0.12:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-schema:jar:3.0.12:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-servlet:jar:3.0.12:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-osgi:jar:3.0.12:provided [INFO] | | +- biz.aQute:bndlib:jar:1.43.0-atlassian-1:provided [INFO] | | +- org.apache.felix:org.apache.felix.framework:jar:3.0.2:provided [INFO] | | \- org.twdata.pkgscanner:package-scanner:jar:0.9.5:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-osgi-events:jar:3.0.12:provided [INFO] | +- com.atlassian.plugins:atlassian-plugins-eventlistener:jar:3.0.12:provided [INFO] | +- com.atlassian.seraph:atlassian-seraph:jar:2.6.0:provided [INFO] | | \- com.atlassian.security:atlassian-cookie-tools:jar:2.0:provided [INFO] | +- com.atlassian.security:atlassian-secure-random:jar:3.2.1:provided [INFO] | +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-core:jar:3.0.6:provided [INFO] | +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-seraph-integration:jar:3.0.6:provided [INFO] | +- org.bouncycastle:bcprov-jdk15on:jar:1.50:provided [INFO] | +- com.atlassian.renderer:atlassian-renderer:jar:8.0.5:provided [INFO] | +- com.atlassian.gzipfilter:atlassian-gzipfilter:jar:1.17:provided [INFO] | | \- com.atlassian.gzipfilter:atlassian-flushable-gzipoutputstream:jar:1.1:provided [INFO] | +- com.atlassian.event:atlassian-event:jar:2.3.0:provided [INFO] | +- opensymphony:oscore:jar:2.2.7-atlassian-1:provided [INFO] | +- opensymphony:sitemesh:jar:2.5-atlassian-10:provided [INFO] | +- commons-digester:commons-digester:jar:1.4.1:provided [INFO] | +- commons-beanutils:commons-beanutils:jar:1.6.1:provided [INFO] | +- commons-configuration:commons-configuration:jar:1.0:provided [INFO] | +- org.apache.lucene:lucene-analyzers:jar:3.3.0:provided [INFO] | +- com.atlassian:lucene-extras:jar:3.3.0-atlassian-3:provided [INFO] | +- org.apache.velocity:velocity:jar:1.6.4-atlassian-5:provided [INFO] | +- org.apache.velocity:velocity-tools:jar:1.3:provided [INFO] | +- javax.activation:activation:jar:1.1.1:provided [INFO] | +- javax.mail:mail:jar:1.4.5:provided [INFO] | +- glue:glue:jar:5.0b2:provided [INFO] | +- bsf:bsf:jar:2.2:provided [INFO] | +- bsh:bsh:jar:1.2b7:provided [INFO] | +- csv:csv:jar:20:provided [INFO] | +- org.picocontainer:picocontainer:jar:2.14.3:provided [INFO] | +- jzlib:jzlib:jar:1.0.5:provided [INFO] | +- jsch:jsch:jar:0.1.23:provided [INFO] | +- com.octo.captcha:jcaptcha:jar:2.0-alpha-1:provided [INFO] | +- com.octo.captcha:jcaptcha-api:jar:2.0-alpha-1:provided [INFO] | +- com.jhlabs:filters:jar:2.0.235:provided [INFO] | +- commons-dbcp:commons-dbcp:jar:1.4:provided [INFO] | +- commons-pool:commons-pool:jar:1.5.4:provided [INFO] | +- hsqldb:hsqldb:jar:1.8.0.5:provided [INFO] | +- jndi:jndi:jar:1.2.1:provided [INFO] | +- jta:jta:jar:1.0.1:provided [INFO] | +- ots-jts:ots-jts:jar:1.0:provided [INFO] | +- jotm:jotm:jar:1.4.3:provided [INFO] | +- jotm:jotm-jrmp_stubs:jar:1.4.3:provided [INFO] | +- jotm:jotm-iiop_stubs:jar:1.4.3:provided [INFO] | +- jotm:jonas_timer:jar:1.4.3:provided [INFO] | +- jotm:objectweb-datasource:jar:1.4.3:provided [INFO] | +- carol:carol:jar:1.5.2:provided [INFO] | +- carol:carol-properties:jar:1.5.2:provided [INFO] | +- xapool:xapool:jar:1.3.1:provided [INFO] | +- xml-apis:xml-apis:jar:1.3.04:provided [INFO] | +- commons-jelly:commons-jelly:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-junit:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-util:jar:1.1.1:provided [INFO] | +- commons-jelly:commons-jelly-tags-email:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-log:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-http:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-soap:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-sql:jar:1.0:provided [INFO] | +- commons-jelly:commons-jelly-tags-regexp:jar:1.0:provided [INFO] | +- commons-jexl:commons-jexl:jar:1.1:provided [INFO] | +- commons-codec:commons-codec:jar:1.4:provided [INFO] | +- org.apache.commons:commons-compress:jar:1.4:provided [INFO] | | \- org.tukaani:xz:jar:1.0:provided [INFO] | +- xmlrpc:xmlrpc:jar:2.0:provided [INFO] | +- axis:axis:jar:1.3-atlassian-1:provided [INFO] | +- axis:axis-jaxrpc:jar:1.3:provided [INFO] | +- axis:axis-saaj:jar:1.3:provided [INFO] | +- commons-discovery:commons-discovery:jar:0.2:provided [INFO] | +- xerces:xercesImpl:jar:2.9.1:provided [INFO] | +- xalan:xalan:jar:2.7.0:provided [INFO] | +- xml-security:xmlsec:jar:1.4.2:provided [INFO] | +- com.atlassian.security:atlassian-secure-xml:jar:3.0:provided [INFO] | +- datafile:datafile:jar:1.3.3:provided [INFO] | +- xpp3:xpp3:jar:1.1.3.4-RC8:provided [INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided [INFO] | +- org.tuckey:urlrewritefilter:jar:4.0.3:provided [INFO] | +- radeox:radeox:jar:1.0b2-forked-22Apr2004:provided [INFO] | +- jtidy:jtidy:jar:r8-20050104:provided [INFO] | +- jdom:jdom:jar:1.0:provided [INFO] | +- org.jsoup:jsoup:jar:1.3.3:provided [INFO] | +- org.codehaus.woodstox:wstx-asl:jar:3.2.4:provided [INFO] | +- com.atlassian.modzdetector:modz-detector:jar:0.12:provided [INFO] | +- org.antlr:antlr-runtime:jar:3.1.3:provided [INFO] | | \- org.antlr:stringtemplate:jar:3.2:provided [INFO] | | \- antlr:antlr:jar:2.7.7:provided [INFO] | +- commons-jrcs:commons-jrcs:jar:diff-0.1.7:provided [INFO] | +- cglib:cglib-nodep:jar:2.1_3:provided [INFO] | +- com.atlassian.applinks:applinks-spi:jar:4.1.1:provided [INFO] | +- com.atlassian.applinks:applinks-host:jar:4.1.1:provided [INFO] | +- org.mozilla:rhino:jar:1.7R4:provided [INFO] | +- com.atlassian.ozymandias:atlassian-plugin-point-safety:jar:0.7:provided [INFO] | +- commons-validator:commons-validator:jar:1.4.0:provided [INFO] | +- com.atlassian.botocss:botocss-core:jar:4.3:provided [INFO] | | \- net.sourceforge.cssbox:jstyleparser:jar:1.13-atlassian-2:provided [INFO] | \- com.atlassian.json:atlassian-json-api:jar:0.9:provided [INFO] +- junit:junit:jar:4.10:provided [INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:provided [INFO] +- com.atlassian.plugins:atlassian-plugins-osgi-testrunner:jar:1.2.2:test [INFO] | +- org.apache.wink:wink-client:jar:1.1.3-incubating:test [INFO] | | +- org.apache.wink:wink-common:jar:1.1.3-incubating:test [INFO] | | | \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:test [INFO] | | +- javax.xml.bind:jaxb-api:jar:2.2:test [INFO] | | | \- javax.xml.stream:stax-api:jar:1.0-2:test [INFO] | | \- com.sun.xml.bind:jaxb-impl:jar:2.2.1.1:test [INFO] | \- com.atlassian.upm:upm-api:jar:2.15:test [INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:provided [INFO] +- com.google.code.gson:gson:jar:2.2.2-atlassian-1:provided [INFO] \- com.atlassian.activeobjects:activeobjects-plugin:jar:0.23.2:provided [INFO] +- net.java.dev.activeobjects:activeobjects:jar:0.23.2:provided [INFO] +- com.atlassian.activeobjects:activeobjects-core:jar:0.23.2:provided [INFO] +- com.atlassian.activeobjects:activeobjects-dbex:jar:0.23.2:provided [INFO] +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.0:provided [INFO] | \- org.codehaus.woodstox:stax2-api:jar:3.1.0:provided [INFO] \- org.springframework:spring-webmvc:jar:2.5.6:provided [INFO] +- org.springframework:spring-context:jar:2.5.6:provided [INFO] \- org.springframework:spring-web:jar:2.5.6:provided [INFO] ------------------------------------------------------------------------
I'm sorry, but I'm not able to list output of bnd command.
I've just made some manipulations with my pom.xml and found that actually <scope> of junit dependency has no influence on tests. Looks like I didn't make mvn clean before rebuild... Doesn't matter test or provided scope is defined. So, it was misleading..
Thanks for the discussion and sharing your knowledges!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dmitriy,
Thanks for the clarification! So to be sure I understand - you found that adding the exclusions for junit & junit-deps under atlassian-plugins-osgi-testrunner in addition to having the <testBundleExcludes> was not sufficient - you had to also set the junit dependency scope (lines 15-20 of the pom.xml you posted - specifically line 20) to 'test'?
I'd be interested to see where the new junit was getting pulled from - could you run a bundle tree dependencies and also post the output of the bnd command as well (examples below)?
I really appreciate you taking the time to post (and kind words as well) - there is just such a vacumn of intel on troubleshooting these issues.
tree dependency report:
--XAPTED--:wac@xapted:[~/ccc/dev/jira/plugins/atlassian-marketplace-licensetesting] --XAPTED--(08:08:11)--> atlas-mvn dependency:tree Executing: /usr/local/amps-latest/apache-maven/bin/mvn -gs /usr/local/atlassian-plugin-sdk-5.0.4/apache-maven-3.2.1/conf/settings.xml dependency:tree [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building example-license-testing 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ example-license-testing --- [INFO] com.capitalplugins.jira:example-license-testing:atlassian-plugin:1.0.0 [INFO] +- com.atlassian.jira:jira-api:jar:6.3.3:provided [INFO] | +- com.atlassian.annotations:atlassian-annotations:jar:0.14:provided [INFO] | +- com.atlassian.ofbiz:entityengine-share:jar:1.0.56:provided [INFO] | +- com.atlassian.ofbiz:entityengine:jar:1.0.56:provided [INFO] | | +- org.weakref:jmxutils:jar:1.8:provided [INFO] | | \- net.ju-n.commons-dbcp-jmx:commons-dbcp-jmx-jdbc4:jar:0.2:provided [INFO] | +- opensymphony:webwork:jar:1.4-atlassian-30:provided [INFO] | | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided [INFO] | +- webwork:pell-multipart-request:jar:1.31.0:provided [INFO] | +- org.apache.lucene:lucene-core:jar:3.3.0:provided [INFO] | +- com.atlassian.core:atlassian-core:jar:4.6.17:provided [INFO] | | +- org.apache.sanselan:sanselan:jar:0.97-incubator:provided [INFO] | | +- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided <snip>
[INFO] +- com.atlassian.upm:licensing-api:jar:2.13.3:provided [INFO] +- com.atlassian.upm:upm-api:jar:2.13.3:provided [INFO] \- com.atlassian.templaterenderer:atlassian-template-renderer-api:jar:1.4.4-m1:provided [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.716 s [INFO] Finished at: 2014-08-22T08:10:53-06:00 [INFO] Final Memory: 25M/570M [INFO] ------------------------------------------------------------------------
JEEZ - I remember when the code option gave an expandable or set height option - I know it does in confluence - had to cut a lot of the tree out b/c it was over 290 lines.
You can see how it's pretty damn useful though in listing out everything being pulled into your project and where it's coming from. Then there's the bundle output:
bnd output:
--XAPTED--:wac@xapted:[~/ccc/dev/jira/plugins/atlassian-marketplace-licensetesting] --XAPTED--(08:17:42)--> bnd target/example-license-testing-1.0.0.jar [MANIFEST example-license-testing-1.0.0.jar] Archiver-Version Plexus Archiver Atlassian-Build-Date 2014-08-22T08:17:06-0500 Bnd-LastModified 1408713433408 Build-Jdk 1.7.0_65 Built-By wac Bundle-ClassPath .,META-INF/lib/gson-2.2.2-atlassian-1.jar,META-INF/lib/upm-common-2.13.3.jar,META-INF/lib/usercompatibility-sal-0.5.jar,META-INF/lib/plugin-license-storage-lib-2.13.3.jar Bundle-Description This project is a HowTo demonstrating how to integrate the Atlassian Testing Framework into a Marketplace Plugin Paid listing (one that implements the Atlassian Paid License modules). Bundle-DocURL https://capitalplugins.atlassian.net/wiki/display/CP/Capital+Plugins+Home Bundle-ManifestVersion 2 Bundle-Name example-license-testing Bundle-SymbolicName com.capitalplugins.jira.example-license-testing Bundle-Vendor Capital Plugins Bundle-Version 1.0.0 Created-By Apache Maven Bundle Plugin DynamicExport-Package com.atlassian.upm.license.storage.plugin;version="2.13.3",com.atlassian.upm.license.storage.plugin.installer;version="2.13.3", DynamicImport-Package com.atlassian.upm.api.license;version="2.13.3",com.atlassian.upm.api.license.entity;version="2.13.3",com.atlassian.upm.api.util;version="2.13.3",com.atlassian.upm.license.storage.plugin;version="2.13.3",com.atlassian.upm.license.storage.plugin.installer;version="2.13.3", Export-Package com.capitalplugins.jira;uses:="com.atlassian.sal.api";version="1.0.0" Implementation-Branch Implementation-Build Implementation-Revision Implementation-ShortRevision Implementation-Title example-license-testing Implementation-Vendor Capital Plugins Implementation-Vendor-Id com.capitalplugins.jira Implementation-Version 1.0.0 (build ) Import-Package com.atlassian.plugin;resolution:=optional,com.atlassian.sal.api;resolution:=optional,com.atlassian.sal.api.auth;resolution:=optional,com.atlassian.sal.api.lifecycle;resolution:=optional,com.atlassian.sal.api.message;resolution:=optional,com.atlassian.sal.api.pluginsettings;resolution:=optional,com.atlassian.sal.api.scheduling;resolution:=optional,com.atlassian.sal.api.transaction;resolution:=optional,com.atlassian.sal.api.user;resolution:=optional,com.atlassian.templaterenderer;resolution:=optional,com.capitalplugins.jira;resolution:=optional,com.google.common.base;resolution:=optional,com.google.common.collect;resolution:=optional,javax.annotation;resolution:=optional,javax.servlet;resolution:=optional,javax.servlet.http;resolution:=optional,net.jcip.annotations;resolution:=optional,org.apache.commons.codec.digest;resolution:=optional,org.apache.commons.io;resolution:=optional,org.apache.commons.lang;resolution:=optional,org.joda.time;resolution:=optional,org.osgi.framework;resolution:=optional,org.osgi.util.tracker;resolution:=optional,org.slf4j;resolution:=optional,org.springframework.beans;resolution:=optional,org.springframework.beans.factory;resolution:=optional,org.springframework.beans.factory.config;resolution:=optional,org.springframework.context;resolution:=optional Manifest-Version 1.0 Spring-Context *;timeout:=60 Tool Bnd-1.50.0 [IMPEXP] Import-Package com.atlassian.plugin {resolution:=optional} com.atlassian.sal.api {resolution:=optional} com.atlassian.sal.api.auth {resolution:=optional} com.atlassian.sal.api.lifecycle {resolution:=optional} com.atlassian.sal.api.message {resolution:=optional} com.atlassian.sal.api.pluginsettings {resolution:=optional} com.atlassian.sal.api.scheduling {resolution:=optional} com.atlassian.sal.api.transaction {resolution:=optional} com.atlassian.sal.api.user {resolution:=optional} com.atlassian.templaterenderer {resolution:=optional} com.capitalplugins.jira {resolution:=optional} com.google.common.base {resolution:=optional} com.google.common.collect {resolution:=optional} javax.annotation {resolution:=optional} javax.servlet {resolution:=optional} javax.servlet.http {resolution:=optional} net.jcip.annotations {resolution:=optional} org.apache.commons.codec.digest {resolution:=optional} org.apache.commons.io {resolution:=optional} org.apache.commons.lang {resolution:=optional} org.joda.time {resolution:=optional} org.osgi.framework {resolution:=optional} org.osgi.util.tracker {resolution:=optional} org.slf4j {resolution:=optional} org.springframework.beans {resolution:=optional} org.springframework.beans.factory {resolution:=optional} org.springframework.beans.factory.config{resolution:=optional} org.springframework.context {resolution:=optional} Export-Package com.capitalplugins.jira {version=1.0.0} [USES] com.capitalplugins.jira com.atlassian.sal.api com.capitalplugins.jira.license com.atlassian.sal.api com.atlassian.sal.api.auth com.atlassian.sal.api.message com.atlassian.sal.usercompatibility com.atlassian.templaterenderer com.atlassian.upm.api.license.entity com.atlassian.upm.api.util com.atlassian.upm.license.storage.lib com.capitalplugins.jira javax.servlet javax.servlet.http org.apache.commons.lang [USEDBY] com.atlassian.sal.api com.capitalplugins.jira com.capitalplugins.jira.license com.atlassian.sal.api.auth com.capitalplugins.jira.license com.atlassian.sal.api.message com.capitalplugins.jira.license com.atlassian.sal.usercompatibility com.capitalplugins.jira.license com.atlassian.templaterenderer com.capitalplugins.jira.license com.atlassian.upm.api.license.entity com.capitalplugins.jira.license com.atlassian.upm.api.util com.capitalplugins.jira.license com.atlassian.upm.license.storage.lib com.capitalplugins.jira.license com.capitalplugins.jira com.capitalplugins.jira.license javax.servlet com.capitalplugins.jira.license javax.servlet.http com.capitalplugins.jira.license org.apache.commons.lang com.capitalplugins.jira.license [COMPONENTS] [METATYPE] [LIST] atlassian-plugin.xml log4j.properties META-INF MANIFEST.MF META-INF/lib gson-2.2.2-atlassian-1.jar plugin-license-storage-lib-2.13.3.jar upm-common-2.13.3.jar usercompatibility-sal-0.5.jar META-INF/maven META-INF/maven <no contents> META-INF/maven/com.capitalplugins.jira META-INF/maven/com.capitalplugins.jira <no contents> META-INF/maven/com.capitalplugins.jira/example-license-testing pom.properties pom.xml WEB-INF WEB-INF <no contents> WEB-INF/lib plugin-license-storage-plugin-2.13.3.jar com com <no contents> com/capitalplugins com/capitalplugins <no contents> com/capitalplugins/jira MyPluginComponent.class MyPluginComponentImpl.class com/capitalplugins/jira/license MyPluginLicenseServlet.class MyPluginLicenseServletImpl.class css example-license-testing-min.css example-license-testing.css images pluginIcon.png pluginLogo.png js example-license-testing-min.js example-license-testing.js properties properties <no contents> properties/com properties/com <no contents> properties/com/capitalplugins properties/com/capitalplugins <no contents> properties/com/capitalplugins/jira example-license-testing.properties velocity velocity <no contents> velocity/license mylicense-admin.vm
The most interesting parts here are the 'USES' and 'USED BY' sections - these are very useful when debugging OSGI dependency injection issues.
The above examples used the example code I posted to bitbucket showing how to use the dev console with the atlassian marketplace licensing plugin enabled - it's open sourced and available here:
https://bitbucket.org/capitalplugins/atlassian-marketplace-licensetesting
-wc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The same issue occurs when I include jira-func-tests or jira-func-test-basics dependencies, probably because they both depend on jira-testkit-client.
I don't see any exceptions in the output from atlas-debug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.