我希望修改现有的 Atlassian Bamboo .Net 插件:https : //bitbucket.org/atlassian/bamboo-dotnet-plugin,以便 MsTest 解析器包含 StackTrace 信息。
我已经在本地下载了存储库,并尝试使用 Maven 命令安装所有项目依赖项:mvn clean install -U
.
不幸的是,并不是所有的 jars 都被下载了,所以我在网上搜索了帮助,发现通过使用 Atlassian SDK 我可以构建项目并让它处理所有的 maven 东西,因为它已经在其 settings.xml 文件中配置了所有东西。
问题是即使在使用它之后我仍然会遇到构建失败。这是我的 cmd 输出:
[INFO] ---------------------------------------------------------------------
---
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:43 min
[INFO] Finished at: 2016-07-12T14:22:23+02:00
[INFO] Final Memory: 11M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project atlassian-bamboo-plugin-dotnet: Could not resolve dependencies for project com.atlassian.bamboo.plugins.dotnet:atlassian-bamboo-plugin-dotn
et:atlassian-plugin:5.11.2-SNAPSHOT: The following artifacts could not be resolved: com.atlassian.bamboo:atlassian-bamboo-api:jar:5.12.0-SNAPSHOT, com.atlassian.bamboo:atlassian-bam
boo-core:jar:5.12.0-SNAPSHOT, com.atlassian.bamboo.plugins.scripttask:atlassian-bamboo-plugin-scripttask:jar:5.12.0-SNAPSHOT, com.atlassian.bamboo:atlassian-bamboo-test-utils:jar:5.
12.0-SNAPSHOT: Could not find artifact com.atlassian.bamboo:atlassian-bamboo-api:jar:5.12.0-SNAPSHOT in atlassian-public (https://maven.atlassian.com/repository/public) -> [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/DependencyResolutionException
之后我尝试了一个额外的mvn install
并得到了这个输出:
[INFO] Scanning for projects...
[WARNING] The POM for org.sonatype.plugins:nexus-staging-maven-plugin:jar:1.6.5-atlassian-2 is missing, no dependency information available
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.sonatype.plugins:nexus-staging-maven-plugin:1.6.5-atlassian-2 or one of its dependencies could not be resolved: Failure to find org
.sonatype.plugins:nexus-staging-maven-plugin:jar:1.6.5-atlassian-2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted unt
il the update interval of central has elapsed or updates are forced @
[ERROR] Unknown packaging: atlassian-plugin @ line 14, column 14
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.atlassian.bamboo.plugins.dotnet:atlassian-bamboo-plugin-dotnet:5.11.2-SNAPSHOT (C:\Users\Roy\Desktop\atlassian-bamboo-dotnet-plugin-7d0bf7a4f611\pom.xml) h
as 2 errors
[ERROR] Unresolveable build extension: Plugin org.sonatype.plugins:nexus-staging-maven-plugin:1.6.5-atlassian-2 or one of its dependencies could not be resolved: Failure to find
org.sonatype.plugins:nexus-staging-maven-plugin:jar:1.6.5-atlassian-2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted
until the update interval of central has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: atlassian-plugin @ line 14, column 14
[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/PluginManagerException
有人可以帮我解决这个问题吗?这是 pom.xml 文件:
<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>
<parent>
<groupId>com.atlassian.pom</groupId>
<artifactId>public-pom</artifactId>
<version>4.0.8</version>
</parent>
<groupId>com.atlassian.bamboo.plugins.dotnet</groupId>
<artifactId>atlassian-bamboo-plugin-dotnet</artifactId>
<version>5.11.2-SNAPSHOT</version>
<packaging>atlassian-plugin</packaging>
<name>Atlassian Bamboo .NET Plugin</name>
<description>Plugin for Bamboo that provides .NET support</description>
<properties>
<bamboo.version>5.12.0-SNAPSHOT</bamboo.version>
<bamboo.data.version>5.10.0</bamboo.data.version>
<amps.version>5.0.4</amps.version>
<failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
</properties>
<scm>
<connection>scm:hg:ssh://hg@bitbucket.org/atlassian/bamboo-dotnet-plugin</connection>
<developerConnection>scm:hg:ssh://hg@bitbucket.org/atlassian/bamboo-dotnet-plugin</developerConnection>
<url>https://bitbucket.org/atlassian/bamboo-dotnet-plugin/src</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>JIRA</system>
<url>https://jira.atlassian.com/browse/BAM</url>
</issueManagement>
<licenses>
<license>
<name>BSD License</name>
<url>https://bitbucket.org/atlassian/bamboo-dotnet-plugin</url>
</license>
</licenses>
<developers>
<developer>
<name>Ross Rowe</name>
</developer>
<developer>
<name>James William Dumay</name>
<email>james@atlassian.com</email>
</developer>
</developers>
<contributors>
<contributor>
<name>Marko Lahma</name>
</contributor>
<contributor>
<name>Krystian Brazulewicz</name>
<email>kbrazulewicz@atlassian.com</email>
</contributor>
<contributor>
<name>Joseph Clark</name>
<email>jclark@atlassian.com</email>
</contributor>
</contributors>
<repositories>
<repository>
<id>atlassian-public</id>
<url>https://maven.atlassian.com/repository/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>atlassian-bamboo-api</artifactId>
<version>${bamboo.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>atlassian-bamboo-core</artifactId>
<version>${bamboo.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<scope>provided</scope>
</dependency>
<!-- Used for .NET script and command converters -->
<dependency>
<groupId>com.atlassian.bamboo.plugins.scripttask</groupId>
<artifactId>atlassian-bamboo-plugin-scripttask</artifactId>
<version>${bamboo.version}</version>
<scope>provided</scope>
</dependency>
<!-- Required for accessing Windows registry -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>3.2.7</version>
<scope>compile</scope>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>atlassian-bamboo-test-utils</artifactId>
<version>${bamboo.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>atlassian-bamboo-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-dispatcher-plugin</artifactId>
<version>${amps.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-bamboo-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${bamboo.version}</productVersion>
<productDataVersion>${bamboo.data.version}</productDataVersion>
<extractDependencies>true</extractDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>