You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2013/06/10 14:45:50 UTC

svn commit: r1491438 - in /sis/branches/JDK7/core/sis-build-helper/src: main/java/org/apache/sis/internal/maven/ site/apt/

Author: desruisseaux
Date: Mon Jun 10 12:45:49 2013
New Revision: 1491438

URL: http://svn.apache.org/r1491438
Log:
Renamed "dependencies.txt" as "content.txt" and "sis-bundle.pack.gz" as "sis.pack.gz".

Modified:
    sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
    sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
    sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java
    sis/branches/JDK7/core/sis-build-helper/src/site/apt/index.apt

Modified: sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java?rev=1491438&r1=1491437&r2=1491438&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] Mon Jun 10 12:45:49 2013
@@ -67,7 +67,7 @@ public class BundleCreator extends Abstr
         }
         try {
             final Packer packer = new Packer(targetDirectory, VERSION);
-            packer.addPack("sis-bundle-" + VERSION + ".jar");
+            packer.addPack("sis-" + VERSION + ".jar");
             try {
                 packer.createJars();
             } finally {

Modified: sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java?rev=1491438&r1=1491437&r2=1491438&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java [UTF-8] Mon Jun 10 12:45:49 2013
@@ -37,7 +37,7 @@ import org.apache.maven.artifact.Artifac
  * Collects <code>.jar</code> files in a single "{@code target/binaries}" directory.
  * Dependencies are collected as well, except if already presents. This mojo uses hard links
  * on platforms that support them. If hard links are not supported, then this mojo will instead
- * creates a "{@code target/binaries/dependencies.txt}" file listing the dependencies.
+ * creates a "{@code target/binaries/content.txt}" file listing the dependencies.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.2)
@@ -60,9 +60,10 @@ public final class JarCollector extends 
     static final String SUB_DIRECTORY = "binaries";
 
     /**
-     * The name of the file where to list dependencies on platforms that do not support hard links.
+     * The name of the file where to list SIS JAR files and their dependencies
+     * on platforms that do not support hard links.
      */
-    static final String DEPENDENCIES_LIST = "dependencies.txt";
+    static final String CONTENT_FILE = "content.txt";
 
     /**
      * The Maven project running this plugin.
@@ -231,7 +232,7 @@ public final class JarCollector extends 
     /**
      * Creates a link from the given source file to the given target file.
      * On JDK6 or on platform that do not support links, this method rather
-     * updates the <code>dependencies.txt</code> file.
+     * updates the <code>content.txt</code> file.
      *
      * @param file The source file to read.
      * @param copy The destination file to create.
@@ -243,13 +244,13 @@ public final class JarCollector extends 
             Files.createLink(target, source);
             return;
         } catch (UnsupportedOperationException e) {
-            // If hard links are not supported, edit the "dependencies.txt" file instead.
+            // If hard links are not supported, edit the "content.txt" file instead.
         }
         /*
-         * If we can not use hard links, creates or updates a "target/dependencies.txt" file instead.
+         * If we can not use hard links, creates or updates a "target/content.txt" file instead.
          * This file will contains the list of all dependencies, without duplicated values.
          */
-        final File dependenciesFile = new File(copy.getParentFile(), DEPENDENCIES_LIST);
+        final File dependenciesFile = new File(copy.getParentFile(), CONTENT_FILE);
         final Set<String> dependencies = loadDependencyList(dependenciesFile);
         if (dependencies.add(file.getPath())) {
             // Save the dependencies list only if it has been modified.
@@ -263,7 +264,7 @@ public final class JarCollector extends 
     }
 
     /**
-     * Loads the {@value #DEPENDENCIES_LIST} from the given directory, if it exists.
+     * Loads the {@value #CONTENT_FILE} from the given directory, if it exists.
      * Otherwise returns an empty but modifiable set. This method is invoked only on
      * platforms that do not support hard links.
      */

Modified: sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java?rev=1491438&r1=1491437&r2=1491438&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] Mon Jun 10 12:45:49 2013
@@ -32,14 +32,14 @@ import java.io.InputStream;
 
 /**
  * Creates PAC200 files from the JAR builds by Maven. This tools needs the JAR files to be either provided
- * in the {@code target/binaries} directory, or listed in the {@code target/binaries/dependencies.txt} file.
+ * in the {@code target/binaries} directory, or listed in the {@code target/binaries/content.txt} file.
  *
  * <p><b>Usage:</b> If {@code rootDirectory} is the directory containing the root {@code pom.xml} file,
  * then this class can be used as below (replace {@code "1.0"} by the actual version number and
- * {@code "sis-bundle-1.0.jar"} by any filename of your choice):</p>
+ * {@code "sis-1.0.jar"} by any filename of your choice):</p>
  *
  * <blockquote><pre> Packer packer = new Packer(new File(rootDirectory, "target"), "1.0");
- * packer.addPack("sis-bundle-1.0.jar");
+ * packer.addPack("sis-1.0.jar");
  * packer.createJars();
  * packer.close();
  * packer.pack();</pre></blockquote>
@@ -107,7 +107,7 @@ final class Packer implements FilenameFi
      * @throws IOException If an error occurred while collecting the target directory content.
      */
     public void addPack(final String pack) throws IOException {
-        final Set<String> list = JarCollector.loadDependencyList(new File(jarDirectory, JarCollector.DEPENDENCIES_LIST));
+        final Set<String> list = JarCollector.loadDependencyList(new File(jarDirectory, JarCollector.CONTENT_FILE));
         list.addAll(Arrays.asList(jarDirectory.list(this)));
         addPack(null, pack, list.toArray(new String[list.size()]));
     }

Modified: sis/branches/JDK7/core/sis-build-helper/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-build-helper/src/site/apt/index.apt?rev=1491438&r1=1491437&r2=1491438&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-build-helper/src/site/apt/index.apt [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-build-helper/src/site/apt/index.apt [UTF-8] Mon Jun 10 12:45:49 2013
@@ -89,9 +89,9 @@ Building Apache SIS
   in the module containing the resources to recompile. This is sometime useful for regenerating
   the constants in the <<<Keys>>> inner class in a feaster way than building the project.
 
-+-----------------------------------------------------
-mvn org.apache.sis:sis-build-helper:compile-resources
-+-----------------------------------------------------
+-----------------------------------------------------------
+   mvn org.apache.sis:sis-build-helper:compile-resources
+-----------------------------------------------------------
 
 
 * JAR files collector
@@ -137,6 +137,13 @@ mvn org.apache.sis:sis-build-helper:comp
   invoke the following from the command line. Do not forget the <<<--non-recursive>>>
   option, otherwise the Mojo will waste CPU by executing itself many time.
 
-+------------------------------------------------------------------------------------------
-  mvn org.apache.sis:sis-build-helper:pack --non-recursive
-+------------------------------------------------------------------------------------------
+----------------------------------------------------------------
+   mvn org.apache.sis:sis-build-helper:pack --non-recursive
+----------------------------------------------------------------
+
+  The above command should create a <<<target/binaries/sis-\<version\>.pack.gz>>> file.
+  To uncompress that file, use the following command:
+
+----------------------------------------------------------------
+   unpack200 --remove-pack-file sis-<version>.pack.gz sis.jar
+----------------------------------------------------------------