Hello! As is probably obvious from my other questions, I'm currently setting up a local repository manager (Apache Archiva in this instance) used to deploy internal releases (things that won't make it to Central), and to act as a proxy for Central for my local network.
Archiva appears to be set up correctly, I can log in to the admin interface and upload artifacts via that without issue. However, I seem to be unable to deploy via "mvn deploy". I'm using a profile to use the repository manager conditionally, because *most* of the time I want to deploy directly to Central. I don't want to add the address of the repository manager to each project pom, because that information is strictly internal. My ~/.m2/settings.xml file looks like this: <?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"> <profiles> <profile> <id>example</id> <repositories> <repository> <id>example-releases</id> <name>Example Releases</name> <url>https://packages.example.com/repository/example-releases/</url> <layout>default</layout> </repository> </repositories> </profile> <profile> <id>example-deploy</id> <properties> <altDeploymentRepository>example-releases::default::https://packages.example.com/repository/example-releases/</altDeploymentRepository> </properties> </profile> </profiles> <activeProfiles> <activeProfile>example</activeProfile> </activeProfiles> <mirrors> <mirror> <id>packages.example.com</id> <url>https://packages.example.com/repository/releases/</url> <mirrorOf>external:*</mirrorOf> </mirror> </mirrors> <servers> <server> <id>example-releases</id> <username>io7m</username> <password>XXXXXXXX</password> </server> </servers> </settings> When I call "mvn -P example-deploy", Maven correctly tries to deploy via the https://packages.example.com/repository/example-releases/ repos instead of Central, but it seems like it refuses to send a username and password. I get a 401 error from Archiva. The Archiva logs mention: 2018-11-04 12:14:16,266 [qtp367589601-760] INFO org.apache.archiva.security.ArchivaServletAuthenticator [] - Authorization Denied [ip=10.2.4.1,permission=archiva-upload-repository,repo=arc7-releases] : no matching permissions 2018-11-04 12:14:19,359 [qtp367589601-760] INFO org.apache.archiva.security.ArchivaServletAuthenticator [] - Authorization Denied [ip=10.2.4.1,permission=archiva-upload-repository,repo=arc7-releases] : no matching permissions 2018-11-04 12:14:52,504 [qtp367589601-761] INFO org.apache.archiva.security.ArchivaServletAuthenticator [] - Authorization Denied [ip=10.2.4.1,permission=archiva-upload-repository,repo=arc7-releases] : no matching permissions 2018-11-04 12:14:55,567 [qtp367589601-760] INFO org.apache.archiva.security.ArchivaServletAuthenticator [] - Authorization Denied [ip=10.2.4.1,permission=archiva-upload-repository,repo=arc7-releases] : no matching permissions Is there some way to verify that the username and password really is (or isn't being sent)? Is there something I've set up incorrectly here? I've had no problems to date deploying to Central, so I'm surprised that I'm having problems here. Just so we're clear: I'm deploying to /repository/example-releases, as this is a repository that holds local releases, but I'm downloading artifacts via /repository/releases as this is a repository group that contains a proxy for Central. -- Mark Raynsford | http://www.io7m.com
pgpF52OiH7a5s.pgp
Description: OpenPGP digital signature