Hello. Im trying to get my feet into integration testing of jira 5.2 plugins. I am running SDK 4.2 on Open JDK 6. Everything seems to be set up correctly. I can build and run my own jira 5.2 plugins. Now i have a couple of plugins finished and want to write integration tests for them. Therefore i have followed these instructions. https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit
So if i get it right, the first step would be to activate testkit backdoor in the pom. My pom, which was created by sdk and modified by myself, already contained all needed entries and properties to use the testkit. All i had to do is to uncomment it.
<!-- 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 --> <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId> <version>${testkit.version}</version> <scope>test</scope> </dependency> <!-- Uncomment to install TestKit backdoor in JIRA. --> <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> </pluginArtifact> </pluginArtifacts> <!-- TestKit version 5.x for JIRA 5.x, 6.x for JIRA 6.x --> <testkit.version>5.2.26</testkit.version>
Now it seems that maven cannot resolve the dependency for the testkit. Im getting the following output on atlas-run
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) com.atlassian.jira.tests:jira-testkit-client:jar:5.2.26 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.atlassian.jira.tests -DartifactId=jira-testkit-client -Dversion=5.2.26 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.atlassian.jira.tests -DartifactId=jira-testkit-client -Dversion=5.2.26 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) com.bssnsoftware.jira.plugin:vip-fields-plugin:atlassian-plugin:1.0-SNAPSHOT 2) com.atlassian.jira.tests:jira-testkit-client:jar:5.2.26 ---------- 1 required artifact is missing. for artifact: com.bssnsoftware.jira.plugin:vip-fields-plugin:atlassian-plugin:1.0-SNAPSHOT from the specified remote repositories: atlassian-plugin-sdk (file:///usr/share/atlassian-plugin-sdk-4.2.0/repository), central (http://repo1.maven.org/maven2), atlassian-public (https://m2proxy.atlassian.com/repository/public)
This is the output of atlas-version
ATLAS Version: 4.2.0 ATLAS Home: /usr/share/atlassian-plugin-sdk-4.2.0 ATLAS Scripts: /usr/share/atlassian-plugin-sdk-4.2.0/bin ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven -------- Executing: /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven/conf/settings.xml Apache Maven 2.1.0 (r755702; 2009-03-18 20:10:27+0100) Java version: 1.6.0_27 Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "linux" version: "3.8.0-22-generic" arch: "amd64" Family: "unix"
I am not very familiar with maven and dont know much about how it resolves dependecies. Usualy i have just added dependencies that i needed to the pom and didnt care where the ressources actualy came from. However, this time it seems maven fails to find the ressource that i need.
ps: Ive figured that i cannot access https://m2proxy.atlassian.com/repository/public from the browser.
Fixed it.
The problem was in wrong testkit-client version. In my pom i have changed
<testkit.version>5.2.26</testkit.version> in <testkit.version>5.0.27</testkit.version>.
5.2.26 is set by SDK. I have trusted that this was a valid version for atlassian testkit. Checked the atlassian public repository and couldnt find this version there. So decided to pick any version that was present in repository. That fixed the problem.
One more thing to mention. You must have an empty xml folder in your src/test folder if you are using "atlas-integration-test"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what ive found in default .m2/repository
alexej@Alexej-Laptop:~/.m2/repository/com/atlassian/jira/tests/jira-testkit-client/5.2.26$ cat jira-testkit-client-5.2.26.pom.lastUpdated #NOTE: This is an internal implementation file, its format can be changed without prior notice. #Wed May 29 09:14:20 CEST 2013 http\://repo.maven.apache.org/maven2/.lastUpdated=1369811660499 default-file\://${env.ATLAS_HOME}/repository/.lastUpdated=1369811659980 https\://m2proxy.atlassian.com/repository/public/.lastUpdated=1369811659903 http\://repo.maven.apache.org/maven2/.error= https\://m2proxy.atlassian.com/repository/public/.error= file\://${env.ATLAS_HOME}/repository/.error=Could not transfer artifact com.atlassian.jira.tests\:jira-testkit-client\:pom\:5.2.26 from/to atlassian-plugin-sdk (file\://${env.ATLAS_HOME}/repository)\: Repository path /repository does not exist, and cannot be created.
What does it mean? I have no $env.ATLAS_HOME set. Just $ATLAS_HOME which i used to set manually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
correction. i can actualy access that repository from browser. was a typo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.