Plugin com.atlassian.maven.plugins:maven-jira-plugin:8.0.2 or one of its dependencies could not be resolved

Hi,

I am trying to build our custom plugin for jira. When I run atlas-run CLI command, I get the following error.

The following are the parameters for my plugin :
Jira version : 8.2.3
Amps version : 8.0.2

        <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>jira-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                </configuration>
         </plugin>

Amps v8.0.2 uses artifactId “jira-maven-plugin” for “com.atlassian.maven.plugins”. But the error is quite weird that it tries to download “maven-jira-plugin” for version 8 from the repository.

[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:maven-jira-plugin:8.0.2 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:maven-jira-plugin:jar:8.0.2 in https://maven.atlassian.com/repository/public was cached in the local repository, resolution will not be reattempted until the update interval of atlassian-public has elapsed or updates are forced @
 @
[ERROR] The build could not read 1 project -> [Help 1]

Any help is greatly appreciated!

Thanks,
Kumar

Hi,

with version 8 of AMPS, they changed the plugin names. Look for references to maven-jira-plugin in your pom.xml and replace them with jira-maven-plugin.

Cheers,
Tobi

11 Likes

Hi @tobitheo,
Thanks for the reply!

I am using “jira-maven-plugin” for AMPS 8.0.2 (Please see my plugin for jira-maven-plugin in my initial question). This is the only reference I can find in my pom. But somehow, when I try to run it is picking “maven-jira-plugin” instead of “jira-maven-plugin”.

Thanks!
Kumar

1 Like

Hi Kumar,

have you tried a atlas-mvn clean since the change? Sometimes old build artifacts are still hanging around in the target directory and that kills them. Then try atlas-debug again.

The other thing I can think of is if one of your dependencies is still using the wrong plugin (or if you have a multi-module project where the parent pom or one of the siblings are still using the wrong plugin).

Cheers,
Tobi

Hi @tobitheo, yes, the parent pom dependencies are still using old artifacts. Thank you!

That’s great to hear! Would you be so kind as to mark my above message as a solution to this topic please? It helps others with the same problem find the solution more quickly and gets me some nice bragging rights :wink:

Cheers,
Tobi

1 Like

The first time I run my plugin with atlas-debug or atlas-run it starts without problems, but when I stop the server and run atlas-run or atlas-debug again I get the same error as a @klkumar143

Thanks, Hector

Thank you!
It helps me

Hello :wave:

I am not able to get the plugin jira-maven-plugin with latest sdk and I am trying to create the simple scripted plugin using scriptrunner.


mardeshana@Milanlaptop jira % atlas-mvn clean
Executing: /usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/apache-maven-3.5.4/bin/mvn  -gs /usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/apache-maven-3.5.4/conf/settings.xml clean
[INFO] Scanning for projects...
Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/adaptavist/pom/scriptrunner-jira-standard/31/scriptrunner-jira-standard-31.pom
Downloading from atlassian-plugin-sdk: file:///usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/repository/com/adaptavist/pom/scriptrunner-jira-standard/31/scriptrunner-jira-standard-31.pom
Downloading from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-jira-standard/31/scriptrunner-jira-standard-31.pom
Downloaded from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-jira-standard/31/scriptrunner-jira-standard-31.pom (1.8 kB at 2.5 kB/s)
Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/adaptavist/pom/scriptrunner-jira-base/31/scriptrunner-jira-base-31.pom
Downloading from atlassian-plugin-sdk: file:///usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/repository/com/adaptavist/pom/scriptrunner-jira-base/31/scriptrunner-jira-base-31.pom
Downloading from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-jira-base/31/scriptrunner-jira-base-31.pom
Downloaded from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-jira-base/31/scriptrunner-jira-base-31.pom (6.0 kB at 28 kB/s)
Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/adaptavist/pom/scriptrunner-base/31/scriptrunner-base-31.pom
Downloading from atlassian-plugin-sdk: file:///usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/repository/com/adaptavist/pom/scriptrunner-base/31/scriptrunner-base-31.pom
Downloading from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-base/31/scriptrunner-base-31.pom
Downloaded from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/adaptavist/pom/scriptrunner-base/31/scriptrunner-base-31.pom (9.9 kB at 46 kB/s)
Downloading from adaptavist-external: https://nexus.adaptavist.com/content/repositories/external/com/atlassian/maven/plugins/jira-maven-plugin/8.1.1/jira-maven-plugin-8.1.1.pom
Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/atlassian/maven/plugins/jira-maven-plugin/8.1.1/jira-maven-plugin-8.1.1.pom
Downloading from atlassian-plugin-sdk: file:///usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.1.1/jira-maven-plugin-8.1.1.pom
Downloading from central: https://repo.maven.apache.org/maven2/com/atlassian/maven/plugins/jira-maven-plugin/8.1.1/jira-maven-plugin-8.1.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.maven.plugins:jira-maven-plugin:jar:8.1.1 @
[ERROR] Unknown packaging: atlassian-plugin @ line 6, column 16
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.onresolve.scriptrunner.assets:sr-sample-plugin-jira:1.1-SNAPSHOT (/Users/mardeshana/Development/scriptrunner-samples/jira/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.maven.plugins:jira-maven-plugin:jar:8.1.1: Could not transfer artifact com.atlassian.maven.plugins:jira-maven-plugin:pom:8.1.1 from/to atlassian-public (https://packages.atlassian.com/maven-external/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]
[ERROR]     Unknown packaging: atlassian-plugin @ line 6, column 16
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

Can you please help with whats wrong my config?
Thanks