Upload jars or Bundle to Nexus using Jenkins Job and some repository are not uploading the jars or bundle to Nexus

8 views
Skip to first unread message

SARDARNI NK

unread,
Nov 13, 2019, 3:41:58 PM11/13/19
to Jenkins Users
Hi All,

I have a Jenkins job which takes multiple parameters,  one of the Parameter we have the Name: repository  with choice (xxx_snapshots_xxx, xxx_releases_xxx, xxx_thirdParty_xxx )
 which basically repository to upload.

In Jenkins Job, we have Build Environment step with conditional steps(multiple) for  (xxx_snapshots_xxx, xxx_releases_xxx, xxx_thirdParty_xxx )

  -->conditional steps(multiple) in Jenkins Job

steps we have Inject environment variable in that have 2 section 
   Properties File Path
repoID=snapshots


xxx_snapshots_xxx, xxx_releases_xxx,  uploads work fine but not xxx_thirdParty_xxx.


In execute shell we have 

mvn -e deploy:deploy-file \

    -Dfile=file  \

    -DgroupId=${groupid} \

    -DartifactId=${artifactid} \

    -Dversion=${version} \

    -Dpackaging=${extension} \

    -Durl=${url} \

    ${optional_classifier} \

    -DrepositoryId=${repoID}


if the condition doesn't meet which will return ${classifier}



If condition met which will return

optional_classifier=-Dclassifier=${classifier}


Jenkins Job is  Not uploading  xxx_thirdParty_xxx  to nexus.


Could anyone please let me know what might be the problem.


Thanks,

Nav






   
         




Yilmaz Gunduzalp

unread,
Nov 13, 2019, 4:32:06 PM11/13/19
to Jenkins Users
Do you get any errors? It could be a ssl certificate issue

SARDARNI NK

unread,
Nov 14, 2019, 10:46:40 AM11/14/19
to Jenkins Users
Thank you Gunduzalp!!

I was getting an error on Jenkins Build  Return code is: 401, ReasonPhrase: Unauthorized.


Thanks,
Nav
Reply all
Reply to author
Forward
0 new messages