0

Ok, so here's the situation:

I have a multimodule Maven project (currently using v3.5.2) which has a large site deployment, some time back I deployed the Maven site (mvn clean site site:deploy) to a Nexus-2.x site repository using simple http.

After migrating to Nexus-3.8.0 I considered to put the whole server bedind a behind a reverse proxy allowing https only, which ran pretty fine so far. Unluckily I'm unable to deploy a site to the new raw repository, which is supposed to hold the sites from my maven project.

The configuration currently looks like this

                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-webdav-jackrabbit</artifactId>
                        <version>3.0.0</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <locales>en_US</locales>
                </configuration>
            </plugin>

Running the command above gives me

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:deploy (default-cli) on project server-policies: Wagon protocol 'https' doesn't support directory copying -> [Help 1]

My site configuration looks like this:

<distributionManagement>
    <site>
        <id>sites-repository</id>
        <url>dav:https://nx3.mydomain/repository/prd-${project.artifactId}</url>
    </site>
    ...
</distributionManagement>

Is there any way to upload sites to a Nexus-3.x repository using https?

Robert Heine
  • 1,820
  • 4
  • 29
  • 61

2 Answers2

0

No, that's not possible. You have to use http for the site repositories.

sgift
  • 137
  • 1
  • 2
0

The problem you're experiencing results from having a distributionManagement.site.url ends with a /

Assuming you have a <servers><server><id>sites-repository.... set properly in your settings file, this will work fine.

Execute mvn help:effective-pom and look at your <distributionManagement> section.

Mykel Alvis
  • 1,048
  • 11
  • 14
  • Note that `dav:https://nx3.mydomain/repository` must (somehow) point to a hosted raw repository. Ours looks more like `dav:https://nx3.domain/repository/sites` where `sites` is a hosted repository of type `raw`. – Mykel Alvis Mar 23 '18 at 15:47
  • Our repo is proxied behind a LB on AWS, so YMMV with this. – Mykel Alvis Mar 23 '18 at 15:51