Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Developing a REST Service Plugin - Non-resolvable import: POM

J D
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2014

Following to this instructions here, i created a plugin project.

After i created it, i ran atlas-run.

 

I get the following errors:

C:\Users\brischlej\at-refapp\Message>atlas-run
Executing: "C:\Users\brischlej\atlassian-plugin-sdk\apache-maven-3.2.1\bin\mvn.bat" com.atlassian.ma
ven.plugins:maven-amps-dispatcher-plugin:5.0.4:run -gs C:\Users\brischlej\atlassian-plugin-sdk\apach
e-maven-3.2.1/conf/settings.xml
[INFO] Scanning for projects...
Downloading: https://maven.atlassian.com/repository/public/com/atlassian/refapp/atlassian-platform/2
.23.1/atlassian-platform-2.23.1.pom
Downloading: file://C:\Users\brischlej\atlassian-plugin-sdk/repository/com/atlassian/refapp/atlassia
n-platform/2.23.1/atlassian-platform-2.23.1.pom
Downloading: http://repo.maven.apache.org/maven2/com/atlassian/refapp/atlassian-platform/2.23.1/atla
ssian-platform-2.23.1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.atlassian.plugins.tutorial:Message:1.0 (C:\Users\brischlej\at-refapp\Messa
ge\pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not find artifact com.atlassian.refapp:atlassian-platfo
rm:pom:2.23.1 in atlassian-public (https://maven.atlassian.com/repository/public) @ line 70, column
25 -> [Help 2]
[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 arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

 

My pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atlassian.plugins.tutorial</groupId>
    <artifactId>Message</artifactId>
    <version>1.0</version>
    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>
    <name>Message</name>
    <description>This is the com.atlassian.plugins.tutorial:Message plugin for Atlassian Refapp.</description>
    <packaging>atlassian-plugin</packaging>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.7.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.5.8</version>
        </dependency>
        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>
    </dependencies>
    <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>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <properties>
        <refapp.version>2.23.1</refapp.version>
        <amps.version>5.0.4</amps.version>
        <plugin.testrunner.version>1.2.0</plugin.testrunner.version>
    </properties>
</project>

 

What did i do wrong?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
J D
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2014

Fixed this issue by changing the version of the plugin to 2.22.0 in the pom of the project

<refapp.version>2.22.0</refapp.version>

TAGS
AUG Leaders

Atlassian Community Events