Thanks for the pointers!

For anyone else looking as well as the credentials for publishing in my 
~/.m2/settings.xml I also needed to add a mirrors section otherwise I 
started to get weird dependency resolution issues. It looks like this at 
the moment which is significantly smaller to what I had to start with.

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
http://maven.apache.org/xsd/settings-1.0.0.xsd";>

  <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
      <name>public</name>
      <url>https://repo.jenkins-ci.org/public</url>
      <id>public</id>
    </mirror>
  </mirrors>

  <servers>
    <server>
      <id>maven.jenkins-ci.org</id> <!-- For parent 1.397 or newer; this ID 
is used for historical reasons and independent of the actual host name -->
      <username>username</username>
      <password>encrypted_password</password>
    </server>
  </servers>

</settings>

Without the mirrors section I was getting the following error: Could not 
find artifact org.jenkins-ci.tools:maven-hpi-plugin:pom in central 
(https://repo.maven.apache.org/maven2). That plugin is clearly not in the 
Central repo which lead me down the path trying to understand mirrors when 
I came across this answer 
<https://groups.google.com/g/jenkinsci-dev/c/CPH0jKKI23U/m/ciArzkJZJccJ>.

I hope this helps someone for the future.

On Monday, 12 October 2020 at 18:55:21 UTC+1 db...@cloudbees.com wrote:

> On Mon, Oct 12, 2020 at 7:19 PM Jesse Glick <jgl...@cloudbees.com> wrote:
>
>> On Mon, Oct 12, 2020 at 7:36 AM Mez Pahlan <mez.p...@gmail.com> wrote:
>> > I am still curious as to what I should be putting in my settings.xml
>>
>> You do not really need one at all, as all Jenkins components declare
>> the Jenkins Artifactory repository.
>>
>
> Well, credentials to publish, but that's probably about it. Documented at 
> https://www.jenkins.io/doc/developer/publishing/releasing/#artifactory-credentials-for-maven
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/5d32803c-9216-4740-bfdd-8c076a4cf7d2n%40googlegroups.com.

Reply via email to