# Atlas-debug fails in atlassian sdk 8.2.6 if there is a profile with jira-maven-plugin

**URL:** <https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413>\
**Category:** Jira Data Center\
**Tags:** plugin-sdk, sdk, atlas-sdk\
**Created:** [November 30, 2020, 11:32am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413 "2020-11-30T11:32:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomasMartynowicz](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@TomasMartynowicz](https://community.developer.atlassian.com/u/TomasMartynowicz)\
**Post date:** [November 30, 2020, 11:32am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/1 "2020-11-30T11:32:13Z")

</div>

Steps to reproduce:

- atlas-create-jira-plugin

- Edit pom.xml. Add following profile:

```auto
    <profiles>
        <profile>
            <id>jira</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>jira-maven-plugin</artifactId>
                        <version>${amps.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <products>
                                <product>
                                    <id>jira</id>
                                    <instanceId>jira</instanceId>
                                </product>
                            </products>

                            <productVersion>${jira.version}</productVersion>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

```

- Run atlas-debug

Expected results:

- Jira on debug mode is started

Acutal Results:

```auto
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.536 s
[INFO] Finished at: 2020-11-30T12:19:33+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'com.atlassian.maven.plugins' in the current project and in the plugin groups [com.atlassian.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/tomasmartynowicz/.m2/repository), atlassian-public (https://maven.atlassian.com/repository/public), atlassian-plugin-sdk (file:///usr/local/Cellar/atlassian-plugin-sdk/8.2.6/libexec/repository), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException
sh: line 1: jira-maven-plugin:8.1.0:debug: command not found

```

Judging by the command output the problem is on the MVN\_COMMAND variable

```auto
Executing: /usr/local/Cellar/atlassian-plugin-sdk/8.2.6/libexec/apache-maven-3.5.4/bin/mvn com.atlassian.maven.plugins:jira-maven-plugin
jira-maven-plugin:8.1.0:debug -gs /usr/local/Cellar/atlassian-plugin-sdk/8.2.6/libexec/apache-maven-3.5.4/conf/settings.xml

```

---

<div class="post-metadata">

**Author:** ![sergey](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/sergey/32/46825_2.png) [@sergey](https://community.developer.atlassian.com/u/sergey)\
**Post date:** [November 30, 2020, 12:17pm UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/2 "2020-11-30T12:17:39Z")

</div>

Hey, @TomasMartynowicz, indeed, looks like a bug in latest atlassian SDK.  
As a work-around you could change the  
$ATLAS\_HOME/bin/atlas-debug script’s definition of MVN\_COMMAND from:

```auto
MVN_COMMAND="com.atlassian.maven.plugins:${MVN_PLUGIN}:${AMPS_PLUGIN_VERSION}:debug"

```

to:

```auto
MVN_COMMAND="com.atlassian.maven.plugins:jira-maven-plugin:${AMPS_PLUGIN_VERSION}:debug"

```

---

<div class="post-metadata">

**Author:** ![TomasMartynowicz](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@TomasMartynowicz](https://community.developer.atlassian.com/u/TomasMartynowicz)\
**Post date:** [November 30, 2020, 1:16pm UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/3 "2020-11-30T13:16:43Z")

</div>

Thanks @sergey. I tried your workaround and it worked

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/boris/32/33588_2.png) [@boris](https://community.developer.atlassian.com/u/boris)\
**Post date:** [February 18, 2021, 9:46pm UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/4 "2021-02-18T21:46:33Z")

</div>

Got hit with this as well. Still broken Atlassian! Sergey, your workaround fixed it for me.

---

<div class="post-metadata">

**Author:** ![nagendrahegde](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@nagendrahegde](https://community.developer.atlassian.com/u/nagendrahegde)\
**Post date:** [February 25, 2021, 7:36am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/5 "2021-02-25T07:36:43Z")

</div>

Hey @sergey, This solution worked in my Mac too. Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![francis](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/francis/32/35892_2.png) [@francis](https://community.developer.atlassian.com/u/francis)\
**Post date:** [March 28, 2021, 11:01am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/6 "2021-03-28T11:01:41Z")

</div>

> [@sergey](#):
>
> `MVN_COMMAND="com.atlassian.maven.plugins:jira-maven-plugin:${AMPS_PLUGIN_VERSION}:debug"`

Does the trick. Thanks

---

<div class="post-metadata">

**Author:** ![ChrisWilliams](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/chriswilliams/32/40034_2.png) [@ChrisWilliams](https://community.developer.atlassian.com/u/ChrisWilliams)\
**Post date:** [April 5, 2021, 11:42pm UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/7 "2021-04-05T23:42:20Z")

</div>

Hi folks, we’re looking to address this in a release coming quite soon, see [[ATLASSDK-220] - Ecosystem Jira](https://ecosystem.atlassian.net/browse/ATLASSDK-220) to track progress on this particular bug. Thank you for your patience so far!

---

<div class="post-metadata">

**Author:** ![izymesdev](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/izymesdev/32/35901_2.png) [@izymesdev](https://community.developer.atlassian.com/u/izymesdev)\
**Post date:** [April 12, 2021, 12:56am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/8 "2021-04-12T00:56:20Z")

</div>

> [@sergey](#):
>
> `"com.atlassian.maven.plugins:jira-maven-plugin:${AMPS_PLUGIN_VERSION}:debug"`

`NEW_PLUGIN_ARTIFACT_ID=$(grep -F "${newPlugins}" pom.xml | head -1 | sed -n 's:.*<artifactId>\(.*\)</artifactId>.*:\1:p')`

works for me and stays plugin/add-on/app agnostic. `head -1` in the pipe seems to solve the problem.

---

<div class="post-metadata">

**Author:** ![izymesdev](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/izymesdev/32/35901_2.png) [@izymesdev](https://community.developer.atlassian.com/u/izymesdev)\
**Post date:** [April 12, 2021, 12:59am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/9 "2021-04-12T00:59:27Z")

</div>

@here - this isi not limited to the `jira-maven-plugin` - the issue is for all products.

---

<div class="post-metadata">

**Author:** ![ChrisWilliams](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/chriswilliams/32/40034_2.png) [@ChrisWilliams](https://community.developer.atlassian.com/u/ChrisWilliams)\
**Post date:** [April 20, 2021, 5:27am UTC](https://community.developer.atlassian.com/t/atlas-debug-fails-in-atlassian-sdk-8-2-6-if-there-is-a-profile-with-jira-maven-plugin/43413/10 "2021-04-20T05:27:39Z")

</div>

Hi again, the latest version of the SDK addresses this bug and other potential inconsistencies with identifying AMPS versions. Overall the new method should be a lot more reliable, including in projects where AMPS version is specified in a parent pom. Let me know if you encounter any other bugs.
