简体   繁体   中英

maven-jaxb2-plugin - ignore ssl error

I am using maven-jaxb2-plugin and I get the following error

Caused by: java.security.cert.CertPathValidatorException: timestamp check failed

I understand the certificate expired and I do not manage the webservice. So how do I ignore the SSL error.

I try to generate-source as

generate-sources -Dmaven.wagon.provider.http=httpclient -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true

But I still get the same error. How do I configure Maven to ignore SSL error and generate sources.

I stronly advise against compiling online resources.

Create a local copy of what you're compiling and use catalogs to rewrite URLs.

<configuration>
    <catalogs>
        <catalog>
            <dependencyResource>
                <groupId>com.acme.foo</groupId>
                <artifactId>bar</artifactId>
                <!--
                    Version can be omitted if artifact is already
                    configured in dependencies or dependency management.
                -->
                <version><!-- Version --></version>
                <resource>catalog.cat</resource>
            </dependencyResource>
        </catalog>
    </catalogs>
</configuration>

Catalog file is as simple as:

REWRITE_SYSTEM "http://www.w3.org" "w3c"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM