keyname = args[++i]; else error("Invalid command ");
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + file.getAbsolutePath()); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : pomFile.getAbsolutePath()); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Parameters exports = project.parseHeader(manifest.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); IO.mkdirs(jdoc); logger.info(LIFECYCLE, "Generating Javadoc for: {}", exports.keySet()); Jar javadoc = javadoc(jdoc, project, exports.keySet()); logger.info(LIFECYCLE, "Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); logger.info(LIFECYCLE, "Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); logger.info(LIFECYCLE, "Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); logger.info(LIFECYCLE, "Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); logger.info(LIFECYCLE, "Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Parameters exports = project.parseHeader(manifest.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); IO.mkdirs(jdoc); logger.info(LIFECYCLE, "Generating Javadoc for: {}", exports.keySet()); Jar javadoc = javadoc(jdoc, project, exports.keySet()); logger.info(LIFECYCLE, "Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); logger.info(LIFECYCLE, "Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); logger.info(LIFECYCLE, "Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); logger.info(LIFECYCLE, "Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); logger.info(LIFECYCLE, "Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Map<String, Map<String, String>> exports = project.parseHeader(manifest .getMainAttributes().getValue(Constants.EXPORT_PACKAGE)); jdoc.mkdirs(); project.progress("Generating Javadoc for: " + exports.keySet()); Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); project.progress("Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); project.progress("Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + file.getAbsolutePath()); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : pomFile.getAbsolutePath()); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
keyname = args[++i]; else error("Invalid command ");
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Parameters exports = project.parseHeader(manifest.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); project.progress("Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); project.progress("Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + file.getAbsolutePath()); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : pomFile.getAbsolutePath()); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
keyname = args[++i]; else error("Invalid command ");
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Parameters exports = project.parseHeader(manifest.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); project.progress("Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); project.progress("Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + file.getAbsolutePath()); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : pomFile.getAbsolutePath()); StringBuffer stdout = new StringBuffer(); StringBuffer stderr = new StringBuffer(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
keyname = args[++i]; else error("Invalid command ");
PomResource pom = new PomResource(manifest); pom.setProperties(maven); File pomFile = write(tmp, pom, "pom.xml"); split(original, main, src); Parameters exports = project.parseHeader(manifest.getMainAttributes() .getValue(Constants.EXPORT_PACKAGE)); Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar"); maven_gpg_sign_and_deploy(project, mainFile, null, pomFile); project.progress("Deploying main sources file"); maven_gpg_sign_and_deploy(project, srcFile, "sources", null); project.progress("Deploying main javadoc file"); maven_gpg_sign_and_deploy(project, javadocFile, "javadoc", null);
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + IO.absolutePath(file)); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : IO.absolutePath(pomFile)); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
keyname = args[++i]; else error("Invalid command ");
private void maven_gpg_sign_and_deploy(Project b, File file, String classifier, File pomFile) throws Exception { Command command = new Command(); command.setTrace(); command.add(b.getProperty("mvn", "mvn")); command.add("gpg:sign-and-deploy-file", "-DreleaseInfo=true", "-DpomFile=pom.xml"); command.add("-Dfile=" + IO.absolutePath(file)); command.add("-DrepositoryId=" + repository); command.add("-Durl=" + url); optional(command, "passphrase", passphrase); optional(command, "keyname", keyname); optional(command, "homedir", homedir); optional(command, "classifier", classifier); optional(command, "pomFile", pomFile == null ? null : IO.absolutePath(pomFile)); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { b.error("Maven deploy to %s failed to sign and transfer %s because %s", repository, file, "" + stdout + stderr); } }
keyname = args[++i]; else error("Invalid command ");