Atlassian bamboo .Net plugins dependencies installation

こ雲淡風輕ζ 提交于 2020-01-17 05:59:09

问题


I wish to modify the existing Atlassian Bamboo .Net plugin: https://bitbucket.org/atlassian/bamboo-dotnet-plugin so the MsTest Parser will include StackTrace information.

I've downloaded the repository locally, and I have tried to install all of the project dependencies using Maven command: mvn clean install -U.
Unfortunately not all jars were downloaded, so I've searched online for help and found that by using the Atlassian SDK I could build the project and let it handle all the maven stuff because it has everything already configured in its settings.xml file.

Problem is that I still get build failure even after using it. Here's my cmd output:

[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

After that I've tried an additional mvn install and got this output:

[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

Can someone help me figure this out? Here's the pom.xml file:

<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>

回答1:


So I solved it.
The problem was that in Atlassian repository there was no such version 5.11.12-SNAPSHOT version so I just replaced the version with the most recent one. I don't know if it will cause compatibility issue with newer dependencies version, but changing it solve the dependencies download problem.



来源:https://stackoverflow.com/questions/38327618/atlassian-bamboo-net-plugins-dependencies-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!