in bamboo : Is there any way to download a shared artifact event if the shared artifact generating plan failed? - bamboo

I want to download a shared artifact using artifact download plugin. But it seems the plugin only download the latest successful build's artifact. But my requirement is to download the artifact even the generator plan fails. I don't want to use Bamboo credentials in a separate script to download it using a URL. Is there any way that I can download the failed plan's artifact?

Related

Automate importing new libraries into Artifactory Ivy repository

We are only using the basic feature of Artifactory for Ant-Ivy java projects. If we need new java libraries, we download JARs, craft ivy.xml, then "deploy" the bundle to our internal Artifactory repository. This has been working just fine. However, when we need a set of JARS that need many transitive dependencies, the tasks become very tedious. We don't use Maven and download JARS from Maven central does not provide ivy.xml file. I am wondering if there is an easy way to automate these process?
Thanks
You can try this Artifactory user plugin which generates missing ivy.xml files from .pom files.
Please note that using a user plugin will require the professional version of Artifactory.

Has anyone tried to deploy artifacts to Rational Asset Manager

I am experimenting the use of Rational Asset Manager to store our binaries and/or build artifacts. I am running a mvn deploy command to deploy my build artifacts to RAM. Although it recognizes the connection its throwing me a Http status code: 500 error.
I have also checked RAM logs for more information but i don't see any specific exception. All the examples or documents out on internet says we have to configure RTC build engine to run the builds.
I just want to know if anyone have tried publishing to RAM from command line using Mvn deploy ( without using RTC client ) ? is this do-able?
If you have successfully published artifacts to RAM using maven, can you please elaborate on how you did it?
It seems to be possible, if you follow the steps described in:
"Creating and using Maven assets", and
"Deploying from Maven to assets":
Before you can use Maven assets, a repository administrator must enable the Maven model library. For more information, see Enabling the Maven library.
The mvn client can integrate with Rational Asset Manager, using Rational Asset Manager as a Maven repository.
Before you deploy from Maven to Rational Asset Manager, you must add a repository entry to the pom.xml file on the computer where you plan to run the mvn client. See Creating and using Maven assets for more information.
I was able to deploy the artifact using mvn deploy after changing the following things in RAM
Pointed to a JRE version in RAM ( originally was pointing to JDK
version) and
Changed permissions for my role for saving my artifacts
in RAM ("save Work Item") Reference

Maven: trigger task to upload dependency into Nexus if dependency is not there at the build time

I have Maven2 project. This project have 1 internal dependency which stored in internal (for our company) Sonatype Nexus. I setup the dependency version in pom.xml as parameter which I provide via Jenkins.
Sometimes I do not have proper dependency version in Nexus so my build can fail on donwload dependency step. I want to add ability to trigger special task (script) if dependency is not found to upload this dependency into Nexus and continue the build.
Can I do so?
I think about fake build for version exists always in Nexus which will check if given version is in Nexus, upload it and launch real build. But such way looks terrible.
Thanks In Advance!
You do NOT need to upload anything. You just need to access Nexus via the public group and the download from the Central repository, that is part of that group will happen automatically.

How to install a jar file from target to a specific location using maven?

Currently I have a simple maven project that is building a jar file and putting it inside target/some-1.0.jar when i run mvn install.
I want to copy this file to another location when I run mvn deploy.
Currently the location is on the same machine, but it would also be great if the solution could be applied for multiple targets, some of them being on other machines (scp deployment).
What is the easiest solution to do this? I would be nice, if you could include an example too.
Details: I have few jira plugins that are compiled as jar files and I just want to be able to run a single maven command that would copy the files to the server and eventually restart the server.
mvn deploy is intended for deployment to a remote Maven repository. mvn install is used for copying to the local Maven repo (so actually, the jar is also ending up in $HOME/.m2/repository, as well as target).
I'm not sure what you're intending to do, but I suggest you look at deploying something like http://www.sonatype.org/nexus/ if you want Maven artifacts to be available to multiple machines. This will integrate nicely with the rest of Maven.
Edit: based on your updated question, it's probably best to investigate the Wagon ssh plugin, or see if there's an Ant plugin. A suitable phase would be pre-integration-test: install and deploy should be run after you've run your integration tests to check the artefact works as expected. Use profiles to distinguish the local vs. remote cases.

Automating upload of artifacts in Nexus using Maven

Am trying to automate the process of uploading an artifact generated by Maven into a Nexus hosted repository (like a maven goal, which will upload the generated jar into a specified repository in Nexus). Is this possible? In the Nexus docs they have talked only about manual uploading.
I also looked at the nexus maven plugins and nothing like this is specified.
Thanks in advance
You have to use mvn deploy to deploy your artifacts via WebDAV (declare the Nexus DAV URL in the distributionManagement section).
See also
Getting started with Nexus Maven Repo Manager
13.3. Configuring Maven for Site Deployment (this link if for site deployment but it's similar)