Resolve pom.xml errors

I am creating a first plugin with jira data center. The problem is that pom.xml contains errors that I have not been able to resolve. Here are the errors:

  • Project build error: Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.1.2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com .atlassian.maven.plugins:jira-maven-plugin:jar:8.1.2 (present, but unavailable): com.atlassian.maven.plugins:jira-maven-plugin:jar:8.1.2 was not found in https: //repo.maven.apache.org/maven2 during a previous attempt.

  • Project build error: Unknown packaging: atlassian-plugin

here is pom.xml :

<modelVersion>4.0.0</modelVersion>
<groupId>panel</groupId>
<artifactId>subtasks</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>atlassian-plugin</packaging>

<properties>
    <jira.version>7.13.0</jira.version>
    <amps.version>8.1.2</amps.version>
    <plugin.testrunner.version>2.0.2</plugin.testrunner.version>
    <atlassian.spring.scanner.version>2.1.7</atlassian.spring.scanner.version>
    <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    <testkit.version>6.3.11</testkit.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
    <!-- Your dependencies here -->
</dependencies>

<build>
    <plugins>
        <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>
                <enableQuickReload>true</enableQuickReload>
                <instructions>
                    <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                    <Export-Package>com.example.panel.api,</Export-Package>
                    <Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
                    <Spring-Context>*</Spring-Context>
                </instructions>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <executions>
                <execution>
                    <?m2e execute onConfiguration?>
                    <goals>
                        <goal>atlassian-spring-scanner</goal>
                    </goals>
                    <phase>process-classes</phase>
                </execution>
            </executions>
            <configuration>
                <verbose>false</verbose>
            </configuration>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>atlassian-public</id>
        <url>https://maven.atlassian.com/public/</url>
    </repository>
    <repository>
        <id>central</id>
        <url>https://repo.maven.apache.org/maven2</url>
    </repository>
</repositories>

Hi @ManarElKefi1

In this repo you can only find Central Repository: com/atlassian/maven/plugins/maven-jira-plugin

But you can find what you wants here Index of maven-external/com/atlassian/maven/plugins/jira-maven-plugin

Just use this repository in your pom.xml

<repository>
    <id>atlassian-maven</id>
    <name>Atlassian Maven</name>
    <url>https://maven.atlassian.com/content/groups/public/</url>
</repository>

I hope this will be enough to solve your problem.
Fabien

Same errors

<packaging>atlassian-plugin</packaging>

The current core packaging values are: pom , jar , maven-plugin , ejb , war , ear , rar . These define the default list of goals which execute on each corresponding build lifecycle stage for a particular package structure: see Plugin Bindings for default Lifecycle Reference for details.

source: Maven – POM Reference.

do you use Atlas commands to clean and build your project?

https://developer.atlassian.com/server/framework/atlassian-sdk/automatic-plugin-reinstallation-with-quickreload/