Maven Auto Certificate Generator Plugin
Maven plugin to generate certificate resources in compilation time.
POM properties
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
POM plugin config
<plugin>
<groupId>com.github.yadickson</groupId>
<artifactId>autocert</artifactId>
<version>...</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
<configuration>
<pubFile>...</pubFile>
<keyFile>...</keyFile>
<certFile>...</certFile>
<algorithm>...</algorithm>
<signature>...</signature>
<keySize>...</keySize>
<years>...</years>
<issuer>...</issuer>
<subject>...</subject>
<directoryName>...</directoryName>
<outputDirectory>...</outputDirectory>
</configuration>
</plugin>
pubFile (default: pub.pem)
Public file name.
keyFile (default: key.pem)
Private file name.
certFile (default: cert.pem)
Certificate file name.
algorithm (default: RSA)
RSA
EC
ECDSA
ECDH
signature (default: SHA256withRSA)
SHA256withRSA
SHA256withECDSA
keySize (default: 1024)
RSA [1024, 2048, 4096, ..]
EC, ECDSA, ECDH [256, 384, 521]
years (default: 10)
Years validation time
>= 1
issuer (default: domain)
Issuer DN
subject (default: main)
Subject DN
directoryName (default: keys)
Directory name inside of outputDirectory.
outputDirectory (default: ${project.build.directory}/generated-resources)
Resource output directory folder.
Command line support
$ mvn clean package -Dautocert.pubFile=... -Dautocert.keyFile=... -Dautocert.certFile=... -Dautocert.algorithm=... -Dautocert.signature=... -Dautocert.keySize=... -Dautocert.years=... -Dautocert.issuer=... -Dautocert.subject=... -Dautocert.directoryName=... -Dautocert.outputDirectory=...
License
GPL-3.0 © Yadickson Soto