sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
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 GMT
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<String,String> 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();



Mime
View raw message