Reputation: 6181
I have a private repository which I can access using HTTP basic auth. I would like to create a local mirror of that repository using the tycho-p2-extras-plugin mvn plugin. I have added the credentials in the ~/.m2/settings.xml using both the repository id and URI:
<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 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>test-repo</id>
<username>*********</username>
<password>*********</password>
</server>
<server>
<id>https://test-repo-uri.com/path/to/repo</id>
<username>*********</username>
<password>*********</password>
</server>
<server>
<id>test-repo-uri.com</id>
<username>*********</username>
<password>*********</password>
</server>
</servers>
</settings>
This is the mirroring pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>test-repo-mirror</groupId>
<artifactId>test-repo-mirror</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>4.0.9</version>
<executions>
<execution>
<phase>prepare-package</phase>
<id>mirror-target-platform</id>
<goals>
<goal>mirror</goal>
</goals>
</execution>
</executions>
<configuration>
<source>
<repository>
<id>test-repo</id>
<url>https://test-repo-uri.com/path/to/repo/</url>
<layout>p2</layout>
</repository>
</source>
<destination>${project.build.directory}/repo-mirror</destination>
<followStrictOnly>true</followStrictOnly>
<includeOptional>false</includeOptional>
<includeNonGreedy>false</includeNonGreedy>
<latestVersionOnly>true</latestVersionOnly>
<includePacked>false</includePacked>
</configuration>
</plugin>
</plugins>
</build>
</project>
yet no matter what I try the mirroring attempt fail with authentication error. Am I making some sort of error? Or is it not supported?
Upvotes: 1
Views: 41