Send gradle build to artifactory/nexus server

apply plugin: ‘maven’
uploadArchives {
 repositories {
  mavenDeployer {
   repository(url: “{PATH_TO_REPO}”) {
    authentication(userName: “{USER_NAME}”, password: “{PASSWORD}”)
   }
   pom.version = “{POM_VERSION}”
   pom.artifactId = “{ARTIFACT_ID}”
   pom.groupId = “{GROUP_ID}”
  }
 }
}

Add a new certificate to wildfly server

Add a realm for the new certificate:
/core-service=management/security-realm={NEW_REALM_NAME}:add()

Set path to keystore:

/core-service=management/security-realm={NEW_REALM_NAME}/server-identity=ssl:add(keystore-path=ssl-keystore.jks, keystore-relative-to=jboss.server.config.dir,keystore-password=changeit, alias=myhostname.local, key-password=changeit)

or

/core-service=management/security-realm={NEW_REALM_NAME}/server-identity=ssl:write-attribute(name=keystore-relative-to,value=jboss.server.config.dir)

Set keytore:
/core-service=management/server-identity=ssl:add(keystore-password={KEY_STORE_PASSWORD}, keystore-path={KEY_STORE_FILE_NAME.jks})

Add realm to the https listener:
/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=security-realm,value={NEW_REALM_NAME})