/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } FileReader rdr = new FileReader(settings); LineCollection lc = new LineCollection(new BufferedReader(rdr)); while (lc.hasNext()) { System.out.println(lc.next()); } }
/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } try (LineCollection lc = new LineCollection(IO.reader(settings))) { while (lc.hasNext()) { System.err.println(lc.next()); } } }
/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } LineCollection lc = new LineCollection(IO.reader(settings)); while (lc.hasNext()) { System.err.println(lc.next()); } }
/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } try (LineCollection lc = new LineCollection(IO.reader(settings))) { while (lc.hasNext()) { System.err.println(lc.next()); } } }
/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } LineCollection lc = new LineCollection(IO.reader(settings)); try { while (lc.hasNext()) { System.err.println(lc.next()); } } finally { lc.close(); } }
/** * Show the maven settings * * @throws FileNotFoundException * @throws Exception */ private void settings() throws FileNotFoundException, Exception { File userHome = new File(System.getProperty("user.home")); File m2 = new File(userHome, ".m2"); if (!m2.isDirectory()) { error("There is no m2 directory at %s", userHome); return; } File settings = new File(m2, "settings.xml"); if (!settings.isFile()) { error("There is no settings file at '%s'", settings.getAbsolutePath()); return; } LineCollection lc = new LineCollection(IO.reader(settings)); try { while (lc.hasNext()) { System.err.println(lc.next()); } } finally { lc.close(); } }
private void sign(File file, String passphrase) throws Exception { trace("signing %s", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); asc.delete(); Command command = new Command(); command.setTrace(); command.add(getProperty("gpgp", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(file.getAbsolutePath()); System.err.println(command); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
private void sign(File file, String passphrase) throws Exception { trace("signing %s", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); asc.delete(); Command command = new Command(); command.setTrace(); command.add(getProperty("gpg", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(file.getAbsolutePath()); System.err.println(command); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
private void sign(File file, String passphrase) throws Exception { trace("signing %s", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); asc.delete(); Command command = new Command(); command.setTrace(); command.add(getProperty("gpg", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(file.getAbsolutePath()); System.err.println(command); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
private void sign(File file, String passphrase) throws Exception { trace("signing %s", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); asc.delete(); Command command = new Command(); command.setTrace(); command.add(getProperty("gpgp", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(file.getAbsolutePath()); System.out.println(command); StringBuffer stdout = new StringBuffer(); StringBuffer stderr = new StringBuffer(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
private void sign(File file, String passphrase) throws Exception { logger.debug("signing {}", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); IO.delete(asc); Command command = new Command(); command.setTrace(); command.add(getProperty("gpg", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(IO.absolutePath(file)); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
private void sign(File file, String passphrase) throws Exception { logger.debug("signing {}", file); File asc = new File(file.getParentFile(), file.getName() + ".asc"); IO.delete(asc); Command command = new Command(); command.setTrace(); command.add(getProperty("gpg", "gpg")); if (passphrase != null) command.add("--passphrase", passphrase); command.add("-ab", "--sign"); // not the -b!! command.add(IO.absolutePath(file)); StringBuilder stdout = new StringBuilder(); StringBuilder stderr = new StringBuilder(); int result = command.execute(stdout, stderr); if (result != 0) { error("gpg signing %s failed because %s", file, "" + stdout + stderr); } }
String email = settings.remove("email"); if (email == null) error( "No developer email set, you can set global default email with: bnd global email Peter.Kriens@aQute.biz"); else error("too few arguments, no bundle specified"); return; error("too many arguments, only one bundle allowed"); return; logger.debug("got {}", binaryJar); if (binaryJar == null) { error("JAR does not exist: %s", input); return; javadocJar = javadoc(getFile(original, "OSGI-OPT/src"), exports, manifest, properties); if (javadocJar == null) { error("Cannot find source code in OSGI-OPT/src to generate Javadoc"); return;
String email = settings.remove("email"); if (email == null) error("No developer email set, you can set global default email with: bnd global email Peter.Kriens@aQute.biz"); else developers.add(email); error("too few arguments, no bundle specified"); return; error("too many arguments, only one bundle allowed"); return; trace("got %s", binaryJar); if (binaryJar == null) { error("JAR does not exist: %s", input); return; javadocJar = javadoc(getFile(original, "OSGI-OPT/src"), exports, manifest, properties); if (javadocJar == null) { error("Cannot find source code in OSGI-OPT/src to generate Javadoc"); return;