I am attempting to use the SDK to develop a plugin for stash 2.8.4. However, the atlas-run and atlas-run-standalone commands differ in what version of stash they install, even _with_ the --version command.
stash-run-standalone --product stash --version 2.8.4 starts correctly.
stash-run --product stash --version 2.8.4 does not, and I believe this is because it pulls in stash-1.3.1, /regardless/ of the version passed. (With no --version it should be the most recent, no?).
leskomw at stash-dev in ~/atlas-tutorial/stash-auth-plugin-example[0] $ atlas-run --product stash Executing: /home/leskomw/atlas-sdk/atlassian-plugin-sdk-4.2.10/apache-maven/bin/mvn com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:4.2.10:run -gs /home/leskomw/atlas-sdk/atlassian-plugin-sdk-4.2.10/apache-maven/conf/settings.xml -Dproduct='stash' [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building stash-kerberos [INFO] task-segment: [com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:4.2.10:run] [INFO] ------------------------------------------------------------------------ [INFO] Preparing amps-dispatcher:run [INFO] [stash:copy-bundled-dependencies] [INFO] [dependency:unpack-dependencies] [INFO] [stash:compress-resources] [INFO] Compiling javascript using YUI [INFO] Compressing XML files [INFO] compressing to /home/leskomw/atlas-tutorial/stash-auth-plugin-example/target/classes/atlassian-plugin.xml [INFO] [resources:resources] [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [stash:filter-plugin-descriptor] [INFO] [resources:copy-resources {execution: virtual-execution}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [compiler:compile] [INFO] Compiling 1 source file to /home/leskomw/atlas-tutorial/stash-auth-plugin-example/target/classes [INFO] [stash:generate-manifest] [INFO] No manifest instructions found, adding only non-OSGi manifest attributes [INFO] [stash:generate-rest-docs] [INFO] [resources:testResources] [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/leskomw/atlas-tutorial/stash-auth-plugin-example/src/test/resources [INFO] [amps:filter-test-plugin-descriptor] [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [stash:unit-test] [INFO] surefire unit-test configuration: [INFO] <?xml version="1.0" encoding="UTF-8"?> <configuration> <systemPropertyVariables/> <excludes> <exclude>it/**</exclude> <exclude>**/*$*</exclude> </excludes> <excludedGroups/> </configuration> [INFO] [surefire:test {execution: virtual-execution}] [INFO] No tests to run. [INFO] [stash:validate-manifest] [INFO] Manifest found, validating... [INFO] Manifest validated [INFO] [stash:jar] [INFO] [jar:jar] [INFO] Building jar: /home/leskomw/atlas-tutorial/stash-auth-plugin-example/target/stash-kerberos-1.0-SNAPSHOT.jar [INFO] [build-helper:attach-artifact] [INFO] [stash:generate-obr-artifact] [INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml [INFO] [stash:test-jar] [INFO] [amps-dispatcher:run] [INFO] [stash:run {execution: virtual-execution}] [INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics. [INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml [INFO] Sending event to Google Analytics: AMPS:stash - Run [INFO] [INFO] Starting stash... [INFO] [dependency:copy] [INFO] Configured Artifact: com.atlassian.stash:stash-plugin-test-resources:1.3.1:zip [INFO] Copying stash-plugin-test-resources-1.3.1.zip to /home/leskomw/atlas-tutorial/stash-auth-plugin-example/target/stash/stash-plugin-test-resources.zip [INFO] [dependency:copy {execution: virtual-execution}] [INFO] Configured Artifact: com.atlassian.stash:stash-webapp:1.3.1:war
At which point the application fails to load; first because of "HTTP Status 500 - No WebApplicationContext found: no ContextLoaderListener registered?" error.
Then, if that is fixed as documented here -https://jira.atlassian.com/browse/STASH-2780 - by manually fixing web.xml with:
< <!-- To deal with java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered on MacOS X --> < <listener> < <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> < </listener>
I get a second error one the webapp starts:
A fatal error has occurred
The following problem occurred which prevents Atlassian Stash from starting correctly:
OpenJDK 64-Bit Server VM is an unsupported JVM. Supported platforms.
Despite this page - https://confluence.atlassian.com/display/STASHKB/OpenJDK+64-Bit+Server+VM+is+an+unsupported+JVM- saying that stash-2.5 does use OpenJDK, as well as https://confluence.atlassian.com/display/STASH/Supported+platforms
I think the underlying problem is with the SDK though. Even if I'm fat-fingering the --version option, shouldn't atlas-run default to the latest (2.9) version?
Community moderators have prevented the ability to post new answers.
Looks like you've been talking with Jason about this on the following Stash bug:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The answer is in your pom.xml. When you run stash-run, it mostly looks in your pom.xml. Did you specify the version there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Creating a new, empty project with atlas-create-stash-plugin && atlas-run reproduces this problem. The default pom.xml contains:
<dependencyManagement> <dependencies> <dependency> <groupId>com.atlassian.stash</groupId> <artifactId>stash-parent</artifactId> <version>${stash.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
and atlas-run ends with:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The same error is encountered with atlas-run --product stash --version 2.8.4. Modifying pom.xml to: <dependencymanagement> <dependencies> <dependency> <groupid>com.atlassian.stash</groupid> <artifactid>stash-parent</artifactid> <version>2.8.4</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencymanagement> Succeeds. So I'd say there are two problems here: ${stash.version} is not set by the atlas-run command line. ${stash.version}, when not set, defaults to RELEASE (source: https://developer.atlassian.com/display/DOCS/atlas-run), but RELEASE appears to be defined as stash-1.3.1, not 2.9 or 2.10. It looks like atlas-debug --version *does* work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like this might be a known issue:
https://jira.atlassian.com/browse/STASH-2780
specifically, the Atlassian comment:
Looks like as of 4.0, the test-version argument is deprecated (well ignored actually). You need to use data-version instead.
atlas-run --product stash --version 1.3.0 --data-version 1.3.0
This seems to run fine now. Apparently there is a fix coming in the SDK which selects the last released version, and the data-version should correspond to that.
Though clearly it hasn't yet been fixed in my version of the SDK (4.2.10).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This answers site likes to eat comments, which is annoying. This is out of order but might help someone coming here from Google.
The atlas-run --product --version 2.8.4 command (or atlas-run by itself) fails with:
[INFO] Compiling 2 source files to /home/leskomw/plugindev/demostash/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure /home/leskomw/plugindev/demostash/src/main/java/com/example/MyPluginComponentImpl.java:[3,28] error: package com.atlassian.sal.api does not exist /home/leskomw/plugindev/demostash/src/main/java/com/example/MyPluginComponentImpl.java:[7,18] error: cannot find symbol could not parse error message: symbol: class ApplicationProperties location: class MyPluginComponentImpl /home/leskomw/plugindev/demostash/src/main/java/com/example/MyPluginComponentImpl.java:9: error: cannot find symbol public MyPluginComponentImpl(ApplicationProperties applicationProperties) ^ [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.