From commits-return-7771-apmail-sis-commits-archive=sis.apache.org@sis.apache.org Mon Jun 6 23:27:33 2016 Return-Path: X-Original-To: apmail-sis-commits-archive@www.apache.org Delivered-To: apmail-sis-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 650CA193D6 for ; Mon, 6 Jun 2016 23:27:33 +0000 (UTC) Received: (qmail 10214 invoked by uid 500); 6 Jun 2016 23:27:33 -0000 Delivered-To: apmail-sis-commits-archive@sis.apache.org Received: (qmail 10184 invoked by uid 500); 6 Jun 2016 23:27:33 -0000 Mailing-List: contact commits-help@sis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sis-dev@sis.apache.org Delivered-To: mailing list commits@sis.apache.org Received: (qmail 10175 invoked by uid 99); 6 Jun 2016 23:27:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2016 23:27:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id CB2B218053D for ; Mon, 6 Jun 2016 23:27:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.374 X-Spam-Level: X-Spam-Status: No, score=0.374 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Amw1cQKcx68d for ; Mon, 6 Jun 2016 23:27:30 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 0A55E5F3DA for ; Mon, 6 Jun 2016 23:27:30 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0EBE4E031D for ; Mon, 6 Jun 2016 23:27:29 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 0CFF83A0287 for ; Mon, 6 Jun 2016 23:27:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1747089 - in /sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven: Assembler.java BundleCreator.java PackOutput.java Packer.java Date: Mon, 06 Jun 2016 23:27:29 -0000 To: commits@sis.apache.org From: desruisseaux@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160606232729.0CFF83A0287@svn01-us-west.apache.org> Author: desruisseaux Date: Mon Jun 6 23:27:28 2016 New Revision: 1747089 URL: http://svn.apache.org/viewvc?rev=1747089&view=rev Log: Remove the implementation URL since it is not a deprecated Manifest attribute. Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java?rev=1747089&r1=1747088&r2=1747089&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java [UTF-8] Mon Jun 6 23:27:28 2016 @@ -91,7 +91,7 @@ public class Assembler extends AbstractM * have been zipped. Now generate the Pack200 file and zip it directly (without creating * a temporary "sis.pack.gz" file). */ - final Packer packer = new Packer(project.getName(), project.getUrl(), version, targetDirectory); + final Packer packer = new Packer(project.getName(), version, targetDirectory); final ZipArchiveEntry entry = new ZipArchiveEntry( artifactBase + '/' + LIB_DIRECTORY + '/' + FATJAR_FILE + PACK_EXTENSION); entry.setMethod(ZipArchiveEntry.STORED); Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java?rev=1747089&r1=1747088&r2=1747089&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] Mon Jun 6 23:27:28 2016 @@ -74,7 +74,7 @@ public class BundleCreator extends Abstr } final String version = project.getVersion(); try { - final Packer packer = new Packer(project.getName(), project.getUrl(), version, targetDirectory); + final Packer packer = new Packer(project.getName(), version, targetDirectory); packer.preparePack200(FINALNAME_PREFIX + version + ".jar").pack(); } catch (IOException e) { throw new MojoExecutionException(e.getLocalizedMessage(), e); Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java?rev=1747089&r1=1747088&r2=1747089&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java [UTF-8] Mon Jun 6 23:27:28 2016 @@ -118,11 +118,10 @@ final class PackOutput implements Closea * Opens the given JAR file for writing and creates its manifest. * * @param projectName The project name, or {@code null} if none. - * @param projectURL The project URL, or {@code null} if none. * @param version The project version, or {@code null} if none. * @throws IOException if the file can't be open. */ - void open(final String projectName, final String projectURL, final String version) throws IOException { + void open(final String projectName, final String version) throws IOException { final Manifest manifest = new Manifest(); Attributes attributes = manifest.getMainAttributes(); attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0"); @@ -132,9 +131,6 @@ final class PackOutput implements Closea attributes.put(Attributes.Name.IMPLEMENTATION_TITLE, projectName); attributes.put(Attributes.Name.IMPLEMENTATION_VENDOR, projectName); } - if (projectURL != null) { - attributes.put(Attributes.Name.IMPLEMENTATION_URL, projectURL); - } if (version != null) { attributes.put(Attributes.Name.SPECIFICATION_VERSION, version); attributes.put(Attributes.Name.IMPLEMENTATION_VERSION, version); @@ -181,8 +177,7 @@ final class PackOutput implements Closea copy(src, attributes, Attributes.Name.SPECIFICATION_VERSION) | copy(src, attributes, Attributes.Name.IMPLEMENTATION_TITLE) | copy(src, attributes, Attributes.Name.IMPLEMENTATION_VENDOR) | - copy(src, attributes, Attributes.Name.IMPLEMENTATION_VERSION) | - copy(src, attributes, Attributes.Name.IMPLEMENTATION_URL)) + copy(src, attributes, Attributes.Name.IMPLEMENTATION_VERSION)) { manifest.getEntries().put(packageName, attributes); } @@ -324,11 +319,13 @@ final class PackOutput implements Closea final File inputFile = outputJAR; final Pack200.Packer packer = Pack200.newPacker(); final Map p = packer.properties(); - p.put(EFFORT, String.valueOf(9)); // Maximum compression level. - p.put(KEEP_FILE_ORDER, FALSE); // Reorder files for better compression. - p.put(MODIFICATION_TIME, LATEST); // Smear modification times to a single value. - p.put(DEFLATE_HINT, TRUE); // Ignore all JAR deflation requests. - p.put(UNKNOWN_ATTRIBUTE, ERROR); // Throw an error if an attribute is unrecognized + p.put(EFFORT, String.valueOf(9)); // Maximum compression level. + p.put(SEGMENT_LIMIT, "-1"); // use largest-possible archive segments (>10% better compression). + p.put(KEEP_FILE_ORDER, FALSE); // Reorder files for better compression. + p.put(MODIFICATION_TIME, LATEST); // Smear modification times to a single value. + p.put(DEFLATE_HINT, TRUE); // Ignore all JAR deflation requests. + p.put(UNKNOWN_ATTRIBUTE, ERROR); // Throw an error if an attribute is unrecognized + p.put(CODE_ATTRIBUTE_PFX+"LocalVariableTable", STRIP); // discard debug attributes. try (JarFile jarFile = new JarFile(inputFile)) { try (OutputStream deflater = new GZIPOutputStream(out)) { packer.pack(jarFile, deflater); Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java?rev=1747089&r1=1747088&r2=1747089&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] Mon Jun 6 23:27:28 2016 @@ -40,9 +40,9 @@ import static org.apache.sis.internal.ma */ final class Packer implements FilenameFilter { /** - * The project name, URL and version to declare in the manifest file, or {@code null} if none. + * The project name and version to declare in the manifest file, or {@code null} if none. */ - private final String projectName, projectURL, version; + private final String projectName, version; /** * The Maven target directory. Shall contain the {@code "binaries"} sub-directory, @@ -59,16 +59,12 @@ final class Packer implements FilenameFi * Creates a packer. * * @param projectName The project name to declare in the manifest file, or {@code null} if none. - * @param projectURL The project URL to declare in the manifest file, or {@code null} if none. * @param version The project version to declare in the manifest file, or {@code null} if none. * @param targetDirectory The Maven target directory. * @throws FileNotFoundException if the {@code target/binaries} directory is not found. */ - Packer(final String projectName, final String projectURL, final String version, - final File targetDirectory) throws FileNotFoundException - { + Packer(final String projectName, final String version, final File targetDirectory) throws FileNotFoundException { this.projectName = projectName; - this.projectURL = projectURL; this.version = version; this.targetDirectory = targetDirectory; this.binariesDirectory = new File(targetDirectory, BINARIES_DIRECTORY); @@ -130,7 +126,7 @@ final class Packer implements FilenameFi final File outDirectory = distributionDirectory(targetDirectory); final PackOutput output = new PackOutput(getInputJARs(), new File(outDirectory, outputJAR)); try { - output.open(projectName, projectURL, version); + output.open(projectName, version); output.writeContent(); } finally { output.close();