mirror of
https://github.com/actions/setup-java.git
synced 2025-06-30 21:04:16 +00:00
Add cacert rule for java 8
Need to add cacerts also for java 8
This commit is contained in:
parent
c98cdc2000
commit
3633b10cef
3 changed files with 16 additions and 4 deletions
9
dist/setup/index.js
generated
vendored
9
dist/setup/index.js
generated
vendored
|
@ -11093,10 +11093,14 @@ function setupMaven(opts) {
|
|||
const p12Path = path.join(certDir, 'certificate.p12');
|
||||
fs.writeFileSync(p12Path, Buffer.from(opts.keystore, 'base64'));
|
||||
core.exportVariable('MAVEN_OPTS', `-Djavax.net.ssl.keyStore=${p12Path} -Djavax.net.ssl.keyStoreType=pkcs12 -Djavax.net.ssl.keyStorePassword=${opts.password}`);
|
||||
var caCertsParam = '-cacerts';
|
||||
if (opts.javaVersion === '8') {
|
||||
caCertsParam = '-trustcacerts';
|
||||
}
|
||||
try {
|
||||
yield exec.exec(path.join(opts.javaPath, 'bin/keytool'), [
|
||||
'-importcert',
|
||||
'-cacerts',
|
||||
caCertsParam,
|
||||
'-storepass',
|
||||
'changeit',
|
||||
'-noprompt',
|
||||
|
@ -33373,7 +33377,8 @@ function run() {
|
|||
password: core.getInput(constants.INPUT_MAVEN_KEYSTORE_PASSWORD),
|
||||
settings: core.getInput(constants.INPUT_MAVEN_SETTINGS_B64),
|
||||
securitySettings: core.getInput(constants.INPUT_MAVEN_SECURITY_SETTINGS_B64),
|
||||
javaPath: ''
|
||||
javaPath: '',
|
||||
javaVersion: version
|
||||
};
|
||||
const mvnVersion = core.getInput(constants.INPUT_MAVEN_VERSION);
|
||||
const arch = core.getInput(constants.INPUT_ARCHITECTURE, { required: true });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue