2

I'm using maven (apache-maven-3.2.1) and maven-site-plugin into my project.

while doing mvn site behind a proxy I got the following warnings / slowness :

[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "Dependencies" report         --- maven-project-info-reports-plugin:2.8:dependencies
[WARNING] The repository url 'http://download.oracle.com/maven' is invalid - Repository 'oracle.releases' will be blacklisted.
[WARNING] The repository url 'http://snapshots.repository.codehaus.org' is invalid - Repository 'codehaus-snapshots' will be black
listed.
[WARNING] The repository url 'http://repository.codehaus.org' is invalid - Repository 'codehaus' will be blacklisted.
[WARNING] The repository url 'http://download.java.net/maven/glassfish' is invalid - Repository 'glassfish-repository' will be bla
cklisted.
[WARNING] The repository url 'http://download.java.net/maven/2/' is invalid - Repository 'maven2-repository.dev.java.net' will be
blacklisted.

I got a build success but I think that blacklisting a valid repository is an issue...

I'm behind a proxy so I defined a proxy into my maven global settings ($M2_HOME/conf/settings.xml).

For some plugins like release-plugin (cf example under) or surefire-plugin I had to override arguments with proxy settings to get a success build, but I din't find an arguments (equivalent configuration) for maven-site-plugin.

maven-release example behind a proxy

        <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.2</version>
            <configuration>
                <arguments>${proxyString}</arguments>
            </configuration>
        </plugin>
(...)
    <profile>
        <id>proxy</id>
        <activation>
            <activeByDefault>false</activeByDefault>
        </activation>
        <properties>
            <proxyString>-Djava.net.useSystemProxies=true
                -Dhttp.proxyHost=myProxy -Dhttp.proxyPort=3128
                -Dhttps.proxyHost=myProxy -Dhttps.proxyPort=3128</proxyString>
        </properties>
    </profile>

I think that maven site use maven-project-info-reports-plugin but I don't know how to pass proxy arguments to this plugin (which is -according to the doc- configured internally by maven-site) ?

I saw an old discussion on apache maven mailing list but that doesn't help me.

How to set a proxy for mvn site ?

boly38
  • 1,806
  • 24
  • 29

1 Answers1

3

Logs are listing deprecated, moved or inexisting repositories, so this warning are expected.

As this step could be really really slow, ( via this src ) there is a way to avoid generating dependencies locations:

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <configuration>
                   <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
boly38
  • 1,806
  • 24
  • 29