Вопрос

I have a multi module project. When I launch mvn site:deploy, the deployment of the base module works fine, but it fails to create the directory of the module sites on the FTP server:

[INFO] Error uploading site
Embedded error: Required directory: '/myremoteftprepository/myproject-mymodule' is missing

When I create the missing directory by hand, it works fine, but I would like to avoid that. It is surprising that the deploy command do not create it. Do you how to force this directory creation? Is it a bug in the wagon-ftp plugin?

FYI, here is my POM:

<build>
    <extensions>
        <!-- Enabling the use of FTP -->
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ftp</artifactId>
            <version>1.0</version>
        </extension>
    </extensions>
</build>

I have chosen to include the javadoc with:

<reporting>
    <plugins>
        <!-- include javadoc in the site -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8</version>
            <configuration>
                <show>public</show>
            </configuration>
        </plugin>
    </plugins>
</reporting>

and

<distributionManagement>
    <site>
        <id>site</id>
        <name>maven site</name>
        <url>ftp://ftp.blabla.org/myremoteftprepository</url>
    </site>
</distributionManagement>

and my settings.xml is good.

Это было полезно?

Решение 2

With the most recent version of wagon-ftp (2.2), it works.

Другие советы

You should not launch the site:deploy goal, but rather the site-deploy Maven lifecycle phase e.g. like that

mvn clean install site-deploy

and also make sure that the latest version of your wagon transport is used (2.2).

Also for javadoc plugin you should configure it as reporting plugin under the configuration of the maven site plugin.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top