找不到com.atlassian.stash:stash-parent:pom:5.0.18

时间:2015-05-12 13:27:31

标签: maven bitbucket-server atlassian-plugin-sdk

在jira和confluence上工作之后,现在正致力于藏匿。根据stash文档,我创建了stash插件,但无法转换eclipse兼容并运行stash实例。

的pom.xml: -

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<groupId>com.example.stash</groupId>
<artifactId>stash-hook</artifactId>
<version>1.0-SNAPSHOT</version>

<organization>
    <name>Example Company</name>
    <url>http://www.example.com/</url>
</organization>

<name>stash-hook</name>
<description>This is the com.example.stash:stash-hook plugin for Atlassian Stash.</description>
<packaging>atlassian-plugin</packaging>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.stash</groupId>
            <artifactId>stash-parent</artifactId>
            <version>${stash.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>com.atlassian.sal</groupId>
        <artifactId>sal-api</artifactId>
        <version>2.13.3</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.stash</groupId>
        <artifactId>stash-api</artifactId>
        <version>3.7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.stash</groupId>
        <artifactId>stash-spi</artifactId>
        <version>3.7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.atlassian.stash</groupId>
        <artifactId>stash-page-objects</artifactId>
        <version>3.7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
        <scope>provided</scope>
    </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>

<build>
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-stash-plugin</artifactId>
            <version>${amps.version}</version>
            <extensions>true</extensions>
            <configuration>
                <products>
                    <product>
                        <id>stash</id>
                        <instanceId>stash</instanceId>
                        <version>${stash.version}</version>
                        <dataVersion>${stash.data.version}</dataVersion>
                    </product>  
                </products>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>

<properties>
    <stash.version>5.0.18</stash.version>
    <stash.data.version>5.0.18</stash.data.version>
    <amps.version>5.0.13</amps.version>
    <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
</properties>

错误: -

E:\New folder\stash-hook>atlas-run
Executing: "E:\atlassian-plugin-sdk\apache-maven-3.2.1\bin\mvn.bat" com.atlassian.maven.plugins:maven-amps-dis
patcher-plugin:5.0.13:run -gs E:\atlassian-plugin-sdk\apache-maven-3.2.1/conf/settings.xml
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.example.stash:stash-hook:1.0-SNAPSHOT (E:\New folder\stash-hook\pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Failure to find com.atlassian.stash:stash-parent:pom:5.0.18 in http://1
92.168.0.114:8080/nexus/content/groups/public was cached in the local repository, resolution will not be reatt
empted until the update interval of Nexus has elapsed or updates are forced @ line 23, 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 articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

如何解决上述问题。

2 个答案:

答案 0 :(得分:1)

Aswani,

您似乎已使用自己的本地Nexus服务器覆盖了atlas- *命令的默认maven存储库。正如Artem指出的那样,Atlassian拥有它自己的Maven存储库,你必须添加:

https://developer.atlassian.com/docs/advanced-topics/working-with-maven/atlassian-maven-repositories

此外,我怀疑在SO上不止一次提出同样的问题还有一些礼仪:

https://stackoverflow.com/questions/30183281/stash-unkown-packagingatlassian-plugin

答案 1 :(得分:0)

answers.atlassian.com

似乎已经回答了同样的问题

你的pom遗失了atlassian的maven资料库。