Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone I have a different question; I have 3 different side (Dev,Prod,Test) and 3 different Nexus 3 Repository.
I created context all of this three side (db connection,username,pass) this works fine, I want to deploy my job to 3 nexus repository by this context variable
Is there any way to do this, choosing nexus url, pass, release and snapshots by context variable
thanks
I'm afraid I cannot share the job since I do not own it (it is one of my client's jobs and is very specific to their requirements). However, I can tell you how I figured it out.
1) You first need to download the maven-metadata.xml for your job. Look at the Nexus repository to look for the URL you need for this. The download URL will be something like this....
http://{host}:{port}/nexus/service/local/repositories/{repo}/content/{file path}/{job name}/maven-metadata.xml
2) Using the maven-metadata.xml file's contents, identify the version you need and download the correct version you. For both downloads you can use the tHttpRequest component. You will need to use your Nexus user details for this.
3) Then you need to use the Maven command line tool. Look here for details (https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html). You will use a tSystem component to do this.
This isn't easy and took me about a week to figure out how to do this for Jobs and a little longer for ESB routes.
An alternative is to get a Nexus subscription and that comes with an API to do this without using the Maven command line I believe.
Context variables are for use within Talend Jobs, so this will not work with the standard mechanisms for publishing to your Nexus repository. However, it is perfectly possible to migrate between repositories using the maven command line within a Talend job. I use this method for moving my jobs between DEV, TEST and PROD repositories. I first publish using the Talend method to DEV, I then (once certain criteria are passed) move the job from DEV to TEST, then TEST to PROD.
Hi rhall_2_0 I see
Is it possible to share with me your command line job or command really do not know
thanks
I'm afraid I cannot share the job since I do not own it (it is one of my client's jobs and is very specific to their requirements). However, I can tell you how I figured it out.
1) You first need to download the maven-metadata.xml for your job. Look at the Nexus repository to look for the URL you need for this. The download URL will be something like this....
http://{host}:{port}/nexus/service/local/repositories/{repo}/content/{file path}/{job name}/maven-metadata.xml
2) Using the maven-metadata.xml file's contents, identify the version you need and download the correct version you. For both downloads you can use the tHttpRequest component. You will need to use your Nexus user details for this.
3) Then you need to use the Maven command line tool. Look here for details (https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html). You will use a tSystem component to do this.
This isn't easy and took me about a week to figure out how to do this for Jobs and a little longer for ESB routes.
An alternative is to get a Nexus subscription and that comes with an API to do this without using the Maven command line I believe.