From 861c4a72b01dc2a1328dad81313496b2d2af1845 Mon Sep 17 00:00:00 2001 From: Benjamin Marwell Date: Sun, 24 Apr 2022 20:25:30 +0200 Subject: [PATCH] [#14] rework into one module, no code change yet. --- README.adoc | 3 +- keytool-api-1.5/LICENSE.txt | 202 -------- keytool-api-1.5/pom.xml | 116 ----- .../DefaultKeyToolCommandLineBuilder.java | 387 --------------- keytool-api-1.5/src/site/apt/index.apt.vm | 31 -- keytool-api-1.5/src/site/site.xml | 34 -- .../requests/KeyToolChangeAliasRequestIT.java | 42 -- .../KeyToolChangeKeyPasswordRequestIT.java | 42 -- .../KeyToolChangeStorePasswordRequestIT.java | 41 -- .../requests/KeyToolDeleteRequestIT.java | 41 -- .../KeyToolExportCertificateRequestIT.java | 43 -- .../KeyToolGenerateCertificateRequestIT.java | 43 -- ...olGenerateCertificateRequestRequestIT.java | 44 -- .../KeyToolGenerateKeyPairRequestIT.java | 47 -- .../KeyToolGenerateSecretKeyRequestIT.java | 43 -- .../KeyToolImportCertificateRequestIT.java | 48 -- .../KeyToolImportKeystoreRequestIT.java | 43 -- .../requests/KeyToolListRequestIT.java | 41 -- .../KeyToolPrintCRLFileRequestIT.java | 43 -- .../KeyToolPrintCertificateRequestIT.java | 41 -- ...yToolPrintCertificateRequestRequestIT.java | 43 -- keytool-api-1.6/LICENSE.txt | 202 -------- keytool-api-1.6/pom.xml | 116 ----- .../DefaultKeyToolCommandLineBuilder.java | 384 --------------- keytool-api-1.6/src/site/apt/index.apt.vm | 31 -- keytool-api-1.6/src/site/site.xml | 34 -- .../requests/KeyToolChangeAliasRequestIT.java | 42 -- .../KeyToolChangeKeyPasswordRequestIT.java | 41 -- .../KeyToolChangeStorePasswordRequestIT.java | 41 -- .../requests/KeyToolDeleteRequestIT.java | 40 -- .../KeyToolExportCertificateRequestIT.java | 43 -- .../KeyToolGenerateCertificateRequestIT.java | 43 -- ...olGenerateCertificateRequestRequestIT.java | 43 -- .../KeyToolGenerateKeyPairRequestIT.java | 48 -- .../KeyToolGenerateSecretKeyRequestIT.java | 44 -- .../KeyToolImportCertificateRequestIT.java | 47 -- .../KeyToolImportKeystoreRequestIT.java | 44 -- .../requests/KeyToolListRequestIT.java | 41 -- .../KeyToolPrintCRLFileRequestIT.java | 43 -- .../KeyToolPrintCertificateRequestIT.java | 40 -- ...yToolPrintCertificateRequestRequestIT.java | 44 -- keytool-api-1.7/LICENSE.txt | 202 -------- keytool-api-1.7/pom.xml | 116 ----- .../DefaultKeyToolCommandLineBuilder.java | 382 --------------- keytool-api-1.7/src/site/apt/index.apt.vm | 31 -- keytool-api-1.7/src/site/site.xml | 34 -- .../requests/KeyToolChangeAliasRequestIT.java | 42 -- .../KeyToolChangeKeyPasswordRequestIT.java | 41 -- .../KeyToolChangeStorePasswordRequestIT.java | 41 -- .../requests/KeyToolDeleteRequestIT.java | 41 -- .../KeyToolExportCertificateRequestIT.java | 44 -- .../KeyToolGenerateCertificateRequestIT.java | 47 -- ...olGenerateCertificateRequestRequestIT.java | 43 -- .../KeyToolGenerateKeyPairRequestIT.java | 48 -- .../KeyToolGenerateSecretKeyRequestIT.java | 42 -- .../KeyToolImportCertificateRequestIT.java | 47 -- .../KeyToolImportKeystoreRequestIT.java | 44 -- .../requests/KeyToolListRequestIT.java | 41 -- .../KeyToolPrintCRLFileRequestIT.java | 42 -- .../KeyToolPrintCertificateRequestIT.java | 39 -- ...yToolPrintCertificateRequestRequestIT.java | 39 -- keytool-api-test/README.txt | 12 - keytool-api-test/pom.xml | 85 ---- .../AbstractKeyToolChangeAliasRequestIT.java | 57 --- ...ractKeyToolChangeKeyPasswordRequestIT.java | 58 --- ...ctKeyToolChangeStorePasswordRequestIT.java | 59 --- .../AbstractKeyToolDeleteRequestIT.java | 59 --- ...ractKeyToolExportCertificateRequestIT.java | 61 --- ...ctKeyToolGenerateCertificateRequestIT.java | 63 --- ...olGenerateCertificateRequestRequestIT.java | 60 --- ...stractKeyToolGenerateKeyPairRequestIT.java | 58 --- ...ractKeyToolGenerateSecretKeyRequestIT.java | 57 --- ...ractKeyToolImportCertificateRequestIT.java | 59 --- ...bstractKeyToolImportKeystoreRequestIT.java | 61 --- .../AbstractKeyToolListRequestIT.java | 58 --- .../AbstractKeyToolPrintCRLFileRequestIT.java | 58 --- ...tractKeyToolPrintCertificateRequestIT.java | 57 --- ...yToolPrintCertificateRequestRequestIT.java | 59 --- .../requests/AbstractKeyToolRequestIT.java | 170 ------- .../requests/KeyToolRequestFixtures.java | 241 ---------- .../keytool/requests/ResourceFixtures.java | 161 ------- .../src/main/resources/simple-certificate | Bin 815 -> 0 bytes .../main/resources/simple-certificate-request | 14 - .../src/main/resources/simple-keystore | Bin 1288 -> 0 bytes keytool-api/LICENSE.txt | 202 -------- keytool-api/pom.xml | 86 ---- .../AbstractKeyToolCommandLineBuilder.java | 257 ---------- .../CommandLineConfigurationException.java | 54 --- .../codehaus/mojo/keytool/DefaultKeyTool.java | 111 ----- .../org/codehaus/mojo/keytool/KeyTool.java | 36 -- .../keytool/KeyToolCommandLineBuilder.java | 89 ---- .../codehaus/mojo/keytool/KeyToolRequest.java | 76 --- ...RequestWithKeyStoreAndAliasParameters.java | 56 --- .../KeyToolRequestWithKeyStoreParameters.java | 120 ----- .../codehaus/mojo/keytool/KeyToolUtil.java | 66 --- .../UnsupportedKeyToolRequestException.java | 41 -- .../requests/AbstractKeyToolRequest.java | 100 ---- ...RequestWithKeyStoreAndAliasParameters.java | 79 --- ...tKeyToolRequestWithKeyStoreParameters.java | 194 -------- .../requests/KeyToolChangeAliasRequest.java | 81 ---- .../KeyToolChangeKeyPasswordRequest.java | 80 --- .../KeyToolChangeStorePasswordRequest.java | 54 --- .../requests/KeyToolDeleteRequest.java | 29 -- .../KeyToolExportCertificateRequest.java | 78 --- .../KeyToolGenerateCertificateRequest.java | 294 ----------- ...ToolGenerateCertificateRequestRequest.java | 190 -------- .../KeyToolGenerateKeyPairRequest.java | 266 ---------- .../KeyToolGenerateSecretKeyRequest.java | 104 ---- .../KeyToolImportCertificateRequest.java | 129 ----- .../KeyToolImportKeystoreRequest.java | 455 ------------------ .../keytool/requests/KeyToolListRequest.java | 54 --- .../requests/KeyToolPrintCRLFileRequest.java | 56 --- .../KeyToolPrintCertificateRequest.java | 131 ----- ...KeyToolPrintCertificateRequestRequest.java | 56 --- keytool-api/src/site/apt/index.apt.vm | 451 ----------------- keytool-api/src/site/site.xml | 34 -- keytool-maven-plugin/LICENSE.txt | 203 -------- keytool-maven-plugin/pom.xml | 247 ---------- keytool-maven-plugin/src/site/site.xml | 18 - pom.xml | 144 ++++-- .../src => src}/it/MKEYTOOL-10/goals.txt | 0 .../src => src}/it/MKEYTOOL-10/pom.xml | 0 .../it/MKEYTOOL-10/postbuild.groovy | 0 .../src => src}/it/settings.xml | 0 .../mojo/keytool/AbstractKeyToolMojo.java | 0 .../keytool/AbstractKeyToolRequestMojo.java | 0 ...estWithKeyStoreAndAliasParametersMojo.java | 0 ...ToolRequestWithKeyStoreParametersMojo.java | 0 .../mojo/keytool/ChangeAliasMojo.java | 0 .../mojo/keytool/ChangeKeyPasswordMojo.java | 0 .../mojo/keytool/ChangeStorePasswordMojo.java | 0 .../codehaus/mojo/keytool/CleanKeyMojo.java | 0 .../mojo/keytool/DeleteAliasMojo.java | 0 .../mojo/keytool/ExportCertificateMojo.java | 0 .../mojo/keytool/GenerateCertificateMojo.java | 0 .../GenerateCertificateRequestMojo.java | 0 .../mojo/keytool/GenerateKeyPairMojo.java | 0 .../mojo/keytool/GenerateSecretKeyMojo.java | 0 .../mojo/keytool/ImportCertificateMojo.java | 0 .../mojo/keytool/ImportKeystoreMojo.java | 0 .../org/codehaus/mojo/keytool/ListMojo.java | 0 .../mojo/keytool/PrintCRLFileMojo.java | 0 .../mojo/keytool/PrintCertificateMojo.java | 0 .../keytool/PrintCertificateRequestMojo.java | 0 .../main/resources/keytool.properties | 0 .../main/resources/keytool_de.properties | 0 .../main/resources/keytool_en.properties | 0 .../main/resources/keytool_fr.properties | 0 .../site/apt/examples/examples.apt | 0 .../src => src}/site/apt/index.apt | 0 .../src => src}/site/apt/usage.apt.vm | 0 .../src => src}/site/fml/faq.fml | 0 src/site/site.xml | 35 +- .../mojo/keytool/CleanKeyMojoTest.java | 0 154 files changed, 126 insertions(+), 10432 deletions(-) delete mode 100644 keytool-api-1.5/LICENSE.txt delete mode 100644 keytool-api-1.5/pom.xml delete mode 100644 keytool-api-1.5/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java delete mode 100644 keytool-api-1.5/src/site/apt/index.apt.vm delete mode 100644 keytool-api-1.5/src/site/site.xml delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java delete mode 100644 keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java delete mode 100644 keytool-api-1.6/LICENSE.txt delete mode 100644 keytool-api-1.6/pom.xml delete mode 100644 keytool-api-1.6/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java delete mode 100644 keytool-api-1.6/src/site/apt/index.apt.vm delete mode 100644 keytool-api-1.6/src/site/site.xml delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java delete mode 100644 keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java delete mode 100644 keytool-api-1.7/LICENSE.txt delete mode 100644 keytool-api-1.7/pom.xml delete mode 100644 keytool-api-1.7/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java delete mode 100644 keytool-api-1.7/src/site/apt/index.apt.vm delete mode 100644 keytool-api-1.7/src/site/site.xml delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java delete mode 100644 keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java delete mode 100644 keytool-api-test/README.txt delete mode 100644 keytool-api-test/pom.xml delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeAliasRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeKeyPasswordRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeStorePasswordRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolDeleteRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolExportCertificateRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateKeyPairRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateSecretKeyRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportCertificateRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportKeystoreRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolListRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCRLFileRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestIT.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolRequestFixtures.java delete mode 100644 keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/ResourceFixtures.java delete mode 100644 keytool-api-test/src/main/resources/simple-certificate delete mode 100644 keytool-api-test/src/main/resources/simple-certificate-request delete mode 100644 keytool-api-test/src/main/resources/simple-keystore delete mode 100644 keytool-api/LICENSE.txt delete mode 100644 keytool-api/pom.xml delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolCommandLineBuilder.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/CommandLineConfigurationException.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/DefaultKeyTool.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyTool.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolCommandLineBuilder.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreAndAliasParameters.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreParameters.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolUtil.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/UnsupportedKeyToolRequestException.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreAndAliasParameters.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreParameters.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolListRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequest.java delete mode 100644 keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequest.java delete mode 100644 keytool-api/src/site/apt/index.apt.vm delete mode 100644 keytool-api/src/site/site.xml delete mode 100644 keytool-maven-plugin/LICENSE.txt delete mode 100644 keytool-maven-plugin/pom.xml delete mode 100644 keytool-maven-plugin/src/site/site.xml rename {keytool-maven-plugin/src => src}/it/MKEYTOOL-10/goals.txt (100%) rename {keytool-maven-plugin/src => src}/it/MKEYTOOL-10/pom.xml (100%) rename {keytool-maven-plugin/src => src}/it/MKEYTOOL-10/postbuild.groovy (100%) rename {keytool-maven-plugin/src => src}/it/settings.xml (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/AbstractKeyToolMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreParametersMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ChangeAliasMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ChangeKeyPasswordMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ChangeStorePasswordMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/CleanKeyMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/DeleteAliasMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ExportCertificateMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/GenerateCertificateMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/GenerateCertificateRequestMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/GenerateKeyPairMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/GenerateSecretKeyMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ImportCertificateMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ImportKeystoreMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/ListMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/PrintCRLFileMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/PrintCertificateMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/java/org/codehaus/mojo/keytool/PrintCertificateRequestMojo.java (100%) rename {keytool-maven-plugin/src => src}/main/resources/keytool.properties (100%) rename {keytool-maven-plugin/src => src}/main/resources/keytool_de.properties (100%) rename {keytool-maven-plugin/src => src}/main/resources/keytool_en.properties (100%) rename {keytool-maven-plugin/src => src}/main/resources/keytool_fr.properties (100%) rename {keytool-maven-plugin/src => src}/site/apt/examples/examples.apt (100%) rename {keytool-maven-plugin/src => src}/site/apt/index.apt (100%) rename {keytool-maven-plugin/src => src}/site/apt/usage.apt.vm (100%) rename {keytool-maven-plugin/src => src}/site/fml/faq.fml (100%) rename {keytool-maven-plugin/src => src}/test/java/org/codehaus/mojo/keytool/CleanKeyMojoTest.java (100%) diff --git a/README.adoc b/README.adoc index 3495ff3..73d3fce 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ = MojoHaus Keytool Maven Plugin -This is the MojoHaus http://www.mojohaus.org/keytool/[keytool]. +This is the MojoHaus http://www.mojohaus.org/keytool/[keytool-maven-plugin]. This repository also includes the https://www.mojohaus.org/keytool/keytool-maven-plugin/[keytool-maven-plugin]. image:https://img.shields.io/github/license/mojohaus/keytool.svg?label=License["Apache License, Version 2.0, January 2004",link=http://www.apache.org/licenses/] @@ -11,6 +11,7 @@ image:https://github.com/mojohaus/keytool/workflows/GitHub%20CI/badge.svg?branch === Creating Issues +// TODO: Change URL? If you find a problem please create an https://github.com/mojohaus/keytool/issues[issue in the ticket] and describe what is going wrong or what you expect to happen. If you have a full working example or a log file this is also helpful. You should of course describe only a single issue in a single ticket and not mixing up several different things into a single issue. diff --git a/keytool-api-1.5/LICENSE.txt b/keytool-api-1.5/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/keytool-api-1.5/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/keytool-api-1.5/pom.xml b/keytool-api-1.5/pom.xml deleted file mode 100644 index 854601e..0000000 --- a/keytool-api-1.5/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - 4.0.0 - - - org.codehaus.mojo - keytool - 1.6-SNAPSHOT - - - keytool-api-1.5 - - Keytool: API (jdk 1.5) - A component to assist in using keytool application - 2012 - - - - ${project.groupId} - keytool-api - ${project.version} - - - ${project.groupId} - keytool-api-test - test - ${project.version} - - - junit - junit - - - org.codehaus.plexus - plexus-component-annotations - - - org.codehaus.plexus - plexus-container-default - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java15 - 1.0 - - - - - - check - - - - - - - org.codehaus.plexus - plexus-component-metadata - - - - generate-metadata - - - - - - - - - - api-1.5 - - 1.5 - - - - - - maven-surefire-plugin - - - **/*RequestIT.java - - - - - - - - - diff --git a/keytool-api-1.5/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java b/keytool-api-1.5/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java deleted file mode 100644 index 3fa0f33..0000000 --- a/keytool-api-1.5/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java +++ /dev/null @@ -1,387 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.codehaus.mojo.keytool.requests.KeyToolChangeAliasRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeKeyPasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeStorePasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolDeleteRequest; -import org.codehaus.mojo.keytool.requests.KeyToolExportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequestRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateSecretKeyRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest; -import org.codehaus.mojo.keytool.requests.KeyToolListRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequestRequest; -import org.codehaus.plexus.component.annotations.Component; - -import java.util.HashSet; -import java.util.Set; - -/** - * To build the command line for a given {@link KeyToolRequest}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -@Component( role = KeyToolCommandLineBuilder.class, hint = "default" ) -public class DefaultKeyToolCommandLineBuilder - extends AbstractKeyToolCommandLineBuilder -{ - - /** - * Unsupported request types. - * - * @since 1.3 - */ - final Set> unsupportedRequestTypes; - - public DefaultKeyToolCommandLineBuilder() - { - this.unsupportedRequestTypes = new HashSet>(); - this.unsupportedRequestTypes.add( KeyToolImportKeystoreRequest.class ); - this.unsupportedRequestTypes.add( KeyToolGenerateCertificateRequest.class ); - this.unsupportedRequestTypes.add( KeyToolPrintCertificateRequestRequest.class ); - this.unsupportedRequestTypes.add( KeyToolPrintCRLFileRequest.class ); - } - - /** - * {@inheritDoc} - */ - public boolean supportRequestType( Class requestType ) - { - - return !unsupportedRequestTypes.contains( requestType ); - } - - /** - * {@inheritDoc} - */ - public Commandline build( KeyToolRequest request ) - throws CommandLineConfigurationException, UnsupportedKeyToolRequestException - { - checkRequiredState(); - checkSupportedRequest( request ); - - Commandline cli = new Commandline(); - - cli.setExecutable( getKeyToolFile() ); - - cli.setWorkingDirectory( request.getWorkingDirectory() ); - - if ( request instanceof KeyToolChangeAliasRequest ) - { - build( (KeyToolChangeAliasRequest) request, cli ); - } - if ( request instanceof KeyToolChangeKeyPasswordRequest ) - { - build( (KeyToolChangeKeyPasswordRequest) request, cli ); - } - if ( request instanceof KeyToolChangeStorePasswordRequest ) - { - build( (KeyToolChangeStorePasswordRequest) request, cli ); - } - if ( request instanceof KeyToolDeleteRequest ) - { - build( (KeyToolDeleteRequest) request, cli ); - } - if ( request instanceof KeyToolExportCertificateRequest ) - { - build( (KeyToolExportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequest ) - { - build( (KeyToolGenerateCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequestRequest ) - { - build( (KeyToolGenerateCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateKeyPairRequest ) - { - build( (KeyToolGenerateKeyPairRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateSecretKeyRequest ) - { - build( (KeyToolGenerateSecretKeyRequest) request, cli ); - } - if ( request instanceof KeyToolImportCertificateRequest ) - { - build( (KeyToolImportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolImportKeystoreRequest ) - { - build( (KeyToolImportKeystoreRequest) request, cli ); - } - if ( request instanceof KeyToolListRequest ) - { - build( (KeyToolListRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequest ) - { - build( (KeyToolPrintCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequestRequest ) - { - build( (KeyToolPrintCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCRLFileRequest ) - { - build( (KeyToolPrintCRLFileRequest) request, cli ); - } - - String[] arguments = request.getArguments(); - if ( arguments != null ) - { - cli.addArguments( arguments ); - } - - return cli; - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeAliasRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-keyclone", request ); - addArgIfNotEmpty( cli, "-dest", request.getDestalias() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeKeyPasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-keypasswd", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeStorePasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-storepasswd", request ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolDeleteRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-delete", request ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolExportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-export", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-gencert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-infile", request.getInfile() ); - addArgIfNotEmpty( cli, "-outfile", request.getOutfile() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-certreq", request ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateKeyPairRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genkey", request ); - - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); -// addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateSecretKeyRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genseckey", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-import", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfTrue( cli, "-trustcacerts", request.isTrustcacerts() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportKeystoreRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-importkeystore", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfNotEmpty( cli, "-srcprotected", request.isSrcprotected() ? Boolean.TRUE.toString() : "" ); - addArgIfNotEmpty( cli, "-srckeystore", request.getSrckeystore() ); - addArgIfNotEmpty( cli, "-destkeystore", request.getDestkeystore() ); - addArgIfNotEmpty( cli, "-srcstoretype", request.getSrcstoretype() ); - addArgIfNotEmpty( cli, "-deststoretype", request.getDeststoretype() ); - addArgIfNotEmpty( cli, "-srcstorepass", request.getSrcstorepass() ); - addArgIfNotEmpty( cli, "-deststorepass", request.getDeststorepass() ); - addArgIfNotEmpty( cli, "-srcprovidername", request.getSrcprovidername() ); - addArgIfNotEmpty( cli, "-destprovidername", request.getDestprovidername() ); - addArgIfNotEmpty( cli, "-srcalias", request.getSrcalias() ); - addArgIfNotEmpty( cli, "-destalias", request.getDestalias() ); - addArgIfNotEmpty( cli, "-srckeypass", request.getSrckeypass() ); - addArgIfNotEmpty( cli, "-destkeypass", request.getDestkeypass() ); - addArgIfNotEmpty( cli, "-providerclass", request.getProviderclass() ); - addArgIfNotEmpty( cli, "-providerarg", request.getProviderarg() ); - addArgIfNotEmpty( cli, "-providerpath", request.getProviderpath() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolListRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-list", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-sslserver", request.getSslserver() ); - addArgIfNotEmpty( cli, "-jarfile", request.getJarfile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcertreq", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCRLFileRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcrl", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - -} diff --git a/keytool-api-1.5/src/site/apt/index.apt.vm b/keytool-api-1.5/src/site/apt/index.apt.vm deleted file mode 100644 index 47b397d..0000000 --- a/keytool-api-1.5/src/site/apt/index.apt.vm +++ /dev/null @@ -1,31 +0,0 @@ - ------ - Overview - ------ - Tony Chemit - ------ - 2012-01-29 - ------ - - ~~ Licensed to the Apache Software Foundation (ASF) under one - ~~ or more contributor license agreements. See the NOTICE file - ~~ distributed with this work for additional information - ~~ regarding copyright ownership. The ASF licenses this file - ~~ to you under the Apache License, Version 2.0 (the - ~~ "License"); you may not use this file except in compliance - ~~ with the License. You may obtain a copy of the License at - ~~ - ~~ http://www.apache.org/licenses/LICENSE-2.0 - ~~ - ~~ Unless required by applicable law or agreed to in writing, - ~~ software distributed under the License is distributed on an - ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~~ KIND, either express or implied. See the License for the - ~~ specific language governing permissions and limitations - ~~ under the License. - - ~~ NOTE: For help with the syntax of this file, see: - ~~ http://maven.apache.org/doxia/references/apt-format.html - -Overview - - This module offers a implementation for jdk 1.5 of the keytool-api. diff --git a/keytool-api-1.5/src/site/site.xml b/keytool-api-1.5/src/site/site.xml deleted file mode 100644 index 3a0e0d3..0000000 --- a/keytool-api-1.5/src/site/site.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java deleted file mode 100644 index 2a0f014..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeAliasRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeAliasRequestIT - extends AbstractKeyToolChangeAliasRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-keyclone", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-dest", "new_alias", - "-keypass", "key-passwd" }, 0 ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java deleted file mode 100644 index 0cea377..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeKeyPasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeKeyPasswordRequestIT - extends AbstractKeyToolChangeKeyPasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-keypasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-keypass", "key-passwd", - "-new", "new-key-passwd", }, 0 ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java deleted file mode 100644 index 83bb763..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeStorePasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeStorePasswordRequestIT - extends AbstractKeyToolChangeStorePasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-storepasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-new", "new-changeit", }, 0 ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java deleted file mode 100644 index c974797..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolDeleteRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolDeleteRequestIT - extends AbstractKeyToolDeleteRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-delete", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java deleted file mode 100644 index 00924aa..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolExportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolExportCertificateRequestIT - extends AbstractKeyToolExportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-export", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-rfc", "-file", - outputFile.getAbsolutePath() }, 0 ); - - assertTrue( outputFile.exists() ); - } -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java deleted file mode 100644 index 3dc36dd..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestIT - extends AbstractKeyToolGenerateCertificateRequestIT -{ - - public KeyToolGenerateCertificateRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File inFile, File outputFile ) - { - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java deleted file mode 100644 index fe5886a..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestRequestIT - extends AbstractKeyToolGenerateCertificateRequestRequestIT -{ - - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-certreq", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-sigalg", "SHA1withDSA", - "-file", outputFile.getAbsolutePath(), "-keypass", "key-passwd", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" }, 0 ); - - assertTrue( outputFile.exists() ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java deleted file mode 100644 index 454aa11..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; -import org.junit.Assert; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateKeyPairRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateKeyPairRequestIT - extends AbstractKeyToolGenerateKeyPairRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genkey", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "dest_foo_alias", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France", "-keypass", - "key-passwd", "-validity", "100", "-keyalg", "DSA", "-keysize", "1024", "-sigalg", - "SHA1withDSA" }, 0 ); - - // key store was created - Assert.assertTrue( keyStore.exists() ); - } -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java deleted file mode 100644 index fd78bfe..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateSecretKeyRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateSecretKeyRequestIT - extends AbstractKeyToolGenerateSecretKeyRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genseckey", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "new_foo_alias", "-keypass", "key-passwd", - "-keyalg", "DES", "-keysize", "56" }, 1 ); - //FIXME tchemit 2011-11-06 Can not generate in this keystore a non private key, make this works - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java deleted file mode 100644 index 1825a23..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolImportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolImportCertificateRequestIT - extends AbstractKeyToolImportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File file ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-import", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias2", "-noprompt", "-trustcacerts", - "-file", file.getAbsolutePath(), "-keypass", "new-passwd" }, 0 ); - - assertTrue( file.exists() ); - - // key store was created - assertTrue( keyStore.exists() ); - } - - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java deleted file mode 100644 index 8d91671..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest}. - * - * @author tchemit - * @since 1.3 - */ -public class KeyToolImportKeystoreRequestIT - extends AbstractKeyToolImportKeystoreRequestIT -{ - - public KeyToolImportKeystoreRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File srcKeyStore, File destKeyStore ) - { - } - -} \ No newline at end of file diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java deleted file mode 100644 index 4e00564..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolListRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolListRequestIT - extends AbstractKeyToolListRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-list", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java deleted file mode 100644 index 84ff530..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCRLFileRequestIT - extends AbstractKeyToolPrintCRLFileRequestIT -{ - - public KeyToolPrintCRLFileRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - } - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java deleted file mode 100644 index 545a025..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestIT - extends AbstractKeyToolPrintCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-printcert", "-v", "-rfc", "-file", file.getAbsolutePath() }, - 0 ); - } - - -} diff --git a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java b/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java deleted file mode 100644 index c1a83a9..0000000 --- a/keytool-api-1.5/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestRequestIT - extends AbstractKeyToolPrintCertificateRequestRequestIT -{ - - public KeyToolPrintCertificateRequestRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - } - -} diff --git a/keytool-api-1.6/LICENSE.txt b/keytool-api-1.6/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/keytool-api-1.6/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/keytool-api-1.6/pom.xml b/keytool-api-1.6/pom.xml deleted file mode 100644 index 5e2e03f..0000000 --- a/keytool-api-1.6/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - 4.0.0 - - - org.codehaus.mojo - keytool - 1.6-SNAPSHOT - - - keytool-api-1.6 - - Keytool: API (jdk 1.6) - A component to assist in using keytool application - 2012 - - - - ${project.groupId} - keytool-api - ${project.version} - - - ${project.groupId} - keytool-api-test - test - ${project.version} - - - org.codehaus.plexus - plexus-component-annotations - - - junit - junit - - - org.codehaus.plexus - plexus-container-default - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java15 - 1.0 - - - - - - check - - - - - - - org.codehaus.plexus - plexus-component-metadata - - - - generate-metadata - - - - - - - - - - api-1.6 - - 1.6 - - - - - - maven-surefire-plugin - - - **/*RequestIT.java - - - - - - - - - diff --git a/keytool-api-1.6/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java b/keytool-api-1.6/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java deleted file mode 100644 index 311e7da..0000000 --- a/keytool-api-1.6/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java +++ /dev/null @@ -1,384 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.codehaus.mojo.keytool.requests.KeyToolChangeAliasRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeKeyPasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeStorePasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolDeleteRequest; -import org.codehaus.mojo.keytool.requests.KeyToolExportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequestRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateSecretKeyRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest; -import org.codehaus.mojo.keytool.requests.KeyToolListRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequestRequest; -import org.codehaus.plexus.component.annotations.Component; - -import java.util.HashSet; -import java.util.Set; - -/** - * To build the command line for a given {@link KeyToolRequest}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -@Component( role = KeyToolCommandLineBuilder.class, hint = "default" ) -public class DefaultKeyToolCommandLineBuilder - extends AbstractKeyToolCommandLineBuilder -{ - - /** - * Unsupported request types. - * - * @since 1.3 - */ - final Set> unsupportedRequestTypes; - - public DefaultKeyToolCommandLineBuilder() - { - this.unsupportedRequestTypes = new HashSet>(); - this.unsupportedRequestTypes.add( KeyToolGenerateCertificateRequest.class ); - this.unsupportedRequestTypes.add( KeyToolPrintCertificateRequestRequest.class ); - this.unsupportedRequestTypes.add( KeyToolPrintCRLFileRequest.class ); - } - - /** - * {@inheritDoc} - */ - public boolean supportRequestType( Class requestType ) - { - return !unsupportedRequestTypes.contains( requestType ); - } - - /** - * {@inheritDoc} - */ - public Commandline build( KeyToolRequest request ) - throws CommandLineConfigurationException, UnsupportedKeyToolRequestException - { - checkRequiredState(); - checkSupportedRequest( request ); - - Commandline cli = new Commandline(); - - cli.setExecutable( getKeyToolFile() ); - - cli.setWorkingDirectory( request.getWorkingDirectory() ); - - if ( request instanceof KeyToolChangeAliasRequest ) - { - build( (KeyToolChangeAliasRequest) request, cli ); - } - if ( request instanceof KeyToolChangeKeyPasswordRequest ) - { - build( (KeyToolChangeKeyPasswordRequest) request, cli ); - } - if ( request instanceof KeyToolChangeStorePasswordRequest ) - { - build( (KeyToolChangeStorePasswordRequest) request, cli ); - } - if ( request instanceof KeyToolDeleteRequest ) - { - build( (KeyToolDeleteRequest) request, cli ); - } - if ( request instanceof KeyToolExportCertificateRequest ) - { - build( (KeyToolExportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequest ) - { - build( (KeyToolGenerateCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequestRequest ) - { - build( (KeyToolGenerateCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateKeyPairRequest ) - { - build( (KeyToolGenerateKeyPairRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateSecretKeyRequest ) - { - build( (KeyToolGenerateSecretKeyRequest) request, cli ); - } - if ( request instanceof KeyToolImportCertificateRequest ) - { - build( (KeyToolImportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolImportKeystoreRequest ) - { - build( (KeyToolImportKeystoreRequest) request, cli ); - } - if ( request instanceof KeyToolListRequest ) - { - build( (KeyToolListRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequest ) - { - build( (KeyToolPrintCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequestRequest ) - { - build( (KeyToolPrintCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCRLFileRequest ) - { - build( (KeyToolPrintCRLFileRequest) request, cli ); - } - - String[] arguments = request.getArguments(); - if ( arguments != null ) - { - cli.addArguments( arguments ); - } - - return cli; - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeAliasRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-changealias", request ); - addArgIfNotEmpty( cli, "-destalias", request.getDestalias() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeKeyPasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-keypasswd", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeStorePasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-storepasswd", request ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolDeleteRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-delete", request ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolExportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-export", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-gencert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-infile", request.getInfile() ); - addArgIfNotEmpty( cli, "-outfile", request.getOutfile() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-certreq", request ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateKeyPairRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genkeypair", request ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateSecretKeyRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genseckey", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-importcert", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfTrue( cli, "-trustcacerts", request.isTrustcacerts() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportKeystoreRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-importkeystore", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfNotEmpty( cli, "-srcprotected", request.isSrcprotected() ? Boolean.TRUE.toString() : "" ); - addArgIfNotEmpty( cli, "-srckeystore", request.getSrckeystore() ); - addArgIfNotEmpty( cli, "-destkeystore", request.getDestkeystore() ); - addArgIfNotEmpty( cli, "-srcstoretype", request.getSrcstoretype() ); - addArgIfNotEmpty( cli, "-deststoretype", request.getDeststoretype() ); - addArgIfNotEmpty( cli, "-srcstorepass", request.getSrcstorepass() ); - addArgIfNotEmpty( cli, "-deststorepass", request.getDeststorepass() ); - addArgIfNotEmpty( cli, "-srcprovidername", request.getSrcprovidername() ); - addArgIfNotEmpty( cli, "-destprovidername", request.getDestprovidername() ); - addArgIfNotEmpty( cli, "-srcalias", request.getSrcalias() ); - addArgIfNotEmpty( cli, "-destalias", request.getDestalias() ); - addArgIfNotEmpty( cli, "-srckeypass", request.getSrckeypass() ); - addArgIfNotEmpty( cli, "-destkeypass", request.getDestkeypass() ); - addArgIfNotEmpty( cli, "-providerclass", request.getProviderclass() ); - addArgIfNotEmpty( cli, "-providerarg", request.getProviderarg() ); - addArgIfNotEmpty( cli, "-providerpath", request.getProviderpath() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolListRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-list", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-sslserver", request.getSslserver() ); - addArgIfNotEmpty( cli, "-jarfile", request.getJarfile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcertreq", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCRLFileRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcrl", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - -} diff --git a/keytool-api-1.6/src/site/apt/index.apt.vm b/keytool-api-1.6/src/site/apt/index.apt.vm deleted file mode 100644 index 3319287..0000000 --- a/keytool-api-1.6/src/site/apt/index.apt.vm +++ /dev/null @@ -1,31 +0,0 @@ - ------ - Overview - ------ - Tony Chemit - ------ - 2012-01-29 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Overview - - This module offers a implementation for jdk 1.6 of the keytool-api. diff --git a/keytool-api-1.6/src/site/site.xml b/keytool-api-1.6/src/site/site.xml deleted file mode 100644 index 3a0e0d3..0000000 --- a/keytool-api-1.6/src/site/site.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java deleted file mode 100644 index ab9290b..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeAliasRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeAliasRequestIT - extends AbstractKeyToolChangeAliasRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-changealias", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-destalias", "new_alias", - "-keypass", "key-passwd" }, 0 ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java deleted file mode 100644 index 2752d83..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeKeyPasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeKeyPasswordRequestIT - extends AbstractKeyToolChangeKeyPasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-keypasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-keypass", "key-passwd", - "-new", "new-key-passwd", }, 0 ); - } -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java deleted file mode 100644 index 83bb763..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeStorePasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeStorePasswordRequestIT - extends AbstractKeyToolChangeStorePasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-storepasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-new", "new-changeit", }, 0 ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java deleted file mode 100644 index 23310da..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolDeleteRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolDeleteRequestIT - extends AbstractKeyToolDeleteRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-delete", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java deleted file mode 100644 index 00924aa..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolExportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolExportCertificateRequestIT - extends AbstractKeyToolExportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-export", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-rfc", "-file", - outputFile.getAbsolutePath() }, 0 ); - - assertTrue( outputFile.exists() ); - } -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java deleted file mode 100644 index 3dc36dd..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestIT - extends AbstractKeyToolGenerateCertificateRequestIT -{ - - public KeyToolGenerateCertificateRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File inFile, File outputFile ) - { - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java deleted file mode 100644 index 2eeb5fb..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestRequestIT - extends AbstractKeyToolGenerateCertificateRequestRequestIT -{ - - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-certreq", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-sigalg", "SHA1withDSA", - "-file", outputFile.getAbsolutePath(), "-keypass", "key-passwd", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" }, 0 ); - - assertTrue( outputFile.exists() ); - } -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java deleted file mode 100644 index 425cac7..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; -import org.junit.Assert; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateKeyPairRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateKeyPairRequestIT - extends AbstractKeyToolGenerateKeyPairRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genkeypair", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "dest_foo_alias", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France", "-keypass", - "key-passwd", "-validity", "100", "-keyalg", "DSA", "-keysize", "1024", "-sigalg", - "SHA1withDSA", "-startdate", "2011/11/11" }, 0 ); - - // key store was created - Assert.assertTrue( keyStore.exists() ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java deleted file mode 100644 index b92c4e2..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateSecretKeyRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateSecretKeyRequestIT - extends AbstractKeyToolGenerateSecretKeyRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genseckey", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "new_foo_alias", "-keypass", "key-passwd", - "-keyalg", "DES", "-keysize", "56" }, 1 ); - //FIXME tchemit 2011-11-06 Can not generate in this keystore a non private key, make this works - } - - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java deleted file mode 100644 index 1ec5257..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolImportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolImportCertificateRequestIT - extends AbstractKeyToolImportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File file ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-importcert", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias2", "-noprompt", "-trustcacerts", - "-file", file.getAbsolutePath(), "-keypass", "new-passwd" }, 0 ); - - assertTrue( file.exists() ); - - // key store was created - assertTrue( keyStore.exists() ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java deleted file mode 100644 index b9cac4d..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest}. - * - * @author tchemit - * @since 1.3 - */ -public class KeyToolImportKeystoreRequestIT - extends AbstractKeyToolImportKeystoreRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File srcKeyStore, File destKeyStore ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-importkeystore", "-v", "-noprompt", "-srckeystore", - srcKeyStore.getAbsolutePath(), "-destkeystore", destKeyStore.getAbsolutePath(), "-srcstoretype", "jks", - "-deststoretype", "jks", "-srcstorepass", "changeit", "-deststorepass", "changeit", "-srcalias", - "foo_alias", "-destalias", "new_alias", "-srckeypass", "key-passwd", "-destkeypass", "key-passwd", }, 0 ); - - assertTrue( destKeyStore.exists() ); - } - -} \ No newline at end of file diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java deleted file mode 100644 index 4e00564..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolListRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolListRequestIT - extends AbstractKeyToolListRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-list", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java deleted file mode 100644 index 84ff530..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCRLFileRequestIT - extends AbstractKeyToolPrintCRLFileRequestIT -{ - - public KeyToolPrintCRLFileRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java deleted file mode 100644 index d30256a..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestIT - extends AbstractKeyToolPrintCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-printcert", "-v", "-rfc", "-file", file.getAbsolutePath() }, - 0 ); - } - -} diff --git a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java b/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java deleted file mode 100644 index 43a61d7..0000000 --- a/keytool-api-1.6/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestRequestIT - extends AbstractKeyToolPrintCertificateRequestRequestIT -{ - - - public KeyToolPrintCertificateRequestRequestIT() - { - super( false ); - } - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - } - -} diff --git a/keytool-api-1.7/LICENSE.txt b/keytool-api-1.7/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/keytool-api-1.7/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/keytool-api-1.7/pom.xml b/keytool-api-1.7/pom.xml deleted file mode 100644 index 364a8ea..0000000 --- a/keytool-api-1.7/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - 4.0.0 - - - org.codehaus.mojo - keytool - 1.6-SNAPSHOT - - - keytool-api-1.7 - - Keytool: API (jdk 1.7) - A component to assist in using keytool application - 2012 - - - - ${project.groupId} - keytool-api - ${project.version} - - - ${project.groupId} - keytool-api-test - test - ${project.version} - - - org.codehaus.plexus - plexus-component-annotations - - - junit - junit - - - org.codehaus.plexus - plexus-container-default - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java16 - 1.0 - - - - - - check - - - - - - - org.codehaus.plexus - plexus-component-metadata - - - - generate-metadata - - - - - - - - - - api-1.7 - - 1.7 - - - - - - maven-surefire-plugin - - - **/*RequestIT.java - - - - - - - - - diff --git a/keytool-api-1.7/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java b/keytool-api-1.7/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java deleted file mode 100644 index 84e2de8..0000000 --- a/keytool-api-1.7/src/main/java/org/codehaus/mojo/keytool/DefaultKeyToolCommandLineBuilder.java +++ /dev/null @@ -1,382 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.codehaus.mojo.keytool.requests.KeyToolChangeAliasRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeKeyPasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolChangeStorePasswordRequest; -import org.codehaus.mojo.keytool.requests.KeyToolDeleteRequest; -import org.codehaus.mojo.keytool.requests.KeyToolExportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequestRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest; -import org.codehaus.mojo.keytool.requests.KeyToolGenerateSecretKeyRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest; -import org.codehaus.mojo.keytool.requests.KeyToolListRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequest; -import org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequestRequest; -import org.codehaus.plexus.component.annotations.Component; - -import java.util.HashSet; -import java.util.Set; - -/** - * To build the command line for a given {@link KeyToolRequest}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -@Component( role = KeyToolCommandLineBuilder.class, hint = "default" ) -public class DefaultKeyToolCommandLineBuilder - extends AbstractKeyToolCommandLineBuilder -{ - - /** - * Unsupported request types. - * - * @since 1.3 - */ - final Set> unsupportedRequestTypes; - - public DefaultKeyToolCommandLineBuilder() - { - this.unsupportedRequestTypes = new HashSet>(); - } - - /** - * {@inheritDoc} - */ - public boolean supportRequestType( Class requestType ) - { - return !unsupportedRequestTypes.contains( requestType ); - } - - /** - * {@inheritDoc} - */ - public Commandline build( KeyToolRequest request ) - throws CommandLineConfigurationException, UnsupportedKeyToolRequestException - { - checkRequiredState(); - checkSupportedRequest( request ); - - Commandline cli = new Commandline(); - - cli.setExecutable( getKeyToolFile() ); - - cli.setWorkingDirectory( request.getWorkingDirectory() ); - - if ( request instanceof KeyToolChangeAliasRequest ) - { - build( (KeyToolChangeAliasRequest) request, cli ); - } - if ( request instanceof KeyToolChangeKeyPasswordRequest ) - { - build( (KeyToolChangeKeyPasswordRequest) request, cli ); - } - if ( request instanceof KeyToolChangeStorePasswordRequest ) - { - build( (KeyToolChangeStorePasswordRequest) request, cli ); - } - if ( request instanceof KeyToolDeleteRequest ) - { - build( (KeyToolDeleteRequest) request, cli ); - } - if ( request instanceof KeyToolExportCertificateRequest ) - { - build( (KeyToolExportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequest ) - { - build( (KeyToolGenerateCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateCertificateRequestRequest ) - { - build( (KeyToolGenerateCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateKeyPairRequest ) - { - build( (KeyToolGenerateKeyPairRequest) request, cli ); - } - if ( request instanceof KeyToolGenerateSecretKeyRequest ) - { - build( (KeyToolGenerateSecretKeyRequest) request, cli ); - } - if ( request instanceof KeyToolImportCertificateRequest ) - { - build( (KeyToolImportCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolImportKeystoreRequest ) - { - build( (KeyToolImportKeystoreRequest) request, cli ); - } - if ( request instanceof KeyToolListRequest ) - { - build( (KeyToolListRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequest ) - { - build( (KeyToolPrintCertificateRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCertificateRequestRequest ) - { - build( (KeyToolPrintCertificateRequestRequest) request, cli ); - } - if ( request instanceof KeyToolPrintCRLFileRequest ) - { - build( (KeyToolPrintCRLFileRequest) request, cli ); - } - - String[] arguments = request.getArguments(); - if ( arguments != null ) - { - cli.addArguments( arguments ); - } - - return cli; - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeAliasRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-changealias", request ); - addArgIfNotEmpty( cli, "-destalias", request.getDestalias() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeKeyPasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-keypasswd", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolChangeStorePasswordRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-storepasswd", request ); - addArgIfNotEmpty( cli, "-new", request.getNewPassword() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolDeleteRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-delete", request ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolExportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-export", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-gencert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-infile", request.getInfile() ); - addArgIfNotEmpty( cli, "-outfile", request.getOutfile() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-certreq", request ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateKeyPairRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genkeypair", request ); - addArgIfNotEmpty( cli, "-dname", request.getDname() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-validity", request.getValidity() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - addArgIfNotEmpty( cli, "-sigalg", request.getSigalg() ); - addArgIfNotEmpty( cli, "-startdate", request.getStartdate() ); - addArgsIfNotEmpty( cli, "-ext", request.getExts() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolGenerateSecretKeyRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-genseckey", request ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - addArgIfNotEmpty( cli, "-keyalg", request.getKeyalg() ); - addArgIfNotEmpty( cli, "-keysize", request.getKeysize() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-importcert", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfTrue( cli, "-trustcacerts", request.isTrustcacerts() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-keypass", request.getKeypass() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolImportKeystoreRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-importkeystore", request ); - addArgIfTrue( cli, "-noprompt", request.isNoprompt() ); - addArgIfNotEmpty( cli, "-srcprotected", request.isSrcprotected() ? Boolean.TRUE.toString() : "" ); - addArgIfNotEmpty( cli, "-srckeystore", request.getSrckeystore() ); - addArgIfNotEmpty( cli, "-destkeystore", request.getDestkeystore() ); - addArgIfNotEmpty( cli, "-srcstoretype", request.getSrcstoretype() ); - addArgIfNotEmpty( cli, "-deststoretype", request.getDeststoretype() ); - addArgIfNotEmpty( cli, "-srcstorepass", request.getSrcstorepass() ); - addArgIfNotEmpty( cli, "-deststorepass", request.getDeststorepass() ); - addArgIfNotEmpty( cli, "-srcprovidername", request.getSrcprovidername() ); - addArgIfNotEmpty( cli, "-destprovidername", request.getDestprovidername() ); - addArgIfNotEmpty( cli, "-srcalias", request.getSrcalias() ); - addArgIfNotEmpty( cli, "-destalias", request.getDestalias() ); - addArgIfNotEmpty( cli, "-srckeypass", request.getSrckeypass() ); - addArgIfNotEmpty( cli, "-destkeypass", request.getDestkeypass() ); - addArgIfNotEmpty( cli, "-providerclass", request.getProviderclass() ); - addArgIfNotEmpty( cli, "-providerarg", request.getProviderarg() ); - addArgIfNotEmpty( cli, "-providerpath", request.getProviderpath() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolListRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-list", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcert", request ); - addArgIfTrue( cli, "-rfc", request.isRfc() ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - addArgIfNotEmpty( cli, "-sslserver", request.getSslserver() ); - addArgIfNotEmpty( cli, "-jarfile", request.getJarfile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCertificateRequestRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcertreq", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool request to consume - * @param cli the commandline client to prepare - */ - protected void build( KeyToolPrintCRLFileRequest request, Commandline cli ) - { - addKeytoolCommandAndDefaultoptions( cli, "-printcrl", request ); - addArgIfNotEmpty( cli, "-file", request.getFile() ); - } - -} diff --git a/keytool-api-1.7/src/site/apt/index.apt.vm b/keytool-api-1.7/src/site/apt/index.apt.vm deleted file mode 100644 index ed6b35a..0000000 --- a/keytool-api-1.7/src/site/apt/index.apt.vm +++ /dev/null @@ -1,31 +0,0 @@ - ------ - Overview - ------ - Tony Chemit - ------ - 2012-07-06 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Overview - - This module offers a implementation for jdk 1.7 of the keytool-api. diff --git a/keytool-api-1.7/src/site/site.xml b/keytool-api-1.7/src/site/site.xml deleted file mode 100644 index 3a0e0d3..0000000 --- a/keytool-api-1.7/src/site/site.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java deleted file mode 100644 index ab9290b..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeAliasRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeAliasRequestIT - extends AbstractKeyToolChangeAliasRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-changealias", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-destalias", "new_alias", - "-keypass", "key-passwd" }, 0 ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java deleted file mode 100644 index 2752d83..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeKeyPasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeKeyPasswordRequestIT - extends AbstractKeyToolChangeKeyPasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-keypasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-keypass", "key-passwd", - "-new", "new-key-passwd", }, 0 ); - } -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java deleted file mode 100644 index 83bb763..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolChangeStorePasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeStorePasswordRequestIT - extends AbstractKeyToolChangeStorePasswordRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-storepasswd", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-new", "new-changeit", }, 0 ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java deleted file mode 100644 index c974797..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolDeleteRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolDeleteRequestIT - extends AbstractKeyToolDeleteRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-delete", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java deleted file mode 100644 index 739d622..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolExportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolExportCertificateRequestIT - extends AbstractKeyToolExportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-export", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-rfc", "-file", - outputFile.getAbsolutePath() }, 0 ); - - assertTrue( outputFile.exists() ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java deleted file mode 100644 index 0e08a67..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestIT.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; -import org.junit.Assert; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestIT - extends AbstractKeyToolGenerateCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File inFile, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-gencert", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-rfc", "-infile", - inFile.getAbsolutePath(), "-outfile", outputFile.getAbsolutePath(), "-sigalg", - "SHA1withDSA", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France", "-startdate", - "2011/11/11", "-validity", "100", "-keypass", "key-passwd" }, 0 ); - Assert.assertTrue( outputFile.exists() ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java deleted file mode 100644 index 2eeb5fb..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestRequestIT - extends AbstractKeyToolGenerateCertificateRequestRequestIT -{ - - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-certreq", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias", "-sigalg", "SHA1withDSA", - "-file", outputFile.getAbsolutePath(), "-keypass", "key-passwd", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" }, 0 ); - - assertTrue( outputFile.exists() ); - } -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java deleted file mode 100644 index 425cac7..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequestIT.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; -import org.junit.Assert; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateKeyPairRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateKeyPairRequestIT - extends AbstractKeyToolGenerateKeyPairRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genkeypair", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "dest_foo_alias", "-dname", - "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France", "-keypass", - "key-passwd", "-validity", "100", "-keyalg", "DSA", "-keysize", "1024", "-sigalg", - "SHA1withDSA", "-startdate", "2011/11/11" }, 0 ); - - // key store was created - Assert.assertTrue( keyStore.exists() ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java deleted file mode 100644 index bfe52a1..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolGenerateSecretKeyRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateSecretKeyRequestIT - extends AbstractKeyToolGenerateSecretKeyRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-genseckey", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "new_foo_alias", "-keypass", "key-passwd", - "-keyalg", "DES", "-keysize", "56" }, 1 ); - //FIXME tchemit 2011-11-06 Can not generate in this keystore a non private key, make this works - } -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java deleted file mode 100644 index 1ec5257..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequestIT.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolImportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolImportCertificateRequestIT - extends AbstractKeyToolImportCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore, File file ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-importcert", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias2", "-noprompt", "-trustcacerts", - "-file", file.getAbsolutePath(), "-keypass", "new-passwd" }, 0 ); - - assertTrue( file.exists() ); - - // key store was created - assertTrue( keyStore.exists() ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java deleted file mode 100644 index f7242b1..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequestIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolImportKeystoreRequest}. - * - * @author tchemit - * @since 1.3 - */ -public class KeyToolImportKeystoreRequestIT - extends AbstractKeyToolImportKeystoreRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File srcKeyStore, File destKeyStore ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-importkeystore", "-v", "-noprompt", "-srckeystore", - srcKeyStore.getAbsolutePath(), "-destkeystore", destKeyStore.getAbsolutePath(), "-srcstoretype", "jks", - "-deststoretype", "jks", "-srcstorepass", "changeit", "-deststorepass", "changeit", "-srcalias", - "foo_alias", "-destalias", "new_alias", "-srckeypass", "key-passwd", "-destkeypass", "key-passwd", }, 0 ); - - assertTrue( destKeyStore.exists() ); - } - -} \ No newline at end of file diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java deleted file mode 100644 index 4e00564..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolListRequestIT.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolListRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolListRequestIT - extends AbstractKeyToolListRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File keyStore ) - { - assertKeyToolResult( keyToolResult, - new String[]{ "-list", "-v", "-keystore", keyStore.getAbsolutePath(), "-storepass", - "changeit", "-storetype", "jks", "-alias", "foo_alias" }, 0 ); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java deleted file mode 100644 index 9378a5e..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequestIT.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolPrintCRLFileRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCRLFileRequestIT - extends AbstractKeyToolPrintCRLFileRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-printcrl", "-v", "-file", file.getAbsolutePath() }, 1 ); - - //FIXME tchemit 2011-11-06 : this only works with jdk 7 -// ,0); - } - -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java deleted file mode 100644 index 38474c4..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestIT - extends AbstractKeyToolPrintCertificateRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-printcert", "-v", "-rfc", "-file", file.getAbsolutePath() }, - 0 ); - } -} diff --git a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java b/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java deleted file mode 100644 index 4b1bae2..0000000 --- a/keytool-api-1.7/src/test/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequestIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestRequestIT - extends AbstractKeyToolPrintCertificateRequestRequestIT -{ - - @Override - protected void requestResult( JavaToolResult keyToolResult, File file ) - { - assertKeyToolResult( keyToolResult, new String[]{ "-printcertreq", "-v", "-file", file.getAbsolutePath() }, 0 ); - } - -} diff --git a/keytool-api-test/README.txt b/keytool-api-test/README.txt deleted file mode 100644 index 2a036a2..0000000 --- a/keytool-api-test/README.txt +++ /dev/null @@ -1,12 +0,0 @@ -Creating a keystore file. -If validity is out, use the following cli to regenerate a keystore, certificate-request and certificate - -rm src/test/resources/simple-keystore -rm src/test/resources/simple-certificate-request -rm src/test/resources/simple-certificate - -keytool -genkeypair -alias foo_alias -keystore src/test/resources/simple-keystore -keypass key-passwd -validity 999 -storepass changeit -dname "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" -keytool -certreq -alias foo_alias -keystore src/test/resources/simple-keystore -file src/test/resources/simple-certificate-request -keypass key-passwd -validity 999 -storepass changeit -keytool -export -alias foo_alias -keystore src/test/resources/simple-keystore -file src/test/resources/simple-certificate -storepass changeit - - diff --git a/keytool-api-test/pom.xml b/keytool-api-test/pom.xml deleted file mode 100644 index 780d4e1..0000000 --- a/keytool-api-test/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - 4.0.0 - - - org.codehaus.mojo - keytool - 1.6-SNAPSHOT - - - keytool-api-test - - Keytool: API Test - A component to test keytool-api - 2005-2013 - - - - ${project.groupId} - keytool-api - ${project.version} - - - junit - junit - compile - - - org.codehaus.plexus - plexus-container-default - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java16 - 1.0 - - - - - - check - - - - - - org.codehaus.plexus - plexus-maven-plugin - - - create-component-descriptor - generate-resources - - descriptor - - - - - - - diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeAliasRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeAliasRequestIT.java deleted file mode 100644 index d50a411..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeAliasRequestIT.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolChangeAliasRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolChangeAliasRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolChangeAliasRequestIT() - { - } - - protected AbstractKeyToolChangeAliasRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolChangeAliasRequest request = requestFixtures.createKeyToolChangeAliasRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeKeyPasswordRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeKeyPasswordRequestIT.java deleted file mode 100644 index 5f23767..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeKeyPasswordRequestIT.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolChangeKeyPasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolChangeKeyPasswordRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolChangeKeyPasswordRequestIT() - { - } - - protected AbstractKeyToolChangeKeyPasswordRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolChangeKeyPasswordRequest request = requestFixtures.createKeyToolChangeKeyPasswordRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeStorePasswordRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeStorePasswordRequestIT.java deleted file mode 100644 index 61b3a7f..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolChangeStorePasswordRequestIT.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolChangeStorePasswordRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolChangeStorePasswordRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolChangeStorePasswordRequestIT() - { - } - - protected AbstractKeyToolChangeStorePasswordRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolChangeStorePasswordRequest request = requestFixtures.createKeyToolChangeStorePasswordRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolDeleteRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolDeleteRequestIT.java deleted file mode 100644 index 44312cd..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolDeleteRequestIT.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolDeleteRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolDeleteRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolDeleteRequestIT() - { - } - - protected AbstractKeyToolDeleteRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolDeleteRequest request = requestFixtures.createKeyToolDeleteRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolExportCertificateRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolExportCertificateRequestIT.java deleted file mode 100644 index 063dde1..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolExportCertificateRequestIT.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolExportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolExportCertificateRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolExportCertificateRequestIT() - { - } - - protected AbstractKeyToolExportCertificateRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - File outputFile = resourceFixtures.outputFile(); - - KeyToolExportCertificateRequest request = - requestFixtures.createKeyToolExportCertificateRequest( keyStore, outputFile ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore, outputFile ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestIT.java deleted file mode 100644 index 35d0c36..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestIT.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolGenerateCertificateRequestIT - extends AbstractKeyToolRequestIT -{ - protected AbstractKeyToolGenerateCertificateRequestIT() - { - } - - protected AbstractKeyToolGenerateCertificateRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - File outputFile = resourceFixtures.outputFile(); - - File inFile = resourceFixtures.simpleCertificateRequest(); - - KeyToolGenerateCertificateRequest request = - requestFixtures.createKeyToolGenerateCertificateRequest( keyStore, inFile, outputFile ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore, inFile, outputFile ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore, File inFile, File outputFile ); - - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestRequestIT.java deleted file mode 100644 index 3eb007f..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateCertificateRequestRequestIT.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolGenerateCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolGenerateCertificateRequestRequestIT - extends AbstractKeyToolRequestIT -{ - protected AbstractKeyToolGenerateCertificateRequestRequestIT() - { - } - - protected AbstractKeyToolGenerateCertificateRequestRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore, File outputFile ); - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - File outputFile = resourceFixtures.outputFile(); - - KeyToolGenerateCertificateRequestRequest request = - requestFixtures.createKeyToolGenerateCertificateRequestRequest( keyStore, outputFile ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore, outputFile ); - } - - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateKeyPairRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateKeyPairRequestIT.java deleted file mode 100644 index 21a4dc0..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateKeyPairRequestIT.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolGenerateKeyPairRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolGenerateKeyPairRequestIT() - { - } - - protected AbstractKeyToolGenerateKeyPairRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore( false ); - - KeyToolGenerateKeyPairRequest request = requestFixtures.createKeyToolGenerateKeyPairRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - } - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateSecretKeyRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateSecretKeyRequestIT.java deleted file mode 100644 index 8ecccd1..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolGenerateSecretKeyRequestIT.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolGenerateSecretKeyRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolGenerateSecretKeyRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolGenerateSecretKeyRequestIT() - { - } - - protected AbstractKeyToolGenerateSecretKeyRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolGenerateSecretKeyRequest request = requestFixtures.createKeyToolGenerateSecretKeyRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportCertificateRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportCertificateRequestIT.java deleted file mode 100644 index be21c01..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportCertificateRequestIT.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolImportCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolImportCertificateRequestIT - extends AbstractKeyToolRequestIT -{ - protected AbstractKeyToolImportCertificateRequestIT() - { - } - - protected AbstractKeyToolImportCertificateRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore( false ); - - File file = resourceFixtures.simpleCertificate(); - - KeyToolImportCertificateRequest request = - requestFixtures.createKeyToolImportCertificateRequest( keyStore, file ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore, file ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore, File file ); -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportKeystoreRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportKeystoreRequestIT.java deleted file mode 100644 index 442ccca..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolImportKeystoreRequestIT.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolImportKeystoreRequest}. - * - * @author tchemit - * @since 1.3 - */ -public abstract class AbstractKeyToolImportKeystoreRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolImportKeystoreRequestIT() - { - } - - protected AbstractKeyToolImportKeystoreRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File srcKeyStore = resourceFixtures.simpleKeyStore(); - - File destKeyStore = resourceFixtures.simpleDestKeyStoreFile(); - - KeyToolImportKeystoreRequest request = - requestFixtures.createKeyToolImportKeystoreRequest( srcKeyStore, destKeyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, srcKeyStore, destKeyStore ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File srcKeyStore, File destKeyStore ); - -} \ No newline at end of file diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolListRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolListRequestIT.java deleted file mode 100644 index 9e9bfea..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolListRequestIT.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolListRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolListRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolListRequestIT() - { - } - - protected AbstractKeyToolListRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File keyStore = resourceFixtures.simpleKeyStore(); - - KeyToolListRequest request = requestFixtures.createKeyToolListRequest( keyStore ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, keyStore ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File keyStore ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCRLFileRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCRLFileRequestIT.java deleted file mode 100644 index d303bad..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCRLFileRequestIT.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link KeyToolPrintCRLFileRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolPrintCRLFileRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolPrintCRLFileRequestIT() - { - } - - protected AbstractKeyToolPrintCRLFileRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File file = resourceFixtures.simpleCertificate(); - - KeyToolPrintCRLFileRequest request = requestFixtures.createKeyToolPrintCRLFileRequest( file ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, file ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File file ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestIT.java deleted file mode 100644 index 3cfa621..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestIT.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolPrintCertificateRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolPrintCertificateRequestIT() - { - } - - protected AbstractKeyToolPrintCertificateRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File file = resourceFixtures.simpleCertificate(); - - KeyToolPrintCertificateRequest request = requestFixtures.createKeyToolPrintCertificateRequest( file ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, file ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File file ); -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestRequestIT.java deleted file mode 100644 index ddabe39..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolPrintCertificateRequestRequestIT.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; - -import java.io.File; - -/** - * Test the {@link org.codehaus.mojo.keytool.requests.KeyToolPrintCertificateRequestRequest}. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolPrintCertificateRequestRequestIT - extends AbstractKeyToolRequestIT -{ - - protected AbstractKeyToolPrintCertificateRequestRequestIT() - { - } - - protected AbstractKeyToolPrintCertificateRequestRequestIT( boolean supportedRequest ) - { - super( supportedRequest ); - } - - @Override - public final void testRequest() - throws Exception - { - - File file = resourceFixtures.simpleCertificateRequest(); - - KeyToolPrintCertificateRequestRequest request = - requestFixtures.createKeyToolPrintCertificateRequestRequest( file ); - - JavaToolResult keyToolResult = consumeRequest( request ); - - requestResult( keyToolResult, file ); - } - - protected abstract void requestResult( JavaToolResult keyToolResult, File file ); - -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestIT.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestIT.java deleted file mode 100644 index e919150..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestIT.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.apache.maven.shared.utils.cli.javatool.JavaToolException; -import org.apache.maven.shared.utils.cli.javatool.JavaToolResult; -import org.codehaus.mojo.keytool.KeyTool; -import org.codehaus.mojo.keytool.KeyToolRequest; -import org.codehaus.mojo.keytool.UnsupportedKeyToolRequestException; -import org.codehaus.plexus.PlexusTestCase; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; - -import java.io.File; -import java.util.Arrays; - -/** - * abstract test of a keytool request. - * - * @author tchemit - * @since 1.1 - */ -public abstract class AbstractKeyToolRequestIT - extends PlexusTestCase -{ - - private static final long BUILD_TIMESTAMP = System.nanoTime(); - - /** - * KeyTool to test keyTool requests. - */ - protected KeyTool tool; - - protected File workingDirectory; - - protected KeyToolRequestFixtures requestFixtures; - - protected ResourceFixtures resourceFixtures; - - private final boolean supportedRequest; - - protected AbstractKeyToolRequestIT() - { - this( true ); - } - - protected AbstractKeyToolRequestIT( boolean supportedRequest ) - { - this.supportedRequest = supportedRequest; - } - - public abstract void testRequest() - throws Exception; - - protected final JavaToolResult consumeRequest( R request ) - throws JavaToolException - { - - JavaToolResult result = null; - - if ( supportedRequest ) - { - result = executeKeyToolRequest( request ); - } - else - { - executeUnsupportedKeyToolRequest( request ); - } - return result; - } - - /** - * {@inheritDoc} - */ - @Before - public void setUp() - throws Exception - { - super.setUp(); - - String basedir = getBasedir(); - workingDirectory = new File( basedir, "target" + File.separator + "surefire-workdir" + File.separator + - getClass().getName() + "_" + BUILD_TIMESTAMP ); - - tool = (KeyTool) lookup( KeyTool.ROLE ); - - Assert.assertNotNull( tool ); - - requestFixtures = new KeyToolRequestFixtures(); - resourceFixtures = new ResourceFixtures( workingDirectory ); - } - - /** - * {@inheritDoc} - */ - @After - public void tearDown() - throws Exception - { - super.tearDown(); - tool = null; - requestFixtures = null; - resourceFixtures = null; - } - - protected JavaToolResult executeKeyToolRequest( KeyToolRequest request ) - throws JavaToolException - { - Assert.assertNotNull( request ); - JavaToolResult result = tool.execute( request ); - System.out.println( result.getCommandline().toString() ); - Assert.assertNotNull( result ); - return result; - } - - protected void assertKeyToolResult( JavaToolResult result, String[] expectedCommandLineArguments, - int expectedExitCode ) - { - assertKeyToolResult( result, expectedCommandLineArguments ); - - assertEquals( "Differing exit code , required " + expectedExitCode + " but had : " + result.getExitCode(), - expectedExitCode, result.getExitCode() ); - } - - protected void assertKeyToolResult( JavaToolResult result, String[] expectedCommandLineArguments ) - { - - Commandline commandline = result.getCommandline(); - String[] arguments = commandline.getArguments(); - - assertEquals( - "Differing number of arguments, required " + Arrays.asList( expectedCommandLineArguments ) + " but had : " + - Arrays.asList( arguments ), expectedCommandLineArguments.length, arguments.length ); - for ( int i = 0; i < arguments.length; i++ ) - { - assertEquals( expectedCommandLineArguments[i], arguments[i] ); - } - } - - protected void executeUnsupportedKeyToolRequest( KeyToolRequest request ) - throws JavaToolException - { - Assert.assertNotNull( request ); - try - { - tool.execute( request ); - Assert.fail( "Request of type " + request.getClass().getName() + " is not supported." ); - } - catch ( UnsupportedKeyToolRequestException e ) - { - Assert.assertTrue( true ); - } - } -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolRequestFixtures.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolRequestFixtures.java deleted file mode 100644 index c75e341..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolRequestFixtures.java +++ /dev/null @@ -1,241 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Request Fixtures. - * - * @author tchemit - * @since 1.3 - */ -public class KeyToolRequestFixtures -{ - public KeyToolChangeAliasRequest createKeyToolChangeAliasRequest( File keyStore ) - { - KeyToolChangeAliasRequest request = new KeyToolChangeAliasRequest(); - request.setAlias( "foo_alias" ); - request.setDestalias( "new_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setVerbose( true ); - return request; - } - - public KeyToolPrintCRLFileRequest createKeyToolPrintCRLFileRequest( File file ) - { - KeyToolPrintCRLFileRequest request = new KeyToolPrintCRLFileRequest(); - - request.setFile( file ); - request.setVerbose( true ); - return request; - } - - - public KeyToolPrintCertificateRequestRequest createKeyToolPrintCertificateRequestRequest( File file ) - { - KeyToolPrintCertificateRequestRequest request = new KeyToolPrintCertificateRequestRequest(); - - request.setFile( file ); - request.setVerbose( true ); - return request; - } - - public KeyToolPrintCertificateRequest createKeyToolPrintCertificateRequest( File file ) - { - KeyToolPrintCertificateRequest request = new KeyToolPrintCertificateRequest(); - - request.setFile( file ); - - request.setVerbose( true ); - request.setRfc( true ); - return request; - } - - public KeyToolListRequest createKeyToolListRequest( File keyStore ) - { - KeyToolListRequest request = new KeyToolListRequest(); - request.setAlias( "foo_alias" ); - - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setVerbose( true ); - request.setRfc( false ); - return request; - } - - public KeyToolImportKeystoreRequest createKeyToolImportKeystoreRequest( File srcKeyStore, File destKeyStore ) - { - KeyToolImportKeystoreRequest request = new KeyToolImportKeystoreRequest(); - - request.setSrcalias( "foo_alias" ); - request.setDestalias( "new_alias" ); - - request.setSrcstoretype( "jks" ); - request.setDeststoretype( "jks" ); - - request.setSrcstorepass( "changeit" ); - request.setDeststorepass( "changeit" ); - - request.setSrckeystore( srcKeyStore.getAbsolutePath() ); - request.setDestkeystore( destKeyStore.getAbsolutePath() ); - - request.setSrckeypass( "key-passwd" ); - request.setDestkeypass( "key-passwd" ); - request.setVerbose( true ); - request.setNoprompt( true ); - return request; - } - - public KeyToolImportCertificateRequest createKeyToolImportCertificateRequest( File keyStore, File file ) - { - KeyToolImportCertificateRequest request = new KeyToolImportCertificateRequest(); - request.setAlias( "foo_alias2" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setNoprompt( true ); - request.setVerbose( true ); - request.setTrustcacerts( true ); - request.setFile( file.getAbsolutePath() ); - request.setKeypass( "new-passwd" ); - return request; - } - - public KeyToolGenerateSecretKeyRequest createKeyToolGenerateSecretKeyRequest( File keyStore ) - { - KeyToolGenerateSecretKeyRequest request = new KeyToolGenerateSecretKeyRequest(); - request.setAlias( "new_foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setKeyalg( "DES" ); - request.setKeysize( "56" ); - request.setVerbose( true ); - return request; - } - - public KeyToolGenerateKeyPairRequest createKeyToolGenerateKeyPairRequest( File keyStore ) - { - KeyToolGenerateKeyPairRequest request = new KeyToolGenerateKeyPairRequest(); - request.setAlias( "dest_foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setSigalg( "SHA1withDSA" ); - request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); - request.setVerbose( true ); - request.setValidity( "100" ); - request.setStartdate( "2011/11/11" ); - request.setKeyalg( "DSA" ); - request.setKeysize( "1024" ); - request.setExt( "" ); - return request; - } - - public KeyToolGenerateCertificateRequestRequest createKeyToolGenerateCertificateRequestRequest( File keyStore, - File outputFile ) - { - KeyToolGenerateCertificateRequestRequest request = new KeyToolGenerateCertificateRequestRequest(); - request.setAlias( "foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setFile( outputFile ); - request.setSigalg( "SHA1withDSA" ); - request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); - request.setVerbose( true ); - return request; - } - - public KeyToolGenerateCertificateRequest createKeyToolGenerateCertificateRequest( File keyStore, File inFile, - File outputFile ) - { - KeyToolGenerateCertificateRequest request = new KeyToolGenerateCertificateRequest(); - request.setAlias( "foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setRfc( true ); - - request.setInfile( inFile ); - request.setOutfile( outputFile ); - request.setSigalg( "SHA1withDSA" ); - request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); - request.setStartdate( "2011/11/11" ); - request.setExt( "" ); - request.setValidity( "100" ); - request.setVerbose( true ); - return request; - } - - public KeyToolExportCertificateRequest createKeyToolExportCertificateRequest( File keyStore, File outputFile ) - { - KeyToolExportCertificateRequest request = new KeyToolExportCertificateRequest(); - request.setAlias( "foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setRfc( true ); - request.setFile( outputFile.getAbsolutePath() ); - request.setVerbose( true ); - return request; - } - - public KeyToolDeleteRequest createKeyToolDeleteRequest( File keyStore ) - { - KeyToolDeleteRequest request = new KeyToolDeleteRequest(); - request.setAlias( "foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setVerbose( true ); - return request; - } - - public KeyToolChangeStorePasswordRequest createKeyToolChangeStorePasswordRequest( File keyStore ) - { - KeyToolChangeStorePasswordRequest request = new KeyToolChangeStorePasswordRequest(); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setNewPassword( "new-changeit" ); - request.setVerbose( true ); - return request; - } - - public KeyToolChangeKeyPasswordRequest createKeyToolChangeKeyPasswordRequest( File keyStore ) - { - KeyToolChangeKeyPasswordRequest request = new KeyToolChangeKeyPasswordRequest(); - request.setAlias( "foo_alias" ); - request.setStoretype( "jks" ); - request.setStorepass( "changeit" ); - request.setKeystore( keyStore.getAbsolutePath() ); - request.setKeypass( "key-passwd" ); - request.setNewPassword( "new-key-passwd" ); - request.setVerbose( true ); - return request; - } -} diff --git a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/ResourceFixtures.java b/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/ResourceFixtures.java deleted file mode 100644 index e50af8a..0000000 --- a/keytool-api-test/src/main/java/org/codehaus/mojo/keytool/requests/ResourceFixtures.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.IOUtil; -import org.junit.Assert; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URL; - -/** - * Input resources fixtures. - * - * @author tchemit - * @since 1.3 - */ -public class ResourceFixtures -{ - - protected final File workingDirectory; - - public ResourceFixtures( File workingDirectory ) - { - this.workingDirectory = workingDirectory; - } - - public File simpleDestKeyStoreFile( String name ) - { - File file = new File( workingDirectory, name ); - - Assert.assertFalse( file.exists() ); - - return file; - } - - public File simpleDestKeyStoreFile() - { - return simpleDestKeyStoreFile( "destkeystore" ); - } - - public File simpleKeyStore( String name, boolean copy ) - throws IOException - { - URL keyStoreURL = getKeyStoreURL( "simple" ); - File keyStore = new File( workingDirectory, name ); - if ( copy ) - { - copyURLToFile( keyStoreURL, keyStore ); - } - return keyStore; - } - - public File simpleKeyStore() - throws IOException - { - File keyStore = simpleKeyStore( true ); - return keyStore; - } - - public File simpleKeyStore( boolean copy ) - throws IOException - { - File keyStore = simpleKeyStore( "keystore.jks", copy ); - FileUtils.forceMkdir( keyStore.getParentFile() ); - return keyStore; - } - - public File simpleKeyStore( String name ) - throws IOException - { - File keyStore = simpleKeyStore( name, true ); - Assert.assertTrue( keyStore.exists() ); - return keyStore; - } - - public File simpleCertificateRequest() - throws IOException - { - URL certificateRequestURL = getCertificateRequestURL( "simple" ); - File inFile = new File( workingDirectory, "inFile" ); - Assert.assertFalse( inFile.exists() ); - copyURLToFile( certificateRequestURL, inFile ); - Assert.assertTrue( inFile.exists() ); - return inFile; - } - - public File simpleCertificate() - throws IOException - { - URL certificateURL = getCertificateURL( "simple" ); - File inFile = new File( workingDirectory, "inFile" ); - Assert.assertFalse( inFile.exists() ); - copyURLToFile( certificateURL, inFile ); - Assert.assertTrue( inFile.exists() ); - return inFile; - } - - public File outputFile() - { - File outputFile = new File( workingDirectory, "outputFile" ); - Assert.assertFalse( outputFile.exists() ); - return outputFile; - } - - protected URL getKeyStoreURL( String prefix ) - { - return getClass().getResource( "/" + prefix + "-keystore" ); - } - - protected URL getCertificateRequestURL( String prefix ) - { - return getClass().getResource( "/" + prefix + "-certificate-request" ); - } - - protected URL getCertificateURL( String prefix ) - { - return getClass().getResource( "/" + prefix + "-certificate" ); - } - - protected void copyURLToFile( URL url, File dest ) - throws IOException - { - FileUtils.mkdir( dest.getParentFile().getAbsolutePath() ); - InputStream inputStream = url.openStream(); - try - { - OutputStream outputStream = new FileOutputStream( dest ); - try - { - IOUtil.copy( inputStream, outputStream ); - } - finally - { - IOUtil.close( outputStream ); - } - } - finally - { - IOUtil.close( inputStream ); - } - } -} diff --git a/keytool-api-test/src/main/resources/simple-certificate b/keytool-api-test/src/main/resources/simple-certificate deleted file mode 100644 index 44d1d26c83903281c8a264064a3de25dbc527fdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 815 zcmXqLV%9cjVtToNnTe5!i6wLYqc8(*Hg>Hxk8>6*%&ZIs>4y9Uyll*&ENsGTZbgZC z$*G0{27Dj^4q^7tyzIRE@;sObJ3>UzfFGoWOPIqsKP5FIv9uVbh#R4Z+kg|Kh*_A) zH`PE+oY&CEz}&#p$jHRV$T$kfH8n6cHiUBN=a44G9R^K|Ix6!<&Rwm0I}{-a-a8GJiEJ2dBd zqjiI5NXVaqBE!-a>WWIu& z_Wj|4)@!qE@15SWI>u~A_|D2H>v#XMde!tZ+=ttiy(v8~GQ4lsl}P_*h3o>24O=|L z3YA~@Xov}KKhJ5@b7I*;8?mbHkeXhN2aDIqX>VRuIx%l?J@+p~)1;5Tld2e1tj{d@ zxNk+^gw7Ss_a8<*ozFI@J1wrEI#e}<(Z~AVc~33o##RQ9I~sPqQ+xJedZWdRL(Umpy*ll>gYSJN#2*jUs^M@Ul;lPBui!i`>#``?jgqiw={owfA_j(iH|~(P1;9U z)vAWD{`Ru}Us=tvrbcgBtY{!_APY=WvV1IJEF!m`ii^t}agRIVna&uOzT-OEi9e<& zshe4!!9a&e#PwMHj>4(MI?eVs)?ai%F1? zk(Gg^iLt!-&S$SjGoN#FRTs5eE_xyA3{vF(+=Kc=~*8WpxA$jHu+4`iF#^HnAEb(u`h1iHgpFZ+7Q0xaQ9b6+lFOJ9^P8F^l#6viyK}n&T=~LDt7u}c>?n- z6^R4ePiV>g_+KSA#bNfgZMN!+vli>W4pRNw8-H5pVMA4rMdkj-4$Jo4JS$asdE@QPfx2V4btNzcxjJM7QdP?6l7*u!)clgWd zOl2+>-V(*BId|2zHH%mH_^!Q@_-$Ol2Z)@ zfYAvQ;1FgH&CAZqFVBOCup>kS4fsK7xP&>J^HWkY5=)C=intMqxD7Z#ikO9&d{YhN z#CZ*k49pEojf_l;jEtjzTvG#MV?!vHehz73+yP9pIx6!<&Rwm0I}{-a-a8GJiEJ2dBdqjiI< zN&cs_gzecg1C}nCKmP?wwSdwg|J^IE|J!~{`iFJ+^J6QPiSo1jZvJ-psN7*D(-7e( zv57|CN5NXVaqBE!-a>WWIu&_Wj|4 z)@!qE@15SWI>u~A_|D2H>v#XMde!tZ+=ttiy(v8~GQ4lsl}P_*h3o>24O=|L3YA~@ zXov}KKhJ5@b7I*;8?mbHkeXhN2aDIqX>VRuIx%l?J@+p~)1;5Tld2e1tj{d@xNk+^ zgw7Ss_a8<*ozFI@J1wrEI#e}<(Z~AVc~33o##RQ9I~sPqQ+xJedZWdRL(Um zpy*ll>gYSJN#2*jUs^M@Ul;lPBui!i`>#``?jgqiw={owfA_j(iH|~(P1;9U)vAWD z{`Ru}Us=tvrbcgBtY{!_APY=WvV1IJEF!m`ii^t}agRIVna&uOzT-OEi9e<&she4! z!9a&e#PwMHj>4(MI?eVs)?a - - - 4.0.0 - - - org.codehaus.mojo - keytool - 1.6-SNAPSHOT - - - keytool-api - - Keytool: API - A component to assist in using keytool application - 2012 - - - - org.codehaus.plexus - plexus-container-default - - - org.codehaus.plexus - plexus-component-annotations - - - org.apache.maven.shared - maven-shared-utils - - - commons-lang - commons-lang - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java15 - 1.0 - - - - - - check - - - - - - - org.codehaus.plexus - plexus-component-metadata - - - - generate-metadata - - - - - - - diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolCommandLineBuilder.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolCommandLineBuilder.java deleted file mode 100644 index 64d6445..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolCommandLineBuilder.java +++ /dev/null @@ -1,257 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.commons.lang.SystemUtils; -import org.apache.maven.shared.utils.cli.Commandline; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.util.StringUtils; - -import java.io.File; -import java.util.List; - -/** - * To build the command line for a given {@link org.codehaus.mojo.keytool.KeyToolRequest}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public abstract class AbstractKeyToolCommandLineBuilder - implements KeyToolCommandLineBuilder -{ - - /** - * Builder logger. - */ - private Logger logger; - - /** - * Keytool executable location. - */ - private String keyToolFile; - - /** - * {@inheritDoc} - */ - public final void setLogger( Logger logger ) - { - this.logger = logger; - } - - /** - * {@inheritDoc} - */ - public final void setKeyToolFile( String keyToolFile ) - { - this.keyToolFile = keyToolFile; - } - - /** - * {@inheritDoc} - */ - public final void checkRequiredState() - { - if ( logger == null ) - { - throw new IllegalStateException( "A logger instance is required." ); - } - - if ( keyToolFile == null ) - { - throw new IllegalStateException( "A keyTool file is required." ); - } - } - - /** - * {@inheritDoc} - */ - public final void checkSupportedRequest( KeyToolRequest request ) - throws UnsupportedKeyToolRequestException - { - Class requestType = request.getClass(); - if ( !supportRequestType( requestType ) ) - { - throw new UnsupportedKeyToolRequestException( "Request " + requestType.getName() + - " is not supported by your version of keytool (java " + - SystemUtils.JAVA_VERSION + ")" ); - } - } - - /** - * Get the builder logger. - * - * @return the builder logger - */ - protected final Logger getLogger() - { - return logger; - } - - /** - * Get the builder keytool program location. - * - * @return the builder keytool program location - */ - protected final String getKeyToolFile() - { - return keyToolFile; - } - - /** - * Fill the commandline client with keytool command, optional verbose option and common options from the given - * request. - * - * @param cli the commandline client to prepare - * @param keytoolcommand keytool command option to pass to keytool programm - * @param request the keytool request to consume - * @see KeyToolRequestWithKeyStoreParameters - * @see KeyToolRequestWithKeyStoreAndAliasParameters - */ - protected final void addKeytoolCommandAndDefaultoptions( Commandline cli, String keytoolcommand, - KeyToolRequest request ) - { - addArg( cli, keytoolcommand ); - addArgIfTrue( cli, "-v", request.isVerbose() ); - if ( request instanceof KeyToolRequestWithKeyStoreParameters ) - { - buildWithKeyStoreParameters( (KeyToolRequestWithKeyStoreParameters) request, cli ); - } - if ( request instanceof KeyToolRequestWithKeyStoreAndAliasParameters ) - { - buildWithKeyStoreAndAliasParameters( (KeyToolRequestWithKeyStoreAndAliasParameters) request, cli ); - } - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool import request - * @param cli the commandline client to prepare - */ - protected void buildWithKeyStoreParameters( KeyToolRequestWithKeyStoreParameters request, Commandline cli ) - { - addArgIfNotEmpty( cli, "-keystore", request.getKeystore() ); - addArgIfNotEmpty( cli, "-storepass", request.getStorepass() ); - addArgIfNotEmpty( cli, "-storetype", request.getStoretype() ); - addArgIfNotEmpty( cli, "-providername", request.getProvidername() ); - addArgIfNotEmpty( cli, "-providerclass", request.getProviderclass() ); - addArgIfNotEmpty( cli, "-providerarg", request.getProviderarg() ); - addArgIfNotEmpty( cli, "-providerpath", request.getProviderpath() ); - } - - /** - * Fill the commandline client for the given {@code request}. - * - * @param request the keytool import request - * @param cli the commandline client to prepare - */ - protected void buildWithKeyStoreAndAliasParameters( KeyToolRequestWithKeyStoreAndAliasParameters request, - Commandline cli ) - { - addArgIfNotEmpty( cli, "-protected", request.isPasswordProtected() ? Boolean.TRUE.toString() : "" ); - addArgIfNotEmpty( cli, "-alias", request.getAlias() ); - } - - /** - * Convenience method to add an argument to the command line if the the value is not null or empty. - * - * @param cli command line to fill - * @param key the argument name. - * @param value the argument value to be added. - */ - protected final void addArgIfNotEmpty( Commandline cli, String key, String value ) - { - if ( !StringUtils.isEmpty( value ) ) - { - addArg( cli, key ); - addArg( cli, value ); - } - } - - /** - * Convenience method to add repeated arguments to the command line for each value that is not null or empty. - * - * @param cli command line to fill - * @param key the argument name. - * @param values the argument values to be added. - */ - protected final void addArgsIfNotEmpty( Commandline cli, String key, List values ) - { - if ( values != null ) - { - for( String value : values ) - { - addArgIfNotEmpty( cli, key, value ); - } - } - } - - /** - * Convenience method to add an argument to the command line if the the value is not null or empty. - * - * @param cli command line to fill - * @param key the argument name. - * @param value the argument value to be added. - */ - protected final void addArgIfNotEmpty( Commandline cli, String key, File value ) - { - if ( value != null ) - { - addArg( cli, key ); - addArg( cli, value ); - } - } - - /** - * Convenience method to add an argument to the command line if the the value is true. - * - * @param cli command line to fill - * @param key the argument name. - * @param value the argument value to be test. - */ - protected final void addArgIfTrue( Commandline cli, String key, boolean value ) - { - if ( value ) - { - addArg( cli, key ); - } - } - - /** - * Convinience method to add an argument to the {@code command line}. - * - * @param cli command line to fill - * @param value the argument value to be added - */ - protected final void addArg( Commandline cli, String value ) - { - cli.createArg().setValue( value ); - } - - /** - * Convinience method to add a file argument to the {@code command line}. - * - * @param cli command line to fill - * @param value the file argument value to be added - */ - protected final void addArg( Commandline cli, File value ) - { - cli.createArg().setFile( value ); - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/CommandLineConfigurationException.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/CommandLineConfigurationException.java deleted file mode 100644 index fbddc58..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/CommandLineConfigurationException.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Signals an error during the construction of the command line used to invoke key tool. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public class CommandLineConfigurationException - extends Exception -{ - - private static final long serialVersionUID = 1L; - - /** - * Creates a new exception using the specified detail message and cause. - * - * @param message The detail message for this exception, may be null. - * @param cause The nested exception, may be null. - */ - public CommandLineConfigurationException( String message, Throwable cause ) - { - super( message, cause ); - } - - /** - * Creates a new exception using the specified detail message. - * - * @param message The detail message for this exception, may be null. - */ - public CommandLineConfigurationException( String message ) - { - super( message ); - } - -} - diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/DefaultKeyTool.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/DefaultKeyTool.java deleted file mode 100644 index 1e4df11..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/DefaultKeyTool.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.apache.maven.shared.utils.cli.StreamConsumer; -import org.apache.maven.shared.utils.cli.javatool.AbstractJavaTool; -import org.apache.maven.shared.utils.cli.javatool.JavaToolException; -import org.codehaus.plexus.component.annotations.Component; -import org.codehaus.plexus.component.annotations.Requirement; - -/** - * Default implementation of component {@link KeyTool}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -@Component( role = KeyTool.class, hint = "default" ) -public class DefaultKeyTool - extends AbstractJavaTool - implements KeyTool -{ - /** - * Command line builder. - */ - @Requirement - protected KeyToolCommandLineBuilder builder; - - public DefaultKeyTool() - { - super( "keytool" ); - } - - @Override - protected Commandline createCommandLine( KeyToolRequest request, String javaToolFile ) - throws JavaToolException - { - builder.setLogger( getLogger() ); - builder.setKeyToolFile( javaToolFile ); - Commandline cli; - try - { - cli = builder.build( request ); - } - catch ( CommandLineConfigurationException e ) - { - throw new JavaToolException( "Error configuring command-line. Reason: " + e.getMessage(), e ); - } - catch ( UnsupportedKeyToolRequestException e ) - { - throw new JavaToolException( "Error configuring command-line. Reason: " + e.getMessage(), e ); - } - if ( request.isVerbose() ) - { - getLogger().info( cli.toString() ); - } - else - { - getLogger().debug( cli.toString() ); - } - return cli; - } - - @Override - protected StreamConsumer createSystemOutStreamConsumer( KeyToolRequest request ) - { - StreamConsumer systemOut = request.getSystemOutStreamConsumer(); - - if ( systemOut == null ) - { - - final boolean verbose = request.isVerbose(); - - systemOut = new StreamConsumer() - { - - /** - * {@inheritDoc} - */ - public void consumeLine( final String line ) - { - if ( verbose ) - { - getLogger().info( line ); - } - else - { - getLogger().debug( line ); - } - } - - }; - } - return systemOut; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyTool.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyTool.java deleted file mode 100644 index a9ffbbc..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyTool.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaTool; - -/** - * Provides a facade to invoke KeyTool tool. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public interface KeyTool - extends JavaTool -{ - - /** - * Plexus role name. - */ - String ROLE = KeyTool.class.getName(); -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolCommandLineBuilder.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolCommandLineBuilder.java deleted file mode 100644 index 598ea71..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolCommandLineBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.Commandline; -import org.codehaus.plexus.logging.Logger; - -/** - * To build the command line for a given {@link KeyToolRequest}. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public interface KeyToolCommandLineBuilder -{ - /** - * Plexus role name. - */ - String ROLE = KeyToolCommandLineBuilder.class.getName(); - - /** - * Test if given request type is supported by the underlined keytool implementation. - *

- * Note: a request of a none supported type will then thrown a {@link UnsupportedKeyToolRequestException} in method {@link #build(KeyToolRequest)} - * - * @param requestType type of request to test - * @param type of request to test - * @return {@code true} if can create a such request type, {@code false} otherwise. - * @since 1.3 - */ - boolean supportRequestType( Class requestType ); - - /** - * Build the commandline given the incoming keytool request. - * - * @param request keytool request - * @return the prepared commandline client ready to be executed - * @throws CommandLineConfigurationException - * if could not find keytool executable - */ - Commandline build( KeyToolRequest request ) - throws CommandLineConfigurationException, UnsupportedKeyToolRequestException; - - /** - * Sets the logger used by the builder. - * - * @param logger logger to use in this builder - */ - void setLogger( Logger logger ); - - /** - * Sets the keytool executable location. - * - * @param keyToolFile keytool executable location to use in this builder - */ - void setKeyToolFile( String keyToolFile ); - - /** - * Checks that builder is ready to produce commandline from incoming request. - *

- * Says a logger is set and a keytool executable location is setted. - */ - void checkRequiredState(); - - /** - * Checks that builder can build the given type of request. - * - * @param request request to test - * @since 1.3 - */ - void checkSupportedRequest( KeyToolRequest request ) - throws UnsupportedKeyToolRequestException; - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequest.java deleted file mode 100644 index 04d7dd7..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequest.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolRequest; - -import java.io.File; - - -/** - * Specifies the common parameters used to control a KeyTool tool invocation. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public interface KeyToolRequest extends JavaToolRequest -{ - - /** - * Gets the value of the {@code verbose} field. - * - * @return the value of the {@code verbose} field. - */ - - boolean isVerbose(); - - /** - * Gets the value of the {@code maxMemory} field. - * - * @return the value of the {@code maxMemory} field. - */ - String[] getArguments(); - - /** - * Gets the value of the {@code workingDirectory} field. - * - * @return the value of the {@code workingDirectory} field. - */ - File getWorkingDirectory(); - - /** - * Sets the new given value to the field {@code verbose} of the request. - * - * @param verbose the new value of the field {@code verbose}. - */ - void setVerbose( boolean verbose ); - - /** - * Sets the new given value to the field {@code arguments} of the request. - * - * @param arguments the new value of the field {@code arguments}. - */ - void setArguments( String[] arguments ); - - /** - * Sets the new given value to the field {@code workingDirectory} of the request. - * - * @param workingDirectory the new value of the field {@code workingDirectory}. - */ - void setWorkingDirectory( File workingDirectory ); -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreAndAliasParameters.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreAndAliasParameters.java deleted file mode 100644 index 9464bcd..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreAndAliasParameters.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Specifies the common parameters used to control a KeyTool tool invocation. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public interface KeyToolRequestWithKeyStoreAndAliasParameters - extends KeyToolRequestWithKeyStoreParameters -{ - - /** - * Gets the value of the {@code alias} field. - * - * @return the value of the {@code alias} field. - */ - String getAlias(); - - /** - * Sets the new given value to the field {@code alias} of the request. - * - * @param alias the new value of the field {@code alias}. - */ - void setAlias( String alias ); - - /** - * Gets the value of the {@code passwordProtected} field. - * - * @return the value of the {@code passwordProtected} field - */ - boolean isPasswordProtected(); - - /** - * @param passwordProtected value of the field {@code passwordProtected} to set - */ - void setPasswordProtected( boolean passwordProtected ); - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreParameters.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreParameters.java deleted file mode 100644 index 0e42685..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolRequestWithKeyStoreParameters.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Specifies the common parameters used to control a KeyTool tool invocation. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public interface KeyToolRequestWithKeyStoreParameters - extends KeyToolRequest -{ - - /** - * Gets the value of the {@code keystore} field. - * - * @return the value of the {@code keystore} field. - */ - String getKeystore(); - - /** - * Sets the new given value to the field {@code keystore} of the request. - * - * @param keystore the new value of the field {@code keystore}. - */ - void setKeystore( String keystore ); - - /** - * Gets the value of the {@code storetype} field. - * - * @return the value of the {@code storetype} field. - */ - String getStoretype(); - - /** - * Sets the new given value to the field {@code storetype} of the request. - * - * @param storetype the new value of the field {@code storetype}. - */ - void setStoretype( String storetype ); - - /** - * Gets the value of the {@code storepass} field. - * - * @return the value of the {@code storepass} field. - */ - String getStorepass(); - - /** - * Sets the new given value to the field {@code storepass} of the request. - * - * @param storepass the new value of the field {@code storepass}. - */ - void setStorepass( String storepass ); - - /** - * Gets the value of the {@code providername} field. - * - * @return the value of the {@code providername} field - */ - String getProvidername(); - - /** - * @param providername value of the field {@code providername} to set - */ - void setProvidername( String providername ); - - /** - * Gets the value of the {@code providerclass} field. - * - * @return the value of the {@code providerclass} field - */ - String getProviderclass(); - - /** - * @param providerclass value of the field {@code providerclass} to set - */ - void setProviderclass( String providerclass ); - - /** - * Gets the value of the {@code providerarg} field. - * - * @return the value of the {@code providerarg} field - */ - String getProviderarg(); - - /** - * @param providerarg value of the field {@code providerarg} to set - */ - void setProviderarg( String providerarg ); - - /** - * Gets the value of the {@code providerpath} field. - * - * @return the value of the {@code providerpath} field - */ - String getProviderpath(); - - /** - * @param providerpath value of the field {@code providerpath} to set - */ - void setProviderpath( String providerpath ); - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolUtil.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolUtil.java deleted file mode 100644 index 600cb6e..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/KeyToolUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.commons.lang.SystemUtils; - -import java.io.File; - -/** - * Util methods for keytool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolUtil -{ - /** - * Constructs the operating system specific File path of the JRE cacerts file. - * - * @return a File representing the path to the command. - */ - public static File getJRECACerts() - { - - File cacertsFile; - - String cacertsFilepath = "lib" + File.separator + "security" + File.separator + "cacerts"; - - // For IBM's JDK 1.2 - if ( SystemUtils.IS_OS_AIX ) - { - cacertsFile = new File( SystemUtils.getJavaHome() + "/", cacertsFilepath ); - } - else if ( SystemUtils.IS_OS_MAC_OSX ) // what about IS_OS_MAC_OS ?? - { - cacertsFile = new File( SystemUtils.getJavaHome() + "/", cacertsFilepath ); - } - else - { - cacertsFile = new File( SystemUtils.getJavaHome() + "/", cacertsFilepath ); - } - - return cacertsFile; - } - - /** - * Prevent instanciation of util class. - */ - private KeyToolUtil() - { - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/UnsupportedKeyToolRequestException.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/UnsupportedKeyToolRequestException.java deleted file mode 100644 index 7efee58..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/UnsupportedKeyToolRequestException.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.mojo.keytool; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.JavaToolException; - -/** - * Signals that a request can not be consumed by the underlined keytool implementation. - * - * @author tchemit - * @since 1.3 - */ -public class UnsupportedKeyToolRequestException - extends JavaToolException -{ - private static final long serialVersionUID = 1L; - - public UnsupportedKeyToolRequestException( String message, Throwable cause ) - { - super( message, cause ); - } - - public UnsupportedKeyToolRequestException( String message ) - { - super( message ); - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequest.java deleted file mode 100644 index fc2e641..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequest.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.shared.utils.cli.javatool.AbstractJavaToolRequest; -import org.codehaus.mojo.keytool.KeyToolRequest; - -import java.io.File; - -/** - * Specifies the commons parameters used to control a key tool invocation. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public abstract class AbstractKeyToolRequest - extends AbstractJavaToolRequest - implements KeyToolRequest -{ - - /** - * Verbose output. - *

- * See options. - */ - private boolean verbose; - - /** - * List of additional arguments to append to the jarsigner command line. - */ - private String[] arguments; - - /** - * Location of the working directory. - */ - private File workingDirectory; - - /** - * {@inheritDoc} - */ - public boolean isVerbose() - { - return verbose; - } - - /** - * {@inheritDoc} - */ - public String[] getArguments() - { - return arguments; - } - - /** - * {@inheritDoc} - */ - public File getWorkingDirectory() - { - return workingDirectory; - } - - /** - * {@inheritDoc} - */ - public void setVerbose( boolean verbose ) - { - this.verbose = verbose; - } - - /** - * {@inheritDoc} - */ - public void setArguments( String[] arguments ) - { - this.arguments = arguments; - } - - /** - * {@inheritDoc} - */ - public void setWorkingDirectory( File workingDirectory ) - { - this.workingDirectory = workingDirectory; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreAndAliasParameters.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreAndAliasParameters.java deleted file mode 100644 index 367de43..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreAndAliasParameters.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.mojo.keytool.KeyToolRequestWithKeyStoreAndAliasParameters; - -/** - * Specifies the commons parameters used to control a key tool invocation which have propviders options. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public abstract class AbstractKeyToolRequestWithKeyStoreAndAliasParameters - extends AbstractKeyToolRequestWithKeyStoreParameters - implements KeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Password through protected mechanism. - *

- * See options. - */ - private boolean passwordProtected; - - /** - * Alias name of the entry to process. - *

- * See options. - */ - private String alias; - - /** - * {@inheritDoc} - */ - public final boolean isPasswordProtected() - { - return passwordProtected; - } - - /** - * {@inheritDoc} - */ - public final void setPasswordProtected( boolean passwordProtected ) - { - this.passwordProtected = passwordProtected; - } - - /** - * {@inheritDoc} - */ - public final String getAlias() - { - return alias; - } - - /** - * {@inheritDoc} - */ - public final void setAlias( String alias ) - { - this.alias = alias; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreParameters.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreParameters.java deleted file mode 100644 index 2827459..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/AbstractKeyToolRequestWithKeyStoreParameters.java +++ /dev/null @@ -1,194 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.mojo.keytool.KeyToolRequestWithKeyStoreParameters; - -/** - * Specifies the commons parameters used to control a key tool invocation which have propviders options. - * - * @author tchemit - * @version $Id$ - * @since 1.1 - */ -public abstract class AbstractKeyToolRequestWithKeyStoreParameters - extends AbstractKeyToolRequest - implements KeyToolRequestWithKeyStoreParameters -{ - - /** - * Provider name. - *

- * See options. - */ - private String providername; - - /** - * Provider class name. - *

- * See options. - */ - private String providerclass; - - /** - * Provider argument. - *

- * See options. - */ - private String providerarg; - - /** - * Provider classpath. - *

- * See options. - */ - private String providerpath; - - /** - * Keystore name. - *

- * See options. - */ - private String keystore; - - /** - * Keystore type. - *

- * See options. - */ - private String storetype; - - /** - * Keystore password. - *

- * See options. - */ - private String storepass; - - /** - * {@inheritDoc} - */ - public final String getProvidername() - { - return providername; - } - - /** - * {@inheritDoc} - */ - public final void setProvidername( String providername ) - { - this.providername = providername; - } - - /** - * {@inheritDoc} - */ - public final String getProviderclass() - { - return providerclass; - } - - /** - * {@inheritDoc} - */ - public final void setProviderclass( String providerclass ) - { - this.providerclass = providerclass; - } - - /** - * {@inheritDoc} - */ - public final String getProviderarg() - { - return providerarg; - } - - /** - * {@inheritDoc} - */ - public final void setProviderarg( String providerarg ) - { - this.providerarg = providerarg; - } - - /** - * {@inheritDoc} - */ - public final String getProviderpath() - { - return providerpath; - } - - /** - * {@inheritDoc} - */ - public final void setProviderpath( String providerpath ) - { - this.providerpath = providerpath; - } - - /** - * {@inheritDoc} - */ - public final String getKeystore() - { - return keystore; - } - - /** - * {@inheritDoc} - */ - public final void setKeystore( String keystore ) - { - this.keystore = keystore; - } - - /** - * {@inheritDoc} - */ - public final String getStoretype() - { - return storetype; - } - - /** - * {@inheritDoc} - */ - public final void setStoretype( String storetype ) - { - this.storetype = storetype; - } - - /** - * {@inheritDoc} - */ - public final String getStorepass() - { - return storepass; - } - - /** - * {@inheritDoc} - */ - public final void setStorepass( String storepass ) - { - this.storepass = storepass; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequest.java deleted file mode 100644 index 90a75d2..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequest.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to change an entry alias using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeAliasRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Destination alias. - *

- * See options. - */ - private String destalias; - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Gets the value of the {@link #destalias} field. - * - * @return the value of the {@link #destalias} field - */ - public String getDestalias() - { - return destalias; - } - - /** - * @param destalias value of the field {@link #destalias} to set - */ - public void setDestalias( String destalias ) - { - this.destalias = destalias; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequest.java deleted file mode 100644 index 174d091..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequest.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to change the key password of an entry using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeKeyPasswordRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * New password. - *

- * See options. - */ - private String newPassword; - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Gets the value of the {@link #newPassword} field. - * - * @return the value of the {@link #newPassword} field - */ - public String getNewPassword() - { - return newPassword; - } - - /** - * @param newPassword value of the field {@link #newPassword} to set - */ - public void setNewPassword( String newPassword ) - { - this.newPassword = newPassword; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequest.java deleted file mode 100644 index 39b3481..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to change the store password of a keystore using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolChangeStorePasswordRequest - extends AbstractKeyToolRequestWithKeyStoreParameters -{ - - /** - * New password. - *

- * See options. - */ - private String newPassword; - - /** - * Gets the value of the {@link #newPassword} field. - * - * @return the value of the {@link #newPassword} field - */ - public String getNewPassword() - { - return newPassword; - } - - /** - * @param newPassword value of the field {@link #newPassword} to set - */ - public void setNewPassword( String newPassword ) - { - this.newPassword = newPassword; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequest.java deleted file mode 100644 index 682e4c7..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to delete an entry alias using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolDeleteRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequest.java deleted file mode 100644 index fa0df90..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolExportCertificateRequest.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to export a certificate using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolExportCertificateRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Output in RFC style. - *

- * See options. - */ - private boolean rfc; - - /** - * Output file name. - *

- * See options. - */ - private String file; - - /** - * Gets the value of the {@link #rfc} field. - * - * @return the value of the {@link #rfc} field - */ - public boolean isRfc() - { - return rfc; - } - - /** - * @param rfc value of the field {@link #rfc} to set - */ - public void setRfc( boolean rfc ) - { - this.rfc = rfc; - } - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public String getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( String file ) - { - this.file = file; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.java deleted file mode 100644 index 389e493..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.java +++ /dev/null @@ -1,294 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -/** - * Request to do a Generate certificate from a certificate request using the KeyTool tool. - *

- * Note: Such a request requires a jdk >= 1.7. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Output in RFC style. - *

- * See options. - */ - private boolean rfc; - - /** - * input file name. - *

- * See options. - */ - private File infile; - - /** - * output file name. - *

- * See options. - */ - private File outfile; - - /** - * Signature algorithm name. - *

- * See options. - */ - private String sigalg; - - /** - * Distinguished name. - *

- * See options. - */ - private String dname; - - /** - * Certificate validity start date/time. - *

- * See options. - */ - private String startdate; - - /** - * X.509 extension. - *

- * See options. - */ - private List exts = new ArrayList(); - - /** - * Validity number of days. - *

- * See options. - */ - private String validity; - - /** - * Gets the value of the {@link #rfc} field. - * - * @return the value of the {@link #rfc} field - */ - public boolean isRfc() - { - return rfc; - } - - /** - * @param rfc value of the field {@link #rfc} to set - */ - public void setRfc( boolean rfc ) - { - this.rfc = rfc; - } - - /** - * Gets the value of the {@link #infile} field. - * - * @return the value of the {@link #infile} field - */ - public File getInfile() - { - return infile; - } - - /** - * @param infile value of the field {@link #infile} to set - */ - public void setInfile( File infile ) - { - this.infile = infile; - } - - /** - * Gets the value of the {@link #outfile} field. - * - * @return the value of the {@link #outfile} field - */ - public File getOutfile() - { - return outfile; - } - - /** - * @param outfile value of the field {@link #outfile} to set - */ - public void setOutfile( File outfile ) - { - this.outfile = outfile; - } - - /** - * Gets the value of the {@link #sigalg} field. - * - * @return the value of the {@link #sigalg} field - */ - public String getSigalg() - { - return sigalg; - } - - /** - * @param sigalg value of the field {@link #sigalg} to set - */ - public void setSigalg( String sigalg ) - { - this.sigalg = sigalg; - } - - /** - * Gets the value of the {@link #dname} field. - * - * @return the value of the {@link #dname} field - */ - public String getDname() - { - return dname; - } - - /** - * @param dname value of the field {@link #dname} to set - */ - public void setDname( String dname ) - { - this.dname = dname; - } - - /** - * Gets the value of the {@link #startdate} field. - * - * @return the value of the {@link #startdate} field - */ - public String getStartdate() - { - return startdate; - } - - /** - * @param startdate value of the field {@link #startdate} to set - */ - public void setStartdate( String startdate ) - { - this.startdate = startdate; - } - - /** - * Gets the value of the {@link #exts} field. - * - * @return the value of the {@link #exts} field - * - * @deprecated - */ - public String getExt() - { - return exts.isEmpty() ? null : exts.get(0); - } - - /** - * @param ext value of the field {@link #exts} to set - * - * @deprecated - */ - public void setExt( String ext ) - { - exts.clear(); - - if (ext != null) - { - exts.add(ext); - } - } - - /** - * @param exts values of the field {@link #exts} to set - */ - public void setExts( List exts ) - { - this.exts.clear(); - - if (exts != null) - { - this.exts.addAll(exts); - } - } - - /** - * Gets the values of the {@link #exts} field. - * - * @return the values of the {@link #exts} field - */ - public List getExts() - { - return exts; - } - - /** - * Gets the value of the {@link #validity} field. - * - * @return the value of the {@link #validity} field - */ - public String getValidity() - { - return validity; - } - - /** - * @param validity value of the field {@link #validity} to set - */ - public void setValidity( String validity ) - { - this.validity = validity; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequest.java deleted file mode 100644 index d9bda1b..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -/** - * Request to do a Generate certificate request using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateCertificateRequestRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - /** - * Signature algorithm name. - *

- * See options. - */ - private String sigalg; - - /** - * X.509 extension. - *

- * See options. - */ - private List exts = new ArrayList(); - - /** - * Distinguished name. - *

- * See options. - */ - private String dname; - - /** - * Output file name. - *

- * See options. - */ - private File file; - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public File getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( File file ) - { - this.file = file; - } - - /** - * Gets the value of the {@link #sigalg} field. - * - * @return the value of the {@link #sigalg} field - */ - public String getSigalg() - { - return sigalg; - } - - /** - * @param sigalg value of the field {@link #sigalg} to set - */ - public void setSigalg( String sigalg ) - { - this.sigalg = sigalg; - } - - /** - * Gets the value of the {@link #exts} field. - * - * @return the value of the {@link #exts} field - * - * @deprecated - */ - public String getExt() - { - return exts.isEmpty() ? null : exts.get(0); - } - - /** - * @param ext value of the field {@link #exts} to set - * - * @deprecated - */ - public void setExt( String ext ) - { - exts.clear(); - - if (ext != null) - { - exts.add(ext); - } - } - - /** - * @param exts values of the field {@link #exts} to set - */ - public void setExts( List exts ) - { - this.exts.clear(); - - if (exts != null) - { - this.exts.addAll(exts); - } - } - - /** - * Gets the values of the {@link #exts} field. - * - * @return the values of the {@link #exts} field - */ - public List getExts() - { - return exts; - } - - /** - * Gets the value of the {@link #dname} field. - * - * @return the value of the {@link #dname} field - */ - public String getDname() - { - return dname; - } - - /** - * @param dname value of the field {@link #dname} to set - */ - public void setDname( String dname ) - { - this.dname = dname; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequest.java deleted file mode 100644 index 6acc66c..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequest.java +++ /dev/null @@ -1,266 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -import java.util.ArrayList; -import java.util.List; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to generate a key pair using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateKeyPairRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Key algorithm name. - *

- * See options. - */ - private String keyalg; - - /** - * Key bit size. - *

- * See options. - */ - private String keysize; - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Signature algorithm name. - *

- * See options. - */ - private String sigalg; - - /** - * Validity number of days. - *

- * See options. - */ - private String validity; - - /** - * Certificate validity start date/time. - *

- * See options. - */ - private String startdate; - - /** - * X.509 extension. - *

- * See options. - */ - private List exts = new ArrayList(); - - /** - * Distinguished name. - *

- * See options. - */ - private String dname; - - /** - * Gets the value of the {@link #keyalg} field. - * - * @return the value of the {@link #keyalg} field - */ - public String getKeyalg() - { - return keyalg; - } - - /** - * @param keyalg value of the field {@link #keyalg} to set - */ - public void setKeyalg( String keyalg ) - { - this.keyalg = keyalg; - } - - /** - * Gets the value of the {@link #keysize} field. - * - * @return the value of the {@link #keysize} field - */ - public String getKeysize() - { - return keysize; - } - - /** - * @param keysize value of the field {@link #keysize} to set - */ - public void setKeysize( String keysize ) - { - this.keysize = keysize; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } - - /** - * Gets the value of the {@link #sigalg} field. - * - * @return the value of the {@link #sigalg} field - */ - public String getSigalg() - { - return sigalg; - } - - /** - * @param sigalg value of the field {@link #sigalg} to set - */ - public void setSigalg( String sigalg ) - { - this.sigalg = sigalg; - } - - /** - * Gets the value of the {@link #validity} field. - * - * @return the value of the {@link #validity} field - */ - public String getValidity() - { - return validity; - } - - /** - * @param validity value of the field {@link #validity} to set - */ - public void setValidity( String validity ) - { - this.validity = validity; - } - - /** - * Gets the value of the {@link #dname} field. - * - * @return the value of the {@link #dname} field - */ - public String getDname() - { - return dname; - } - - /** - * @param dname value of the field {@link #dname} to set - */ - public void setDname( String dname ) - { - // Remove any extra spaces, see http://jira.codehaus.org/browse/MKEYTOOL-10 - this.dname = dname.replaceAll( "\\s+", " " ); - } - - /** - * Gets the value of the {@link #startdate} field. - * - * @return the value of the {@link #startdate} field - */ - public String getStartdate() - { - return startdate; - } - - /** - * @param startdate value of the field {@link #startdate} to set - */ - public void setStartdate( String startdate ) - { - this.startdate = startdate; - } - - /** - * Gets the value of the {@link #exts} field. - * - * @return the value of the {@link #exts} field - * - * @deprecated - */ - public String getExt() - { - return exts.isEmpty() ? null : exts.get(0); - } - - /** - * @param ext value of the field {@link #exts} to set - * - * @deprecated - */ - public void setExt( String ext ) - { - this.exts.clear(); - - if (ext != null) - { - this.exts.add(ext); - } - } - - /** - * @param exts values of the field {@link #exts} to set - */ - public void setExts( List exts ) - { - this.exts.clear(); - - if (exts != null) - { - this.exts.addAll(exts); - } - } - - /** - * Gets the values of the {@link #exts} field. - * - * @return the values of the {@link #exts} field - */ - public List getExts() - { - return exts; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequest.java deleted file mode 100644 index e45b679..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequest.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to generate a secret key using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolGenerateSecretKeyRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Key algorithm name. - *

- * See options. - */ - private String keyalg; - - /** - * Key bit size. - *

- * See options. - */ - private String keysize; - - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Gets the value of the {@link #keyalg} field. - * - * @return the value of the {@link #keyalg} field - */ - public String getKeyalg() - { - return keyalg; - } - - /** - * @param keyalg value of the field {@link #keyalg} to set - */ - public void setKeyalg( String keyalg ) - { - this.keyalg = keyalg; - } - - /** - * Gets the value of the {@link #keysize} field. - * - * @return the value of the {@link #keysize} field - */ - public String getKeysize() - { - return keysize; - } - - /** - * @param keysize value of the field {@link #keysize} to set - */ - public void setKeysize( String keysize ) - { - this.keysize = keysize; - } - - /** - * Gets the value of the {@link #keypass} field. - * - * @return the value of the {@link #keypass} field - */ - public String getKeypass() - { - return keypass; - } - - /** - * @param keypass value of the field {@link #keypass} to set - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequest.java deleted file mode 100644 index 539532f..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequest.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to import a certificate using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolImportCertificateRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - /** - * Key password. - *

- * See options. - */ - private String keypass; - - /** - * Input file name. - *

- * See options. - */ - private String file; - - /** - * Do not prompt. - *

- * See options. - */ - private boolean noprompt; - - /** - * Trust certificates from cacerts. - *

- * See options. - */ - private boolean trustcacerts; - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public String getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( String file ) - { - this.file = file; - } - - /** - * Gets the value of the {@link #noprompt} field. - * - * @return the value of the {@link #noprompt} field - */ - public boolean isNoprompt() - { - return noprompt; - } - - /** - * @param noprompt value of the field {@link #noprompt} to set - */ - public void setNoprompt( boolean noprompt ) - { - this.noprompt = noprompt; - } - - /** - * Gets the value of the {@link #trustcacerts} field. - * - * @return the value of the {@link #trustcacerts} field - */ - public boolean isTrustcacerts() - { - return trustcacerts; - } - - /** - * @param trustcacerts value of the field {@link #trustcacerts} to set - */ - public void setTrustcacerts( boolean trustcacerts ) - { - this.trustcacerts = trustcacerts; - } - - /** - * Gets the value of the {@code keypass} field. - * - * @return the value of the {@code keypass} field. - */ - public String getKeypass() - { - return keypass; - } - - /** - * Sets the new given value to the field {@code keypass} of the request. - * - * @param keypass the new value of the field {@code keypass}. - */ - public void setKeypass( String keypass ) - { - this.keypass = keypass; - } -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequest.java deleted file mode 100644 index cdf3179..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequest.java +++ /dev/null @@ -1,455 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to import all entries of a keystore to another keystore using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolImportKeystoreRequest - extends AbstractKeyToolRequest -{ - - /** - * Source keystore name. - *

- * See options. - */ - private String srckeystore; - - /** - * Destination keystore name. - *

- * See options. - */ - private String destkeystore; - - /** - * Source keystore type. - *

- * See options. - */ - private String srcstoretype; - - /** - * Destination keystore type. - *

- * See options. - */ - private String deststoretype; - - /** - * Source keystore password. - *

- * See options. - */ - private String srcstorepass; - - /** - * Destination keystore password. - *

- * See options. - */ - private String deststorepass; - - /** - * Source keystore password protected. - *

- * See options. - */ - private boolean srcprotected; - - /** - * Source keystore provider name. - *

- * See options. - */ - private String srcprovidername; - - /** - * Destination keystore provider name. - *

- * See options. - */ - private String destprovidername; - - /** - * Source alias. - *

- * See options. - */ - private String srcalias; - - /** - * Destination alias. - *

- * See options. - */ - private String destalias; - - /** - * Source key password. - *

- * See options. - */ - private String srckeypass; - - /** - * Destination key password. - *

- * See options. - */ - private String destkeypass; - - /** - * Do not prompt. - *

- * See options. - */ - private boolean noprompt; - - /** - * Provider class name. - *

- * See options. - */ - private String providerclass; - - /** - * Provider argument. - *

- * See options. - */ - private String providerarg; - - /** - * Provider classpath. - *

- * See options. - */ - private String providerpath; - - /** - * Gets the value of the {@link #srckeystore} field. - * - * @return the value of the {@link #srckeystore} field - */ - public String getSrckeystore() - { - return srckeystore; - } - - /** - * @param srckeystore value of the field {@link #srckeystore} to set - */ - public void setSrckeystore( String srckeystore ) - { - this.srckeystore = srckeystore; - } - - /** - * Gets the value of the {@link #destkeystore} field. - * - * @return the value of the {@link #destkeystore} field - */ - public String getDestkeystore() - { - return destkeystore; - } - - /** - * @param destkeystore value of the field {@link #destkeystore} to set - */ - public void setDestkeystore( String destkeystore ) - { - this.destkeystore = destkeystore; - } - - /** - * Gets the value of the {@link #srcstoretype} field. - * - * @return the value of the {@link #srcstoretype} field - */ - public String getSrcstoretype() - { - return srcstoretype; - } - - /** - * @param srcstoretype value of the field {@link #srcstoretype} to set - */ - public void setSrcstoretype( String srcstoretype ) - { - this.srcstoretype = srcstoretype; - } - - /** - * Gets the value of the {@link #deststoretype} field. - * - * @return the value of the {@link #deststoretype} field - */ - public String getDeststoretype() - { - return deststoretype; - } - - /** - * @param deststoretype value of the field {@link #deststoretype} to set - */ - public void setDeststoretype( String deststoretype ) - { - this.deststoretype = deststoretype; - } - - /** - * Gets the value of the {@link #srcstorepass} field. - * - * @return the value of the {@link #srcstorepass} field - */ - public String getSrcstorepass() - { - return srcstorepass; - } - - /** - * @param srcstorepass value of the field {@link #srcstorepass} to set - */ - public void setSrcstorepass( String srcstorepass ) - { - this.srcstorepass = srcstorepass; - } - - /** - * Gets the value of the {@link #deststorepass} field. - * - * @return the value of the {@link #deststorepass} field - */ - public String getDeststorepass() - { - return deststorepass; - } - - /** - * @param deststorepass value of the field {@link #deststorepass} to set - */ - public void setDeststorepass( String deststorepass ) - { - this.deststorepass = deststorepass; - } - - /** - * Gets the value of the {@link #srcprotected} field. - * - * @return the value of the {@link #srcprotected} field - */ - public boolean isSrcprotected() - { - return srcprotected; - } - - /** - * @param srcprotected value of the field {@link #srcprotected} to set - */ - public void setSrcprotected( boolean srcprotected ) - { - this.srcprotected = srcprotected; - } - - /** - * Gets the value of the {@link #srcprovidername} field. - * - * @return the value of the {@link #srcprovidername} field - */ - public String getSrcprovidername() - { - return srcprovidername; - } - - /** - * @param srcprovidername value of the field {@link #srcprovidername} to set - */ - public void setSrcprovidername( String srcprovidername ) - { - this.srcprovidername = srcprovidername; - } - - /** - * Gets the value of the {@link #destprovidername} field. - * - * @return the value of the {@link #destprovidername} field - */ - public String getDestprovidername() - { - return destprovidername; - } - - /** - * @param destprovidername value of the field {@link #destprovidername} to set - */ - public void setDestprovidername( String destprovidername ) - { - this.destprovidername = destprovidername; - } - - /** - * Gets the value of the {@link #srcalias} field. - * - * @return the value of the {@link #srcalias} field - */ - public String getSrcalias() - { - return srcalias; - } - - /** - * @param srcalias value of the field {@link #srcalias} to set - */ - public void setSrcalias( String srcalias ) - { - this.srcalias = srcalias; - } - - /** - * Gets the value of the {@link #destalias} field. - * - * @return the value of the {@link #destalias} field - */ - public String getDestalias() - { - return destalias; - } - - /** - * @param destalias value of the field {@link #destalias} to set - */ - public void setDestalias( String destalias ) - { - this.destalias = destalias; - } - - /** - * Gets the value of the {@link #srckeypass} field. - * - * @return the value of the {@link #srckeypass} field - */ - public String getSrckeypass() - { - return srckeypass; - } - - /** - * @param srckeypass value of the field {@link #srckeypass} to set - */ - public void setSrckeypass( String srckeypass ) - { - this.srckeypass = srckeypass; - } - - /** - * Gets the value of the {@link #destkeypass} field. - * - * @return the value of the {@link #destkeypass} field - */ - public String getDestkeypass() - { - return destkeypass; - } - - /** - * @param destkeypass value of the field {@link #destkeypass} to set - */ - public void setDestkeypass( String destkeypass ) - { - this.destkeypass = destkeypass; - } - - /** - * Gets the value of the {@link #noprompt} field. - * - * @return the value of the {@link #noprompt} field - */ - public boolean isNoprompt() - { - return noprompt; - } - - /** - * @param noprompt value of the field {@link #noprompt} to set - */ - public void setNoprompt( boolean noprompt ) - { - this.noprompt = noprompt; - } - - - /** - * Gets the value of the {@link #providerclass} field. - * - * @return the value of the {@link #providerclass} field - */ - public String getProviderclass() - { - return providerclass; - } - - /** - * @param providerclass value of the field {@link #providerclass} to set - */ - public void setProviderclass( String providerclass ) - { - this.providerclass = providerclass; - } - - /** - * Gets the value of the {@link #providerarg} field. - * - * @return the value of the {@link #providerarg} field - */ - public String getProviderarg() - { - return providerarg; - } - - /** - * @param providerarg value of the field {@link #providerarg} to set - */ - public void setProviderarg( String providerarg ) - { - this.providerarg = providerarg; - } - - /** - * Gets the value of the {@link #providerpath} field. - * - * @return the value of the {@link #providerpath} field - */ - public String getProviderpath() - { - return providerpath; - } - - /** - * @param providerpath value of the field {@link #providerpath} to set - */ - public void setProviderpath( String providerpath ) - { - this.providerpath = providerpath; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolListRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolListRequest.java deleted file mode 100644 index ee889f2..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolListRequest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Request to list entries in a keystore using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolListRequest - extends AbstractKeyToolRequestWithKeyStoreAndAliasParameters -{ - - /** - * Output in RFC style. - *

- * See options. - */ - private boolean rfc; - - /** - * Gets the value of the {@link #rfc} field. - * - * @return the value of the {@link #rfc} field - */ - public boolean isRfc() - { - return rfc; - } - - /** - * @param rfc value of the field {@link #rfc} to set - */ - public void setRfc( boolean rfc ) - { - this.rfc = rfc; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequest.java deleted file mode 100644 index 7f1b41c..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Request to print the content of a CRL file using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCRLFileRequest - extends AbstractKeyToolRequest -{ - - /** - * Input file name. - *

- * See options. - */ - private File file; - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public File getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( File file ) - { - this.file = file; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequest.java deleted file mode 100644 index 7db38be..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequest.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Request to print the content of a certificate using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequest - extends AbstractKeyToolRequest -{ - - /** - * Output in RFC style. - *

- * See options. - */ - private boolean rfc; - - /** - * Input file name. - *

- * See options. - */ - private File file; - - /** - * SSL server host and port. - *

- * See options. - */ - private String sslserver; - - /** - * Signed jar file. - *

- * See options. - */ - private File jarfile; - - /** - * Gets the value of the {@link #rfc} field. - * - * @return the value of the {@link #rfc} field - */ - public boolean isRfc() - { - return rfc; - } - - /** - * @param rfc value of the field {@link #rfc} to set - */ - public void setRfc( boolean rfc ) - { - this.rfc = rfc; - } - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public File getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( File file ) - { - this.file = file; - } - - /** - * Gets the value of the {@link #sslserver} field. - * - * @return the value of the {@link #sslserver} field - */ - public String getSslserver() - { - return sslserver; - } - - /** - * @param sslserver value of the field {@link #sslserver} to set - */ - public void setSslserver( String sslserver ) - { - this.sslserver = sslserver; - } - - /** - * Gets the value of the {@link #jarfile} field. - * - * @return the value of the {@link #jarfile} field - */ - public File getJarfile() - { - return jarfile; - } - - /** - * @param jarfile value of the field {@link #jarfile} to set - */ - public void setJarfile( File jarfile ) - { - this.jarfile = jarfile; - } - -} diff --git a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequest.java b/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequest.java deleted file mode 100644 index 76bf15c..0000000 --- a/keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.mojo.keytool.requests; - -/* - * Copyright 2005-2013 The Codehaus - * - * Licensed under the Apache License, Version 2.0 (the "License" ); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Request to print the content of a certificate request using the KeyTool tool. - * - * @author tchemit - * @since 1.1 - */ -public class KeyToolPrintCertificateRequestRequest - extends AbstractKeyToolRequest -{ - - /** - * Input file name. - *

- * See options. - */ - private File file; - - /** - * Gets the value of the {@link #file} field. - * - * @return the value of the {@link #file} field - */ - public File getFile() - { - return file; - } - - /** - * @param file value of the field {@link #file} to set - */ - public void setFile( File file ) - { - this.file = file; - } - -} diff --git a/keytool-api/src/site/apt/index.apt.vm b/keytool-api/src/site/apt/index.apt.vm deleted file mode 100644 index 810b124..0000000 --- a/keytool-api/src/site/apt/index.apt.vm +++ /dev/null @@ -1,451 +0,0 @@ - ------ - Overview - ------ - Tony Chemit - ------ - 2012-01-29 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -Overview - - This component provides a api to invoke the keytool java program. As the keytool is not compatible from a jdk to - another one. - - There is implementation for jdk 1.5 and 1.6+. (jdk 1.6 and more are compatible) - -* Dependency declaration - - To use it according to the jdk installed on your system, use some profile activated by the jdk version: - -+--------- - - api-1.5 - - 1.5 - - - - - ${project.groupId} - keytool-api-1.5 - ${project.version} - - - - - - api-1.6 - - 1.6 - - - - ${project.groupId} - keytool-api-1.6 - ${project.version} - - - - - - api-1.7 - - 1.7 - - - - ${project.groupId} - keytool-api-1.6 - ${project.version} - - - -+--------- - -API - -* Change an alias inside a keystore - - You must construct a KeyToolChangeAliasRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolChangeAliasRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolChangeAliasRequest request = new KeyToolChangeAliasRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setDestalias( "dest-alias" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- - -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Change a key password - - You must construct a KeyToolChangeKeyPasswordRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolChangeKeyPasswordRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolChangeKeyPasswordRequest request = new KeyToolChangeKeyPasswordRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setNewPassword( "new-key-passwd" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Change a key store password - - You must construct a KeyToolChangeStorePasswordRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolChangeStorePasswordRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolChangeStorePasswordRequest request = new KeyToolChangeStorePasswordRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setNewPassword( "new-changeit" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Delete a key - - You must construct a KeyToolDeleteRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolDeleteRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolDeleteRequest request = new KeyToolDeleteRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Export a certificate - - You must construct a KeyToolExportCertificateRequest. See {{{./apidocs/org/codehaus/mojo/shared/keytool/requests/KeyToolExportCertificateRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolExportCertificateRequest request = new KeyToolExportCertificateRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setFile( "outputFile" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Generate a certificate from a certificate request - - You must construct a KeyToolGenerateCertificateRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolGenerateCertificateRequest request = new KeyToolGenerateCertificateRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setInfile( inFile ); -request.setOutfile( "outputFile" ); -request.setSigalg( "SHA1withDSA" ); -request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); -request.setStartdate( "2011/11/11" ); -request.setValidity( "100" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Generate a certificate request - - You must construct a KeyToolGenerateCertificateRequestRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequestRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolGenerateCertificateRequestRequest request = new KeyToolGenerateCertificateRequestRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setFile( outputFile ); -request.setSigalg( "SHA1withDSA" ); -request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Generate a key pair - - You must construct a KeyToolGenerateKeyPairRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolGenerateKeyPairRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolGenerateKeyPairRequest request = new KeyToolGenerateKeyPairRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setSigalg( "SHA1withDSA" ); -request.setDname( "CN=Me, OU=Unknown, O=Codehaus, L=Unknown, ST=Unknown, C=France" ); -request.setValidity( "100" ); -request.setStartdate( "2011/11/11" ); -request.setKeyalg( "DSA" ); -request.setKeysize( "1024" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Generate a secret key - - You must construct a KeyToolGenerateSecretKeyRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolGenerateSecretKeyRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolGenerateSecretKeyRequest request = new KeyToolGenerateSecretKeyRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setKeyalg( "DES" ); -request.setKeysize( "56" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Import a certificate into a key store - - You must construct a KeyToolImportCertificateRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolImportCertificateRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolImportCertificateRequest request = new KeyToolImportCertificateRequest(); -request.setVerbose( true ); -request.setKeystore( "keystore" ); -request.setStorepass( "changeit" ); -request.setAlias( "foo_alias" ); -request.setKeypass( "key-passwd" ); -request.setFile( "certificate" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Import a key store to another one - - You must construct a KeyToolImportKeystoreRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolImportKeystoreRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolImportKeystoreRequest request = new KeyToolImportKeystoreRequest(); -request.setVerbose( true ); -request.setSrckeystore( "keystore" ); -request.setDestkeystore( "dest-keystore" ); -request.setSrcstorepass( "changeit" ); -request.setDeststorepass( "changeit" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* List the content of a key store - - You must construct a KeyToolListRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolListRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolListRequest request = new KeyToolListRequest(); -request.setVerbose( true ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Display content of a certificate - - You must construct a KeyToolPrintCertificateRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolPrintCertificateRequest request = new KeyToolPrintCertificateRequest(); -request.setVerbose( true ); -request.setFile( "certificate" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Display content of a certificate request - - You must construct a KeyToolPrintCertificateRequestRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolPrintCertificateRequestRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolPrintCertificateRequestRequest request = new KeyToolPrintCertificateRequestRequest(); -request.setVerbose( true ); -request.setFile( "certificate-request" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- - -* Display content of a CRL file - - You must construct a KeyToolPrintCRLFileRequest. See {{{./apidocs/org/codehaus/mojo/keytool/requests/KeyToolPrintCRLFileRequest.html}javadoc}} for more available options. - -+--------- - -KeyToolPrintCRLFileRequest request = new KeyToolPrintCRLFileRequest(); -request.setVerbose( true ); -request.setFile( "crf-file" ); -+--------- - - Now you can use the component to sign your jar: - -+--------- -JavaToolResult result = keyTool.execute( request ); -// control the execution result -result.getExitCode() -// get exception -result.getExecutionException() -+--------- \ No newline at end of file diff --git a/keytool-api/src/site/site.xml b/keytool-api/src/site/site.xml deleted file mode 100644 index d124cc7..0000000 --- a/keytool-api/src/site/site.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -

- - - - - - - - - - \ No newline at end of file diff --git a/keytool-maven-plugin/LICENSE.txt b/keytool-maven-plugin/LICENSE.txt deleted file mode 100644 index 6b0b127..0000000 --- a/keytool-maven-plugin/LICENSE.txt +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/keytool-maven-plugin/pom.xml b/keytool-maven-plugin/pom.xml deleted file mode 100644 index f132271..0000000 --- a/keytool-maven-plugin/pom.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - - 4.0.0 - - - keytool - org.codehaus.mojo - 1.6-SNAPSHOT - - - keytool-maven-plugin - maven-plugin - - Keytool: Maven Plugin - - A plugin that wraps the keytool program bundled with Sun's Java SDK. Allows to manipulate keystores. - - 2005 - - - ${mavenVersion} - - - - - org.apache.maven - maven-plugin-api - - - - org.apache.maven.plugin-tools - maven-plugin-annotations - - - - ${project.groupId} - keytool-api - ${project.version} - - - org.apache.maven.shared - maven-shared-utils - - - org.apache.maven - maven-toolchain - - - commons-lang - commons-lang - - - - junit - junit - - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java15 - 1.0 - - - - - - check - - - - - - - maven-plugin-plugin - - true - - - - generate-descriptor - - descriptor - - - - - - - - - - - api-1.5 - - 1.5 - - - - - ${project.groupId} - keytool-api-1.5 - ${project.version} - - - - - - api-1.6 - - 1.6 - - - - ${project.groupId} - keytool-api-1.6 - ${project.version} - - - - - - api-1.7 - - [1.7,) - - - - ${project.groupId} - keytool-api-1.7 - ${project.version} - - - - - - api-1.8 - - 1.8 - - - - ${project.groupId} - keytool-api-1.7 - ${project.version} - - - - - - run-its - - - maven.test.skip - !true - - - - - - maven-invoker-plugin - - ${project.build.directory}/it - src/it/settings.xml - ${project.build.directory}/local-repo - - - - - install - run - - - - - - - - - - reporting - - - skipReports - !true - - - - - - - maven-plugin-plugin - ${pluginPluginVersion} - - - - ${mojo.java.target} - - - - - maven-invoker-plugin - 3.2.2 - - - org.codehaus.mojo - l10n-maven-plugin - 1.0-alpha-2 - - - fr - - - - - - - - - diff --git a/keytool-maven-plugin/src/site/site.xml b/keytool-maven-plugin/src/site/site.xml deleted file mode 100644 index a9b1cdb..0000000 --- a/keytool-maven-plugin/src/site/site.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 150742e..7b30277 100644 --- a/pom.xml +++ b/pom.xml @@ -24,16 +24,16 @@ 67 - keytool - 1.6-SNAPSHOT - pom + keytool-maven-plugin + 3.0.0-SNAPSHOT + maven-plugin - Keytool: Project + Keytool: Maven Plugin - Project to invoke the the keytool program bundled with Sun's Java SDK. Allows to manipulate keystores. - the project includes a java api to inkove the program and also a maven plugin. + A plugin that wraps the keytool program bundled with Sun's Java SDK. Allows to manipulate keystores. - http://www.mojohaus.org/keytool + + https://www.mojohaus.org/keytool-maven-plugin 2005 @@ -43,6 +43,10 @@ + + ${mavenVersion} + + Jerome Lacoste @@ -64,6 +68,14 @@ Java Developer + + Benjamin Marwell + bmarwell@apache.org + Europe/Berlin + + Java Developer + + @@ -78,15 +90,7 @@ - - keytool-api - keytool-api-test - keytool-api-1.5 - keytool-api-1.6 - keytool-api-1.7 - keytool-maven-plugin - - + scm:git:https://github.com/mojohaus/keytool.git scm:git:https://github.com/mojohaus/keytool.git @@ -104,8 +108,7 @@ - 2.2.1 - 3.2 + 3.2.5 @@ -143,14 +146,6 @@ - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${pluginPluginVersion} - provided - - org.codehaus.plexus @@ -162,13 +157,46 @@ + + + org.apache.maven + maven-plugin-api + provided + + + + org.apache.maven.plugin-tools + maven-plugin-annotations + provided + + + + org.apache.maven.shared + maven-shared-utils + + + + org.junit.jupiter + junit-jupiter + test + + + org.junit.vintage + junit-vintage-engine + test + + + org.hamcrest + hamcrest-core + + + + + + - - maven-plugin-plugin - ${pluginPluginVersion} - org.codehaus.plexus plexus-component-metadata @@ -178,7 +206,6 @@ org.apache.maven.plugins maven-site-plugin - 3.12.0 default-site @@ -195,7 +222,6 @@ org.apache.maven.plugins maven-scm-publish-plugin - 3.1.0 gh-pages @@ -208,6 +234,20 @@ + + maven-plugin-plugin + + true + + + + generate-descriptor + + descriptor + + + + @@ -244,9 +284,49 @@ + + org.codehaus.mojo + l10n-maven-plugin + 1.0-alpha-2 + + + fr + + + + + run-its + + + maven.test.skip + !true + + + + + + maven-invoker-plugin + + ${project.build.directory}/it + src/it/settings.xml + ${project.build.directory}/local-repo + + + + + install + run + + + + + + + + diff --git a/keytool-maven-plugin/src/it/MKEYTOOL-10/goals.txt b/src/it/MKEYTOOL-10/goals.txt similarity index 100% rename from keytool-maven-plugin/src/it/MKEYTOOL-10/goals.txt rename to src/it/MKEYTOOL-10/goals.txt diff --git a/keytool-maven-plugin/src/it/MKEYTOOL-10/pom.xml b/src/it/MKEYTOOL-10/pom.xml similarity index 100% rename from keytool-maven-plugin/src/it/MKEYTOOL-10/pom.xml rename to src/it/MKEYTOOL-10/pom.xml diff --git a/keytool-maven-plugin/src/it/MKEYTOOL-10/postbuild.groovy b/src/it/MKEYTOOL-10/postbuild.groovy similarity index 100% rename from keytool-maven-plugin/src/it/MKEYTOOL-10/postbuild.groovy rename to src/it/MKEYTOOL-10/postbuild.groovy diff --git a/keytool-maven-plugin/src/it/settings.xml b/src/it/settings.xml similarity index 100% rename from keytool-maven-plugin/src/it/settings.xml rename to src/it/settings.xml diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolMojo.java b/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolMojo.java rename to src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestMojo.java b/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestMojo.java rename to src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo.java b/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo.java rename to src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreAndAliasParametersMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreParametersMojo.java b/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreParametersMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreParametersMojo.java rename to src/main/java/org/codehaus/mojo/keytool/AbstractKeyToolRequestWithKeyStoreParametersMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeAliasMojo.java b/src/main/java/org/codehaus/mojo/keytool/ChangeAliasMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeAliasMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ChangeAliasMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeKeyPasswordMojo.java b/src/main/java/org/codehaus/mojo/keytool/ChangeKeyPasswordMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeKeyPasswordMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ChangeKeyPasswordMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeStorePasswordMojo.java b/src/main/java/org/codehaus/mojo/keytool/ChangeStorePasswordMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ChangeStorePasswordMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ChangeStorePasswordMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/CleanKeyMojo.java b/src/main/java/org/codehaus/mojo/keytool/CleanKeyMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/CleanKeyMojo.java rename to src/main/java/org/codehaus/mojo/keytool/CleanKeyMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/DeleteAliasMojo.java b/src/main/java/org/codehaus/mojo/keytool/DeleteAliasMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/DeleteAliasMojo.java rename to src/main/java/org/codehaus/mojo/keytool/DeleteAliasMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ExportCertificateMojo.java b/src/main/java/org/codehaus/mojo/keytool/ExportCertificateMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ExportCertificateMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ExportCertificateMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateMojo.java b/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateMojo.java rename to src/main/java/org/codehaus/mojo/keytool/GenerateCertificateMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateRequestMojo.java b/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateRequestMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateCertificateRequestMojo.java rename to src/main/java/org/codehaus/mojo/keytool/GenerateCertificateRequestMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateKeyPairMojo.java b/src/main/java/org/codehaus/mojo/keytool/GenerateKeyPairMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateKeyPairMojo.java rename to src/main/java/org/codehaus/mojo/keytool/GenerateKeyPairMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateSecretKeyMojo.java b/src/main/java/org/codehaus/mojo/keytool/GenerateSecretKeyMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/GenerateSecretKeyMojo.java rename to src/main/java/org/codehaus/mojo/keytool/GenerateSecretKeyMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ImportCertificateMojo.java b/src/main/java/org/codehaus/mojo/keytool/ImportCertificateMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ImportCertificateMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ImportCertificateMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ImportKeystoreMojo.java b/src/main/java/org/codehaus/mojo/keytool/ImportKeystoreMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ImportKeystoreMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ImportKeystoreMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ListMojo.java b/src/main/java/org/codehaus/mojo/keytool/ListMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/ListMojo.java rename to src/main/java/org/codehaus/mojo/keytool/ListMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCRLFileMojo.java b/src/main/java/org/codehaus/mojo/keytool/PrintCRLFileMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCRLFileMojo.java rename to src/main/java/org/codehaus/mojo/keytool/PrintCRLFileMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCertificateMojo.java b/src/main/java/org/codehaus/mojo/keytool/PrintCertificateMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCertificateMojo.java rename to src/main/java/org/codehaus/mojo/keytool/PrintCertificateMojo.java diff --git a/keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCertificateRequestMojo.java b/src/main/java/org/codehaus/mojo/keytool/PrintCertificateRequestMojo.java similarity index 100% rename from keytool-maven-plugin/src/main/java/org/codehaus/mojo/keytool/PrintCertificateRequestMojo.java rename to src/main/java/org/codehaus/mojo/keytool/PrintCertificateRequestMojo.java diff --git a/keytool-maven-plugin/src/main/resources/keytool.properties b/src/main/resources/keytool.properties similarity index 100% rename from keytool-maven-plugin/src/main/resources/keytool.properties rename to src/main/resources/keytool.properties diff --git a/keytool-maven-plugin/src/main/resources/keytool_de.properties b/src/main/resources/keytool_de.properties similarity index 100% rename from keytool-maven-plugin/src/main/resources/keytool_de.properties rename to src/main/resources/keytool_de.properties diff --git a/keytool-maven-plugin/src/main/resources/keytool_en.properties b/src/main/resources/keytool_en.properties similarity index 100% rename from keytool-maven-plugin/src/main/resources/keytool_en.properties rename to src/main/resources/keytool_en.properties diff --git a/keytool-maven-plugin/src/main/resources/keytool_fr.properties b/src/main/resources/keytool_fr.properties similarity index 100% rename from keytool-maven-plugin/src/main/resources/keytool_fr.properties rename to src/main/resources/keytool_fr.properties diff --git a/keytool-maven-plugin/src/site/apt/examples/examples.apt b/src/site/apt/examples/examples.apt similarity index 100% rename from keytool-maven-plugin/src/site/apt/examples/examples.apt rename to src/site/apt/examples/examples.apt diff --git a/keytool-maven-plugin/src/site/apt/index.apt b/src/site/apt/index.apt similarity index 100% rename from keytool-maven-plugin/src/site/apt/index.apt rename to src/site/apt/index.apt diff --git a/keytool-maven-plugin/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm similarity index 100% rename from keytool-maven-plugin/src/site/apt/usage.apt.vm rename to src/site/apt/usage.apt.vm diff --git a/keytool-maven-plugin/src/site/fml/faq.fml b/src/site/fml/faq.fml similarity index 100% rename from keytool-maven-plugin/src/site/fml/faq.fml rename to src/site/fml/faq.fml diff --git a/src/site/site.xml b/src/site/site.xml index a2d59b1..642ebb0 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,28 +1,17 @@ - - - - - + + + + + + + + + + - \ No newline at end of file + + diff --git a/keytool-maven-plugin/src/test/java/org/codehaus/mojo/keytool/CleanKeyMojoTest.java b/src/test/java/org/codehaus/mojo/keytool/CleanKeyMojoTest.java similarity index 100% rename from keytool-maven-plugin/src/test/java/org/codehaus/mojo/keytool/CleanKeyMojoTest.java rename to src/test/java/org/codehaus/mojo/keytool/CleanKeyMojoTest.java