It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bamboo and nexus

Susant Prusty Nov 06, 2014

Hi All,

Is there a way to get artifacts from nexus to bamboo in my builds.

I know after a build I can use the created artifacts in other child plans or new plans , but is there any way we can get from nexus first before doing the build?

We can the do the other way around that upload to snapshot nexus repository from bamboo using maven and pom.xml file.

 

But is the reverse allowed getting from nexus ? and yes can you please let us know the plugin name ? or any other way to do it ?

 

Thank you

 

Regards,

Susant

 

3 answers

Actually you can use maven and pom to upload and download artifacts. The trick is to create the correct pom file for that.

Sample 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>
 
  <groupId>dummy.group</groupId>
  <artifactId>dymmy-artifact</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
 
  <dependencies>
    <dependency>
      <groupId>com.googlecode.boost-maven-project</groupId>
      <artifactId>boost-thread</artifactId>
      <version>1.49.0-b1</version>
      <classifier>windows-amd64-msvc-release</classifier>
    </dependency>
  </dependencies>
</project>

Run:

mvn dependency:copy-dependencies

And you'll get all your dependencies in /target/dependency directory.

Also if you don't need to copy transitive dependencies you can use wget or curl to download a file from a repo (or any other http download tool).

0 votes
Susant Prusty Nov 06, 2014

Hi,

 

Thank you for the reply.

Can you please send me a sample pom file is it's okay ?

Regards,

Susant

I've added a sample pom to my answer.

0 votes
Susant Prusty Nov 10, 2014

Thank you for your answer and sample pom file.

 

I will try to do the steps and let you know if I am stuck somewhere.

 

My requirement is when I run the build it should get the artifacts from my nexus hosted repository and should use those artifacts in the same buils.

 

Regards,

Susant

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

66 views 3 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you