Hello,
We have existing plugin which we are trying to migrate to JIRA 8.7.1. We are using latest SDK (8.0.16) and using AMPS-Version 8.0.4.
Unfortunately atlas-run gives following error and couldn’t find out root cause.
…
Downloading from central:
…
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:10 min
[INFO] Finished at: 2020-02-28T14:48:59+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:amps.version or one of its dependencies could not be resolved: Could not find artifact com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:jar:amps.version in atlassian-public (Index of maven-external/) → [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:amps.version or one of its dependencies could not be resolved: Could not find artifact com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:jar:amps.version in atlassian-public (Index of maven-external/)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:128)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:182)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor (MojoDescriptorCreator.java:239)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:104)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:83)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:jar:amps.version in atlassian-public
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
please show us the pom.xml file as it is likely the root cause of your problem.
The line com.atlassian.maven.plugins:amps-dispatcher-maven-plugin:jar:amps.version seems to indicate that it is looking for a version named amps.version - which of course cannot be found.
Hi,
Had the same issue, because of my pom.xml “format” action. (space replaced by tabs)
The issuing lines are these one in the “atlas-run.bat” :
if exist pom.xml (
echo [INFO] Project POM found
for /F "delims=*" %%a in ('findstr "<amps.version>" pom.xml') do (set var="%%a")
for /F "tokens=2 delims=>< " %%a in (!var!) do (set AMPS_PLUGIN_VERSION=%%a)
)
So, in order to fix this quickly, I just added another for /F in order to delimit by the default value (tab).
if exist pom.xml (
echo [INFO] Project POM found
for /F "delims=*" %%a in ('findstr "<amps.version>" pom.xml') do (set var="%%a")
for /F %%a in (!var!) do (set vartab="%%a")
for /F "tokens=2 delims=>< " %%a in (!vartab!) do (set AMPS_PLUGIN_VERSION=%%a)
)
I don’t know if it is the best fix, but it works in any case.
The suggested fix did not work for me. However simply changing the format of my pom.xml file from tabs to spaces did fix my issue. For my organization this fix is acceptable but I could see how other orgs may not approve of such a “solution”. Any advice on creating an official bug for atlas-run (and other such commands) in the windows sdk?