Class TruststoreMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generate-truststore",
          defaultPhase=PRE_INTEGRATION_TEST)
    public class TruststoreMojo
    extends org.apache.maven.plugin.AbstractMojo
    • Field Detail

      • truststoreFormat

        @Parameter(property="truststore.format",
                   defaultValue="PKCS12")
        protected TruststoreFormat truststoreFormat
        Output truststore format: JKS, JCEKS, PKCS12, BKS, UBER or BCFKS. Default: PKCS12.
      • truststoreFile

        @Parameter(property="truststore.file",
                   required=true)
        protected String truststoreFile
        Truststore filename. Required.
      • truststorePassword

        @Parameter(property="truststore.password",
                   defaultValue="changeit")
        protected String truststorePassword
        Password for created truststore. Default: changeit.
      • certificates

        @Parameter(property="truststore.certificates")
        protected List<String> certificates
        List of files with certificates to use. Optional.
      • includeDefaultTruststore

        @Parameter(property="truststore.includeDefaultTruststore",
                   defaultValue="false")
        protected boolean includeDefaultTruststore
        Set to true to load certificates from the default truststore in either <java.home>/lib/security/jssecacerts or <java.home>/lib/security/cacerts (in this order). Default: false.
      • servers

        @Parameter(property="truststore.servers")
        protected List<String> servers
        List of TLS servers to download the certificates from. Optional.
      • trustAllCertificates

        @Parameter(property="truststore.trustAllCertificates",
                   defaultValue="false")
        protected boolean trustAllCertificates
        Relevant only when specifying 'servers'. Set to true to trust server certificate when downloading certificates. Default: false.
      • retryDownloadOnFailure

        @Parameter(property="truststore.retryDownloadOnFailure",
                   defaultValue="true")
        protected boolean retryDownloadOnFailure
        Relevant only when specifying 'servers'. Set to false to disable retry on failure when downloading certificates. Default: true.
      • downloadTimeout

        @Parameter(property="truststore.downloadTimeout",
                   defaultValue="10000")
        protected int downloadTimeout
        Relevant only when specifying 'servers'. Timeout, in milliseconds, when downloading certificates. Setting to 0 (zero) means no timeout. Used as both connect and read timeout. Default: 10000 (10s).
      • dnsResolution

        @Parameter(property="truststore.dnsResolution",
                   defaultValue="ALL")
        protected DnsResolution dnsResolution
        Relevant only when specifying 'servers'. DNS resolution option: SINGLE or ALL. Default: ALL. Set to SINGLE to download certificates from a single IP address the hostname resolves to. Set to ALL to download certificates from all IP addresses the hostname resolves to. Relevant when DNS is configured to resolve given hostname to more than one IP address, and different servers might be configured to use different X.509 certificates.
      • includeCertificates

        @Parameter(property="truststore.includeCertificates",
                   defaultValue="ALL")
        protected IncludeCertificates includeCertificates
        Relevant only when specifying 'servers'. Which certificates to download: ALL, LEAF, CA. Default: ALL.
      • scryptConfig

        @Parameter
        protected CustomScryptConfig scryptConfig
        Custom Scrypt config. Can be optionally specified when 'truststoreFormat' is set to BCFKS. Ignored if specified for other types of truststores.
      • skip

        @Parameter(property="truststore.skip",
                   defaultValue="false")
        protected boolean skip
        Set to true to skip plugin execution. Default: false.
    • Constructor Detail

      • TruststoreMojo

        public TruststoreMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException