Search code examples
mavenjenkinsnexus

Config maven setting in Jenkins


My project has 3 maven module and they are built by nodejs script.

Now I want to integrate with Jenkin and Nexus. My Jenkin build config look like this:

Build configI also add my maven settings.xml in Provide configuration files build step in Build section but it didn't work. Maven still fail and could not resolve dependencies in my Nexus repo.

In my local maven settings.xml I have added some config for Nexus repository and another repository.

Can you enlight me this case. I'm new to Jenkin.

Thanks in advance.


Solution

  • I just find a way to work around by adding mvn-settings.xml directly to my folder and edit the run command like:

    mvn clean install -s mvn-settings.xml