Can't resolve com.atlassian.jira.plugins:jira-plugin-test-resources:zip:2.21.3

Fred Cassirer July 10, 2014

I have been searching for days for the solution to this problem, it just started happening ... I am behind a firewall and we have our own local repo, however, the problem seems to be that the maven build is *somehow* using the refapp version from my pom.xml as a 1 to 1 with the test resource

<properties>
        <refapp.version>2.21.3</refapp.version>
        <amps.version>5.0.3</amps.version>
        <plugin.testrunner.version>1.2.0</plugin.testrunner.version>
    </properties>

This is from a pom.xml that was generated from the sdk refapp plugin. No changes were made.

When trying to build this I get the following (sorry for the lengthy output):

@ atlas-debug --product jira --jvmargs -DskipITs $MAVEN_OPTS 
Executing: /usr/share/atlassian-plugin-sdk-5.0.3/apache-maven-3.2.1/bin/mvn com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:5.0.3:debug -gs /usr/share/atlassian-plugin-sdk-5.0.3/apache-maven-3.2.1/conf/settings.xml -Dproduct='jira' -Djvmargs='-DskipITs' -Dhttp.proxyHost=devproxy.bloomberg.com -Dhttp.proxyPort=82 -Dhttps.proxyHost=devproxy.bloomberg.com -Dhttps.proxyPort=82 -Dhttp.nonProxyHosts="localhost|repo.dev.bloomberg.com|\*.addev.bloomberg.com" -Dcom.sun.net.ssl.checkRevocation=false
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.bloomberg.jira.plugins:drqsgw:atlassian-plugin:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 97, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building drqsgw 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-amps-dispatcher-plugin:5.0.3:debug (default-cli) @ drqsgw >>>
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:copy-bundled-dependencies (default-copy-bundled-dependencies) @ drqsgw ---
[INFO] Unpacking /home/ubuntu/.m2/repository/org/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes with includes "" and excludes "META-INF/MANIFEST.MF,META-INF/*.DSA,META-INF/*.SF"
[INFO] Unpacking /home/ubuntu/.m2/repository/com/google/code/gson/gson/2.2.2-atlassian-1/gson-2.2.2-atlassian-1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes with includes "" and excludes "META-INF/MANIFEST.MF,META-INF/*.DSA,META-INF/*.SF"
[INFO] Unpacking /home/ubuntu/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes with includes "" and excludes "META-INF/MANIFEST.MF,META-INF/*.DSA,META-INF/*.SF"
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:compress-resources (default-compress-resources) @ drqsgw ---
[INFO] Compiling javascript using YUI
[INFO] compressing to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes/js/drqsgw-min.js
[INFO] compressing to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes/css/drqsgw-min.css
[INFO] Compressing XML files
[INFO] compressing to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes/atlassian-plugin.xml
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ drqsgw ---
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:filter-plugin-descriptor (default-filter-plugin-descriptor) @ drqsgw ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ drqsgw ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/classes
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:generate-manifest (default-generate-manifest) @ drqsgw ---
[INFO] No manifest instructions found, adding only non-OSGi manifest attributes
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:generate-rest-docs (default-generate-rest-docs) @ drqsgw ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ drqsgw ---
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:filter-test-plugin-descriptor (default-filter-test-plugin-descriptor) @ drqsgw ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:copy-test-bundled-dependencies (default-copy-test-bundled-dependencies) @ drqsgw ---
[INFO] Copying wink-client-1.1.3-incubating.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/wink-client-1.1.3-incubating.jar
[INFO] Copying gson-2.2.2-atlassian-1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/compile/gson-2.2.2-atlassian-1.jar
[INFO] Copying sal-api-2.7.1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/provided/sal-api-2.7.1.jar
[INFO] Copying activation-1.1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/activation-1.1.jar
[INFO] Copying hamcrest-core-1.1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/hamcrest-core-1.1.jar
[INFO] Copying commons-io-2.4.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/commons-io-2.4.jar
[INFO] Copying wink-common-1.1.3-incubating.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/wink-common-1.1.3-incubating.jar
[INFO] Copying slf4j-api-1.6.4.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/compile/slf4j-api-1.6.4.jar
[INFO] Copying slf4j-simple-1.5.8.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/compile/slf4j-simple-1.5.8.jar
[INFO] Copying atlassian-plugins-osgi-testrunner-1.2.0.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/atlassian-plugins-osgi-testrunner-1.2.0.jar
[INFO] Copying geronimo-annotation_1.1_spec-1.0.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/geronimo-annotation_1.1_spec-1.0.jar
[INFO] Copying jsr311-api-1.1.1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/provided/jsr311-api-1.1.1.jar
[INFO] Copying jaxb-impl-2.2.1.1.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/jaxb-impl-2.2.1.1.jar
[INFO] Copying servlet-api-2.4.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/provided/servlet-api-2.4.jar
[INFO] Copying stax-api-1.0-2.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/stax-api-1.0-2.jar
[INFO] Copying jaxb-api-2.2.jar to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/testlibs/test/jaxb-api-2.2.jar
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ drqsgw ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/test-classes
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:unit-test (default-unit-test) @ drqsgw ---
[INFO] Surefire report directory: /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running ut.com.bloomberg.jira.plugins.MyComponentUnitTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.111 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:generate-test-manifest (default-generate-test-manifest) @ drqsgw ---
[INFO] No manifest instructions found, adding only non-OSGi manifest attributes
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:validate-manifest (default-validate-manifest) @ drqsgw ---
[INFO] Manifest found, validating...
[INFO] Manifest validated
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:jar (default-jar) @ drqsgw ---
[INFO] Building jar: /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/drqsgw-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:generate-obr-artifact (default-generate-obr-artifact) @ drqsgw ---
[INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:validate-test-manifest (default-validate-test-manifest) @ drqsgw ---
[INFO] Manifest found, validating...
[INFO] Manifest validated
[INFO] 
[INFO] --- maven-amps-plugin:5.0.3:test-jar (default-test-jar) @ drqsgw ---
[INFO] found Test: it.com.bloomberg.jira.plugins.MyComponentWiredTest, adding to plugin.xml...
[INFO] Building jar: /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/drqsgw-1.0-SNAPSHOT-tests.jar
[INFO] 
[INFO] <<< maven-amps-dispatcher-plugin:5.0.3:debug (default-cli) @ drqsgw <<<
[INFO] 
[INFO] --- maven-amps-dispatcher-plugin:5.0.3:debug (default-cli) @ drqsgw ---
[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:jira - Debug
[INFO] 
[INFO] Starting jira...
[INFO] Configured Artifact: com.atlassian.jira.plugins:jira-plugin-test-resources:2.21.3:zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.607 s
[INFO] Finished at: 2014-07-11T16:14:26+00:00
[INFO] Final Memory: 32M/78M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:5.0.3:debug (default-cli) on project drqsgw: Unable to execute mojo: Unable to find artifact. Failure to find com.atlassian.jira.plugins:jira-plugin-test-resources:zip:2.21.3 in http://repo.dev.bloomberg.com/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of bb-nexus-mirror has elapsed or updates are forced
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.atlassian.jira.plugins -DartifactId=jira-plugin-test-resources -Dversion=2.21.3 -Dpackaging=zip -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.atlassian.jira.plugins -DartifactId=jira-plugin-test-resources -Dversion=2.21.3 -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] 
[ERROR] com.atlassian.jira.plugins:jira-plugin-test-resources:zip:2.21.3
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] bb-nexus-mirror (http://repo.dev.bloomberg.com/content/groups/public/, releases=true, snapshots=true)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Running this with -X -e, the following (relevant?) snippet:

... <lots of stuff snipped> ...
[INFO] Starting jira...
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-dependency-plugin:2.5.1:copy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-dependency-plugin:2.5.1, parent: sun.misc.Launcher$AppClassLoader@12360be0]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.5.1:copy' with basic configurator -->
[DEBUG]   (s) groupId = com.atlassian.jira.plugins
[DEBUG]   (s) artifactId = jira-plugin-test-resources
[DEBUG]   (s) type = zip
[DEBUG]   (s) version = 2.21.3
[DEBUG]   (s) destFileName = jira-plugin-test-resources.zip
[DEBUG]   (s) artifactItems = [com.atlassian.jira.plugins:jira-plugin-test-resources:2.21.3:zip]
[DEBUG]   (s) outputDirectory = /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/target/jira
[DEBUG]   (s) local =        id: local
      url: file:///home/ubuntu/.m2/repository/
   layout: none

[DEBUG]   (f) outputAbsoluteArtifactFilename = false
[DEBUG]   (s) overWriteIfNewer = true
[DEBUG]   (s) overWriteReleases = false
[DEBUG]   (s) overWriteSnapshots = false
[DEBUG]   (f) reactorProjects = [MavenProject: com.bloomberg.jira.plugins:drqsgw:1.0-SNAPSHOT @ /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/pom.xml]
[DEBUG]   (s) remoteRepos = [       id: bb-nexus-mirror
      url: http://repo.dev.bloomberg.com/content/groups/public/
   layout: default
snapshots: [enabled => true, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG]   (f) silent = false
[DEBUG]   (s) skip = false
[DEBUG]   (s) stripVersion = false
[DEBUG]   (f) useJvmChmod = false
[DEBUG]   (f) project = MavenProject: com.bloomberg.jira.plugins:drqsgw:1.0-SNAPSHOT @ /home/ubuntu/src/jiratoolkit/atlassian/drqsgw.clean/pom.xml
[DEBUG] -- end configuration --
[INFO] Configured Artifact: com.atlassian.jira.plugins:jira-plugin-test-resources:2.21.3:zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
... (same as above)

I have done cleans, nuked my ~/.m2/repository, googled the world ... There is no jira-plugin-test-resources.zip:2.21.3, instead, that starts as 3.11 and ranges up to version 7.

This is a major blocker for us.

Thanks in advance for any insight

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Fred Cassirer July 13, 2014

After much head scratching I finally figured out what was happening. The following pom.xml is what is generated by the sdk refapp plugin, and I believe it is wrong:

 <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.refapp</groupId>
                <artifactId>atlassian-platform</artifactId>
                <version>${refapp.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-refapp-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
             =>>>>> <productVersion>${refapp.version}</productVersion>
                </configuration>
            </plugin>
	    <plugin>
		<groupId>com.atlassian.maven.plugins</groupId>
		<artifactId>maven-amps-plugin</artifactId>
		<version>${amps.version}</version>
		<extensions>true</extensions>
	    </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <properties>
      <refapp.version>2.21.3</refapp.version>
        <amps.version>5.0.3</amps.version>
        <plugin.testrunner.version>1.2.0</plugin.testrunner.version>

Note that the properties sets the refapp.version to 2.21.3, but I believe this is not the same as the maven-refapp-plugin version. Changing the refapp.version to something other than 2.21.3 causes the atlassian-refapp version to be incorrect. I wound up hardcoding <productVersion>6.3</productVersion> and this picked up the corrrect maven-refapp-plugin version which in turn passed it down to the test plugin version.

Ouch ... this was painful to find, even though it now seems obvious looking at the code. As someone new to maven and the world of Jira plugins, I have to say there is *way* too much domain knowledge required to troubleshoot problems and the entire development platform feels like it is very fragile.

Hope this helps somebody else out there ...

Philippe Moore September 25, 2014

It helped me out. Thanks Fred!

Deleted user October 20, 2014

This just saved me hours of digging, and worked great. Thank you!

Claudiu Milea January 31, 2016

this has just saved me some painful hours

you are right - very fragile

Tom van den Broek February 1, 2016

Thanks, indeed solved it for me. Took me just over a day to find your solution....

Scott Wilson February 11, 2016

Yes, this worked for me also.  Its a bad sign when the tutorials don't even work. THANKS - this was giving me a headache!

firestarter2prometheus January 19, 2017

You are great, thank you very much! smile

I'd never find out to solve this issue by hardcoding a version number. It's 2017 and this issue still exists. I'm afraid the tutorial still needs some care - hopefully Atlassian will get this some time soon.

 

TAGS
AUG Leaders

Atlassian Community Events