sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1516013 - in /sis/trunk: ./ application/sis-console/src/main/java/org/apache/sis/console/ core/ core/sis-build-helper/ core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/ core/sis-build-helper/src/site/apt/ core/sis-feature/...
Date Tue, 20 Aug 2013 22:50:05 GMT
Author: desruisseaux
Date: Tue Aug 20 22:50:04 2013
New Revision: 1516013

URL: http://svn.apache.org/r1516013
Log:
Merge from the JDK6 branch.

Added:
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
      - copied unchanged from r1516008, sis/branches/JDK6/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
      - copied unchanged from r1516008, sis/branches/JDK6/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
    sis/trunk/core/sis-feature/
      - copied from r1516008, sis/branches/JDK6/core/sis-feature/
Modified:
    sis/trunk/   (props changed)
    sis/trunk/application/sis-console/src/main/java/org/apache/sis/console/Command.java
    sis/trunk/core/pom.xml
    sis/trunk/core/sis-build-helper/pom.xml
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java
    sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java
    sis/trunk/core/sis-build-helper/src/site/apt/index.apt
    sis/trunk/core/sis-feature/pom.xml   (contents, props changed)
    sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java   (props changed)
    sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml
    sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/ide-project/NetBeans/nbproject/project.xml
    sis/trunk/pom.xml

Propchange: sis/trunk/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1515761-1515995
  Merged /sis/branches/JDK6:r1515764-1516008

Modified: sis/trunk/application/sis-console/src/main/java/org/apache/sis/console/Command.java
URL: http://svn.apache.org/viewvc/sis/trunk/application/sis-console/src/main/java/org/apache/sis/console/Command.java?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/application/sis-console/src/main/java/org/apache/sis/console/Command.java [UTF-8] (original)
+++ sis/trunk/application/sis-console/src/main/java/org/apache/sis/console/Command.java [UTF-8] Tue Aug 20 22:50:04 2013
@@ -221,8 +221,7 @@ public final class Command {
      *
      * @param args Command-line options.
      */
-    public static void main(String[] args) {
-        args = new String[] {"mime-type", "/Users/desruisseaux/Projets/SIS/JDK7/target/binaries/../../../../GeoAPI/trunk//geoapi-netcdf/src/test/resources/org/opengis/wrapper/netcdf/NCEP-SST.nc"};
+    public static void main(final String[] args) {
         MonolineFormatter.install();
         final Command c;
         try {

Modified: sis/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/pom.xml?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/pom.xml (original)
+++ sis/trunk/core/pom.xml Tue Aug 20 22:50:04 2013
@@ -66,6 +66,14 @@
         <role>developer</role>
       </roles>
     </developer>
+    <developer>
+      <name>Travis L. Pinney</name>
+      <id>tlpinney</id>
+      <email>travis.pinney@gmail.com</email>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
   </developers>
   <contributors>
     <contributor>
@@ -124,6 +132,7 @@
     <module>sis-utility</module>
     <module>sis-metadata</module>
     <module>sis-referencing</module>
+    <module>sis-feature</module>
   </modules>
 
 </project>

Modified: sis/trunk/core/sis-build-helper/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/pom.xml?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/pom.xml (original)
+++ sis/trunk/core/sis-build-helper/pom.xml Tue Aug 20 22:50:04 2013
@@ -84,6 +84,10 @@ Define Maven Mojos and Javadoc taglets f
       <artifactId>maven-plugin-api</artifactId>
       <version>3.0.5</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+    </dependency>
   </dependencies>
 
 

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java [UTF-8] Tue Aug 20 22:50:04 2013
@@ -20,17 +20,22 @@ import java.io.File;
 import java.io.IOException;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+
+import static org.apache.sis.internal.maven.Filenames.*;
 
 
 /**
  * Merges the binaries produced by <code>JarCollector</code> and compress them using Pack200.
- * This mojo delegates the work to <code>Packer</code>, which can be invoked from the command
- * line without Maven. Maven invocation syntax is:
+ * This mojo can be invoked from the command line as below:
  *
  * <blockquote><code>mvn org.apache.sis.core:sis-build-helper:pack --non-recursive</code></blockquote>
  *
  * Do not forget the <code>--non-recursive</code> option, otherwise the Mojo will be executed many time.
  *
+ * <p><b>Current limitation:</b>
+ * The final name is hard coded to <code>apache-sis-&lt;version&gt;.pack.gz</code> for now.</p>
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
  * @version 0.4
@@ -41,16 +46,13 @@ import org.apache.maven.plugin.MojoExecu
  */
 public class BundleCreator extends AbstractMojo {
     /**
-     * The Apache SIS version, without branch name.
-     */
-    private static final String VERSION = "0.4";
-
-    /**
-     * The Apache SIS branch for which this plugin is creating a bundle, prefixed by {@code '-'}.
-     * This is declared as a separated constant in order to make easier to update {@link #VERSION}
-     * without creating conflicts during branch merges.
+     * Project information (name, version, URL).
+     *
+     * @parameter default-value="${project}"
+     * @required
+     * @readonly
      */
-    private static final String BRANCH = "";
+    private MavenProject project;
 
     /**
      * The root directory (without the "<code>target/binaries</code>" sub-directory) where JARs
@@ -62,26 +64,20 @@ public class BundleCreator extends Abstr
     private String rootDirectory;
 
     /**
-     * Creates the Pack200 files from the JAR files collected in the "<code>target/binaries</code>" directory.
+     * Creates the Pack200 file from the JAR files collected in the "<code>target/binaries</code>" directory.
      *
      * @throws MojoExecutionException if the plugin execution failed.
      */
     @Override
     public void execute() throws MojoExecutionException {
-        final File targetDirectory = new File(rootDirectory, JarCollector.TARGET_DIRECTORY);
+        final File targetDirectory = new File(rootDirectory, TARGET_DIRECTORY);
         if (!targetDirectory.isDirectory()) {
             throw new MojoExecutionException("Directory not found: " + targetDirectory);
         }
+        final String version = project.getVersion();
         try {
-            final String fullVersion = VERSION + BRANCH;
-            final Packer packer = new Packer(targetDirectory, fullVersion);
-            packer.addPack("apache-sis-" + fullVersion + ".jar");
-            try {
-                packer.createJars();
-            } finally {
-                packer.close();
-            }
-            packer.pack();
+            final Packer packer = new Packer(project.getName(), project.getUrl(), version, targetDirectory);
+            packer.preparePack200(FINALNAME_PREFIX + version + ".jar").pack();
         } catch (IOException e) {
             throw new MojoExecutionException(e.getLocalizedMessage(), e);
         }

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java [UTF-8] Tue Aug 20 22:50:04 2013
@@ -23,8 +23,6 @@ import java.io.FileWriter;
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.IOException;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.util.Set;
 import java.util.LinkedHashSet;
 import org.apache.maven.plugin.AbstractMojo;
@@ -32,6 +30,8 @@ import org.apache.maven.plugin.MojoExecu
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.Artifact;
 
+import static org.apache.sis.internal.maven.Filenames.*;
+
 
 /**
  * Collects <code>.jar</code> files in a single "{@code target/binaries}" directory.
@@ -50,22 +50,6 @@ import org.apache.maven.artifact.Artifac
  */
 public final class JarCollector extends AbstractMojo implements FileFilter {
     /**
-     * The target directory.
-     */
-    static final String TARGET_DIRECTORY = "target";
-
-    /**
-     * The sub directory to create inside the "target" directory.
-     */
-    static final String SUB_DIRECTORY = "binaries";
-
-    /**
-     * 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 CONTENT_FILE = "content.txt";
-
-    /**
      * The Maven project running this plugin.
      *
      * @parameter property="project"
@@ -121,7 +105,7 @@ public final class JarCollector extends 
         File collect = new File(rootDirectory, TARGET_DIRECTORY);
         if (!collect.exists()) {
             if (!collect.mkdir()) {
-                throw new MojoExecutionException("Failed to create target directory.");
+                throw new MojoExecutionException("Failed to create \"" + TARGET_DIRECTORY + "\" directory.");
             }
         }
         if (collect.getCanonicalFile().equals(jarFile.getParentFile().getCanonicalFile())) {
@@ -137,10 +121,10 @@ public final class JarCollector extends 
          * Creates a "binaries" subdirectory inside the "target" directory, then copy the
          * JAR file compiled by Maven. If an JAR file already existed, it will be deleted.
          */
-        collect = new File(collect, SUB_DIRECTORY);
+        collect = new File(collect, BINARIES_DIRECTORY);
         if (!collect.exists()) {
             if (!collect.mkdir()) {
-                throw new MojoExecutionException("Failed to create binaries directory.");
+                throw new MojoExecutionException("Failed to create \"" + BINARIES_DIRECTORY + "\" directory.");
             }
         }
         File copy = new File(collect, jarFile.getName());

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/PackOutput.java [UTF-8] Tue Aug 20 22:50:04 2013
@@ -19,17 +19,19 @@ package org.apache.sis.internal.maven;
 import java.util.Map;
 import java.util.Set;
 import java.util.HashSet;
-import java.util.LinkedHashSet;
+import java.util.Iterator;
 import java.util.Enumeration;
 import java.util.jar.*;
 import java.io.File;
 import java.io.Closeable;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.FileOutputStream;
 import java.util.zip.GZIPOutputStream;
 
 import static java.util.jar.Pack200.Packer.*;
+import static org.apache.sis.internal.maven.Filenames.*;
 
 
 /**
@@ -37,7 +39,7 @@ import static java.util.jar.Pack200.Pack
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.3
+ * @version 0.4
  * @module
  */
 final class PackOutput implements Closeable {
@@ -47,21 +49,15 @@ final class PackOutput implements Closea
     private static final String CLASS = ".class";
 
     /**
-     * The packer that created this object. Will be used in order to fetch
-     * additional informations like the version to declare in the pom.xml file.
+     * The output file path.
      */
-    private final Packer packer;
+    private final File outputJAR;
 
     /**
-     * The output file.
+     * The stream where to write the JAR.
+     * Created only when {@link #open(File)} is invoked.
      */
-    private File file;
-
-    /**
-     * The stream where to write the JAR. Will be created
-     * only when {@link #open} will be invoked.
-     */
-    private JarOutputStream out;
+    private JarOutputStream outputStream;
 
     /**
      * The manifest attribute value, or {@code null} if none. We will set this field to the
@@ -71,88 +67,44 @@ final class PackOutput implements Closea
     private String mainClass, splashScreen;
 
     /**
-     * The JAR to be used as inputs.
-     */
-    private final Set<File> inputs;
-
-    /**
-     * The entries which were already done by previous invocation of {@link #getInputStream}.
+     * The JAR to be used as inputs. The elements in this map will be removed by the
+     * {@link #write()} method as we are done copying the content of JAR files.
      */
-    private final Set<String> entriesDone = new HashSet<String>();
+    private final Map<File,PackInput> inputJARs;
 
     /**
-     * Creates an output jar.
+     * The entries which were already written in the output JAR file.
+     * There is two kind of entries which need this check:
      *
-     * @param packer    The packer that created this object.
-     * @param parent    The parent, or {@code null} if none.
-     * @param jars      The JAR filenames.
-     */
-    PackOutput(final Packer packer, final PackOutput parent, final String[] jars) {
-        this.packer = packer;
-        if (parent != null) {
-            inputs = new LinkedHashSet<File>(parent.inputs);
-        } else {
-            inputs = new LinkedHashSet<File>(jars.length * 4/3);
-        }
-        for (final String jar : jars) {
-            File file = new File(jar);
-            if (!file.isAbsolute()) {
-                file = new File(packer.jarDirectory, jar);
-            }
-            if (!file.isFile()) {
-                throw new IllegalArgumentException("Not a file: " + file);
-            }
-            if (!inputs.add(file)) {
-                throw new IllegalArgumentException("Duplicated JAR: " + file);
-            }
-        }
-    }
-
-    /**
-     * Returns {@code true} if this pack contains the given JAR file.
+     * <ul>
+     *   <li>Directories, which may be duplicated in different JAR files.</li>
+     *   <li>{@code META-INF/services} files which were merged in a single file.</li>
+     * </ul>
      *
-     * @param  file The JAR file to check for inclusion.
-     * @return {@code true} if this pack contains the given JAR file.
+     * @see #isMergeAllowed(String)
      */
-    boolean contains(final File file) {
-        return inputs.contains(file);
-    }
+    private final Set<String> entriesDone = new HashSet<String>();
 
     /**
-     * Copies the entries from the given {@code mapping} to the given {@code actives} map, but
-     * only those having a key included in the set of input files used by this {@code PackOutput}.
+     * Returns {@code true} if entries of the given name are allowed to be concatenated
+     * when they appear in more than one input JAR files.
      *
-     * @param mapping The mapping from {@link File} to {@link PackInput}.
-     * @param actives Where to store the {@link PackInput} required for
-     *        input by this {@code PackOutput}.
-     */
-    void copyInputs(final Map<File,PackInput> mapping, final Map<File,PackInput> actives) {
-        for (final File file : inputs) {
-            final PackInput input = mapping.get(file);
-            if (input != null) {
-                final PackInput old = actives.put(file, input);
-                if (old != null && old != input) {
-                    throw new AssertionError("Inconsistent mapping.");
-                }
-            }
-        }
+     * @see #entriesDone
+     */
+    private static boolean isMergeAllowed(final String name) {
+        return name.startsWith(PackInput.SERVICES);
     }
 
     /**
-     * Opens the JAR files that were not already opens and store them in the given map.
+     * Creates an output jar.
      *
-     * @param  inputs The map where to store the opened JAR files.
-     * @throws IOException If a file can not be open.
+     * @param inputJARs The input JAR filenames together with their {@code PackInput} helpers.
+     * @param outputJAR The output JAR filename.
      */
-    void createPackInputs(final Map<File,PackInput> inputs) throws IOException {
-        for (final File jar : this.inputs) {
-            PackInput in = inputs.get(jar);
-            if (in == null) {
-                in = new PackInput(jar);
-                if (inputs.put(jar, in) != null) {
-                    throw new AssertionError(jar);
-                }
-            }
+    PackOutput(final Map<File,PackInput> inputJARs, final File outputJAR) {
+        this.inputJARs = inputJARs;
+        this.outputJAR = outputJAR;
+        for (final PackInput in : inputJARs.values()) {
             if (in.mainClass != null) {
                 mainClass = in.mainClass;
             }
@@ -163,23 +115,30 @@ final class PackOutput implements Closea
     }
 
     /**
-     * Opens the given JAR file for writing
+     * Opens the given JAR file for writing and creates its manifest.
      *
-     * @param  file The file to open.
+     * @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 File file) throws IOException {
-        this.file = file;
+    void open(final String projectName, final String projectURL, final String version) throws IOException {
         final Manifest manifest = new Manifest();
         Attributes attributes = manifest.getMainAttributes();
-        attributes.put(Attributes.Name.MANIFEST_VERSION,       "1.0");
-        attributes.put(Attributes.Name.SPECIFICATION_TITLE,    "Apache SIS");
-        attributes.put(Attributes.Name.SPECIFICATION_VENDOR,   "Apache SIS");
-        attributes.put(Attributes.Name.SPECIFICATION_VERSION,  packer.version);
-        attributes.put(Attributes.Name.IMPLEMENTATION_TITLE,   "Apache SIS");
-        attributes.put(Attributes.Name.IMPLEMENTATION_VENDOR,  "Apache SIS");
-        attributes.put(Attributes.Name.IMPLEMENTATION_VERSION, packer.version);
-        attributes.put(Attributes.Name.IMPLEMENTATION_URL,     "http://sis.apache.org");
+        attributes.put(Attributes.Name.MANIFEST_VERSION, "1.0");
+        if (projectName != null) {
+            attributes.put(Attributes.Name.SPECIFICATION_TITLE,    projectName);
+            attributes.put(Attributes.Name.SPECIFICATION_VENDOR,   projectName);
+            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);
+        }
         if (mainClass != null) {
             attributes.put(Attributes.Name.MAIN_CLASS, mainClass);
         }
@@ -187,9 +146,9 @@ final class PackOutput implements Closea
             attributes.put(PackInput.SPLASH_SCREEN, splashScreen);
         }
         /*
-         * Add the manifest of every dependencies.
+         * Add the package-level manifest of every dependencies.
          */
-        for (final File input : inputs) {
+        for (final File input : inputJARs.keySet()) {
             if (!input.getName().startsWith("sis-")) {
                 String packageName = null;
                 final JarFile jar = new JarFile(input, false);
@@ -237,13 +196,15 @@ final class PackOutput implements Closea
         /*
          * Open the output stream for the big JAR file.
          */
-        out = new JarOutputStream(new FileOutputStream(file), manifest);
-        out.setLevel(1); // Use a cheap compression level since this JAR file is temporary.
+        outputStream = new JarOutputStream(new FileOutputStream(outputJAR), manifest);
+        outputStream.setLevel(1); // Use a cheap compression level since this JAR file is temporary.
     }
 
     /**
      * Copies the value of the given attribute from a source {@code Attributes} to a target
-     * {@code Attributes} object.
+     * {@code Attributes} object. This is used for copying the package-level attributes.
+     *
+     * @return {@code true} if the attribute has been copied.
      */
     private static boolean copy(final Attributes src, final Attributes dst, final Attributes.Name name) {
         String value = (String) src.get(name);
@@ -255,49 +216,60 @@ final class PackOutput implements Closea
     }
 
     /**
-     * Returns {@code true} if entries of the given name are allowed to be concatenated
-     * if they appear in more than one input JAR files.
+     * Iterates through the individual jars and merge them in single, bigger JAR file.
+     * This method closes the input JAR files as they are done.
      */
-    static boolean mergeAllowed(final String name) {
-        return name.startsWith(PackInput.SERVICES);
-    }
-
-    /**
-     * Begins writing a new JAR entry.
-     *
-     * @param  entry The new entry to write.
-     * @return {@code true} if the entry is ready to write, or {@code false} if it should be skipped.
-     * @throws IOException If a failure occurs while creating the entry.
-     */
-    boolean putNextEntry(final JarEntry entry) throws IOException {
-        final String name = entry.getName();
-        if (entry.isDirectory() || mergeAllowed(name)) {
-            if (!entriesDone.add(name)) {
-                return false;
+    final void writeContent() throws IOException {
+        final byte[] buffer = new byte[64 * 1024];
+        for (final Iterator<Map.Entry<File,PackInput>> it = inputJARs.entrySet().iterator(); it.hasNext();) {
+            final Map.Entry<File,PackInput> inputJAR = it.next();
+            it.remove(); // Needs to be removed before the inner loop below.
+            final PackInput input = inputJAR.getValue();
+            try {
+                for (JarEntry entry; (entry = input.nextEntry()) != null;) {
+                    final String name = entry.getName();
+                    boolean isMergeAllowed = false;
+                    if (entry.isDirectory() || (isMergeAllowed = isMergeAllowed(name))) {
+                        if (!entriesDone.add(name)) {
+                            continue;
+                        }
+                    }
+                    outputStream.putNextEntry(entry);
+                    copy(input.getInputStream(), buffer);
+                    /*
+                     * From that points, the entry has been copied to the target JAR. Now look in
+                     * following input JARs to see if there is some META-INF/services files to merge.
+                     */
+                    if (isMergeAllowed) {
+                        for (final Map.Entry<File,PackInput> continuing : inputJARs.entrySet()) {
+                            final InputStream in = continuing.getValue().getInputStream(name);
+                            if (in != null) {
+                                copy(in, buffer);
+                            }
+                        }
+                    }
+                    outputStream.closeEntry();
+                }
+            } finally {
+                input.close();
             }
         }
-        out.putNextEntry(entry);
-        return true;
-    }
-
-    /**
-     * Writes the given number of bytes.
-     *
-     * @param  buffer The buffer containing the bytes to write.
-     * @param  n The number of bytes to write.
-     * @throws IOException if an exception occurred while writing the bytes.
-     */
-    void write(final byte[] buffer, final int n) throws IOException {
-        out.write(buffer, 0, n);
     }
 
     /**
-     * Close the current entry.
+     * Copies fully the given input stream to the given destination.
+     * The given input stream is closed after the copy.
      *
-     * @throws IOException If an error occurred while closing the entry.
-     */
-    void closeEntry() throws IOException {
-        out.closeEntry();
+     * @param  in     The input stream from which to get the the content to copy.
+     * @param  buffer Temporary buffer to reuse at each method call.
+     * @throws IOException If an error occurred during the copy.
+     */
+    void copy(final InputStream in, final byte[] buffer) throws IOException {
+        int n;
+        while ((n = in.read(buffer)) >= 0) {
+            outputStream.write(buffer, 0, n);
+        }
+        in.close();
     }
 
     /**
@@ -307,35 +279,55 @@ final class PackOutput implements Closea
      */
     @Override
     public void close() throws IOException {
-        if (out != null) {
-            out.close();
+        for (final PackInput input : inputJARs.values()) {
+            /*
+             * The code in this loop is never executed in normal execution, since the map shall be empty after
+             * successful completion of 'writeContent()'. However the map may be non-empty if the above method
+             * threw an exception, in which case this 'close()' method will be invoked in a 'finally' block.
+             */
+            input.close();
         }
-        out = null;
+        inputJARs.clear();
+        if (outputStream != null) {
+            outputStream.close();
+        }
+        outputStream = null;
     }
 
     /**
-     * Packs the output JAR.
+     * Creates a Pack200 file from the output JAR, then delete the JAR.
      *
      * @throws IOException if an error occurred while packing the JAR.
      */
     void pack() throws IOException {
-        if (out != null) {
+        if (outputStream != null) {
             throw new IllegalStateException("JAR output stream not closed.");
         }
-        final File inputFile = file;
+        final File inputFile = outputJAR;
         String filename = inputFile.getName();
         final int ext = filename.lastIndexOf('.');
         if (ext > 0) {
             filename = filename.substring(0, ext);
         }
-        filename += ".pack.gz";
+        filename += PACK_EXTENSION;
         final File outputFile = new File(inputFile.getParent(), filename);
         if (outputFile.equals(inputFile)) {
-            throw new IOException("Input file is already a packed: " + inputFile);
+            throw new IOException("Input file is already packed: " + inputFile);
         }
-        /*
-         * Now process to the compression.
-         */
+        pack(new FileOutputStream(outputFile));
+    }
+
+    /**
+     * Creates a Pack200 file from the output JAR, then delete the JAR.
+     *
+     * @param  out Where to write the Pack200. This stream will be closed by this method.
+     * @throws IOException if an error occurred while packing the JAR.
+     */
+    void pack(final OutputStream out) throws IOException {
+        if (outputStream != null) {
+            throw new IllegalStateException("JAR output stream not closed.");
+        }
+        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.
@@ -345,11 +337,11 @@ final class PackOutput implements Closea
         p.put(UNKNOWN_ATTRIBUTE,  ERROR);  // Throw an error if an attribute is unrecognized
         final JarFile jarFile = new JarFile(inputFile);
         try {
-            final OutputStream out = new GZIPOutputStream(new FileOutputStream(outputFile));
+            final OutputStream deflater = new GZIPOutputStream(out);
             try {
-                packer.pack(jarFile, out);
+                packer.pack(jarFile, deflater);
             } finally {
-                out.close();
+                deflater.close();
             }
         } finally {
             jarFile.close();

Modified: sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Packer.java [UTF-8] Tue Aug 20 22:50:04 2013
@@ -19,311 +19,122 @@ package org.apache.sis.internal.maven;
 import java.util.Map;
 import java.util.Set;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.jar.*;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.InputStream;
+
+import static org.apache.sis.internal.maven.Filenames.*;
 
 
 /**
- * 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/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-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-1.0.jar");
- * packer.createJars();
- * packer.close();
- * packer.pack();</pre></blockquote>
+ * Creates a PACK200 files from the JAR in the {@code target/binaries} directory.
+ * This tools needs the JAR files to be either copied or linked in the {@code target/binaries} directory,
+ * or listed in the {@code target/binaries/content.txt} file.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
- * @version 0.3
+ * @version 0.4
  * @module
  */
 final class Packer implements FilenameFilter {
     /**
-     * The sub-directory containing pack files. This directory
-     * will be automatically created if it doesn't already exist.
+     * The project name, URL and version to declare in the manifest file, or {@code null} if none.
      */
-    private static final String PACK_DIRECTORY = "bundles";
+    private final String projectName, projectURL, version;
 
     /**
-     * The Maven target directory. Should contains the {@code "binaries"} sub-directory,
-     * which should contains all JAR files collected by {@code sis-build-helper} plugin.
+     * The Maven target directory. Shall contain the {@code "binaries"} sub-directory,
+     * which shall contains all JAR files collected by {@code sis-build-helper} plugin.
      */
     private final File targetDirectory;
 
     /**
-     * The directory of JAR files. Shall be {@code "target/binaries"}.
-     */
-    final File jarDirectory;
-
-    /**
-     * The JAR files to read, by input filename.
-     */
-    private final Map<File,PackInput> inputs = new LinkedHashMap<File,PackInput>();
-
-    /**
-     * The JAR and PACK files to create, by output name.
+     * The directory of input JAR files. Shall be {@code "target/binaries"}.
      */
-    private final Map<String,PackOutput> outputs = new LinkedHashMap<String,PackOutput>();
-
-    /**
-     * The version to declare in the manifest file.
-     */
-    final String version;
+    private final File binariesDirectory;
 
     /**
      * Creates a packer.
      *
-     * @param targetDirectory The Maven target directory.
-     * @param version The version to declare in the manifest file.
+     * @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 File targetDirectory, final String version) throws FileNotFoundException {
-        this.version = version;
+    Packer(final String projectName, final String projectURL, final String version,
+           final File targetDirectory) throws FileNotFoundException
+    {
+        this.projectName = projectName;
+        this.projectURL  = projectURL;
+        this.version     = version;
         this.targetDirectory = targetDirectory;
-        this.jarDirectory = new File(targetDirectory, JarCollector.SUB_DIRECTORY);
-        if (!jarDirectory.isDirectory()) {
-            throw new FileNotFoundException("Directory not found: " + jarDirectory);
+        this.binariesDirectory = new File(targetDirectory, BINARIES_DIRECTORY);
+        if (!binariesDirectory.isDirectory()) {
+            throw new FileNotFoundException("Directory not found: " + binariesDirectory);
         }
     }
 
     /**
-     * Adds a pack which will contain every JAR files in the target directory.
-     * The given {@code pack} name is the name of the JAR file to create before to be packed.
-     * This filename shall ends with the "{@code .jar}" suffix. That suffix will be replaced
-     * by {@code ".pack.gz"} at Pack200 creation time.
+     * Filter the input JAR files. This is for internal usage by {@link #createOutputJAR(String)} only.
      *
-     * @param  pack The name of the JAR file to create before the Pack200 creation.
-     * @throws IOException If an error occurred while collecting the target directory content.
+     * @param  directory The directory (ignored).
+     * @param  name The filename.
+     * @return {@code true} if the given filename ends with {@code ".jar"}.
      */
-    public void addPack(final String pack) throws IOException {
-        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()]));
+    @Override
+    public boolean accept(final File directory, final String name) {
+        return name.endsWith(".jar");
     }
 
     /**
-     * Adds the given JAR files for the given pack. This method can be invoked when we want to
-     * create a Pack200 file containing only a subset of all available JAR files, or when some
-     * JAR files to include are specified by a previously created Pack200 file.
-     *
-     * <p>The filenames in the given {@code jars} array can contains the {@code '*'} wildcards.
-     * However at most one entry can match, otherwise an exception will be thrown. This limited
-     * wildcards support is mostly a convenience for avoiding to specify the version number of
-     * JAR files.</p>
-     *
-     * @param  parent The pack from which to inherit the JAR files, or {@code null} if none.
-     * @param  pack   The name of the JAR file to create before the Pack200 creation.
-     * @param  jars   The list of JAR files in this pack file. Filenames can contain the {@code '*'} wildcards.
-     * @throws IOException If an error occurred while collecting the target directory content.
+     * Returns the list of input JAR files, together with a helper class for copying the data in the Pack200 file.
+     * All input JAR files are opened by this method. They will need to be closed by {@link PackInput#close()}.
      */
-    public void addPack(final String parent, final String pack, final String[] jars) throws IOException {
-        PackOutput p = null;
-        if (parent != null) {
-            p = outputs.get(parent);
-            if (p == null) {
-                throw new IllegalArgumentException("Non-existant pack: " + parent);
+    private Map<File,PackInput> getInputJARs() throws IOException {
+        final Set<String> filenames = JarCollector.loadDependencyList(new File(binariesDirectory, CONTENT_FILE));
+        filenames.addAll(Arrays.asList(binariesDirectory.list(this)));
+        final Map<File,PackInput> inputJARs = new LinkedHashMap<File,PackInput>(filenames.size() * 4/3);
+        for (final String filename : filenames) {
+            File file = new File(filename);
+            if (!file.isAbsolute()) {
+                file = new File(binariesDirectory, filename);
             }
-        }
-        /*
-         * If there is wildcard, replace the wildcard by the full name.
-         * We allows only one name (the wildcard should be used for the
-         * version number only, and we don't allow many versions of the
-         * same file).
-         */
-        for (int i=0; i<jars.length; i++) {
-            final String jarFile = jars[i];
-            final int w = jarFile.lastIndexOf('*');
-            if (w >= 0) {
-                final String prefix = jarFile.substring(0, w);
-                final String suffix = jarFile.substring(w+1);
-                final String[] f = jarDirectory.list(new FilenameFilter() {
-                    @Override public boolean accept(final File directory, final String name) {
-                        return name.startsWith(prefix) && name.endsWith(suffix);
-                    }
-                });
-                if (f == null) {
-                    throw new FileNotFoundException("Directory not found: " + jarDirectory);
-                }
-                switch (f.length) {
-                    case 1:  jars[i] = f[0]; break;
-                    case 0:  throw new IllegalArgumentException("No file found for pattern: " + jarFile);
-                    default: throw new IllegalArgumentException("Duplicated files: " + f[0] + " and " + f[1]);
-                }
+            if (!file.isFile() || !file.canRead()) {
+                throw new IllegalArgumentException("Not a file or can not read: " + file);
+            }
+            if (inputJARs.put(file, new PackInput(file)) != null) {
+                throw new IllegalArgumentException("Duplicated JAR: " + file);
             }
         }
-        p = new PackOutput(this, p, jars);
-        if (outputs.put(pack, p) != null) {
-            throw new IllegalArgumentException("Duplicated pack: " + pack);
-        }
+        return inputJARs;
     }
 
     /**
-     * Creates the JAR files from the packages declared with {@link #addPack}.
+     * Prepares the Pack 200 file which will contain every JAR files in the {@code target/binaries} directory.
+     * The given {@code outputJAR} name is the name of the JAR file to create before to be packed.
+     * This filename shall end with the "{@code .jar}" suffix.
+     *
+     * <p>Callers needs to invoke one of the {@code PackOutput.pack(…)} methods on the returned object.</p>
      *
-     * @throws IOException if an error occurred while reading existing JAR files
-     *         or writing to the packed files.
+     * @param  outputJAR The name of the JAR file to create before the Pack200 creation.
+     * @throws IOException If an error occurred while collecting the target directory content.
      */
-    public void createJars() throws IOException {
+    PackOutput preparePack200(final String outputJAR) throws IOException {
         /*
          * Creates the output directory. We do that first in order to avoid the
          * costly opening of all JAR files if we can't create this directory.
          */
-        final File outDirectory = new File(targetDirectory, PACK_DIRECTORY);
-        if (!outDirectory.isDirectory()) {
-            if (!outDirectory.mkdir()) {
-                throw new IOException("Can't create the \"" + PACK_DIRECTORY + "\" directory.");
-            }
-        }
-        /*
-         * Opens all input JAR files in read-only mode, and create the initially empty output JAR
-         * file. We need to open all input files in order to check for duplicate entries before we
-         * start the writing process. Files in the META-INF/services directory need to be merged.
-         */
-        for (final Map.Entry<String,PackOutput> entry : outputs.entrySet()) {
-            final String name = entry.getKey();
-            final PackOutput pack = entry.getValue();
-            pack.createPackInputs(inputs);
-            pack.open(new File(outDirectory, name));
-        }
-        /*
-         * Iterates through the individual jars and merge them in single, bigger JAR file.
-         * During each iteration we get the array of output streams where a particular file
-         * need to be copied - all those "active" output streams will be filled in parallel.
-         */
-        final byte[] buffer = new byte[64*1024];
-        final Map<File,PackInput> activeInputs = new LinkedHashMap<File,PackInput>(inputs.size() * 4/3);
-        final PackOutput[] activesForFile      = new PackOutput[outputs.size()];
-        final PackOutput[] activesForEntry     = new PackOutput[activesForFile.length];
-        final PackOutput[] activesForFollow    = new PackOutput[activesForFile.length];
-        for (final Iterator<Map.Entry<File,PackInput>> it = inputs.entrySet().iterator(); it.hasNext();) {
-            final Map.Entry<File,PackInput> fileInputPair = it.next();
-            final File  inputFile = fileInputPair.getKey();
-            final PackInput input = fileInputPair.getValue();
-            try {
-                it.remove(); // Needs to be before next usage of "inputs" below.
-                int countForFile = 0;
-                for (final PackOutput candidate : outputs.values()) {
-                    if (candidate.contains(inputFile)) {
-                        activesForFile[countForFile++] = candidate;
-                        candidate.copyInputs(inputs, activeInputs);
-                    }
-                }
-                /*
-                 * "activesForFile" now contains the list of PackOutput we need to care about
-                 * for the current PackInput (i.e. a whole input JAR). Copies every entries
-                 * found in that JAR.
-                 */
-                for (JarEntry entry; (entry = input.nextEntry()) != null;) {
-                    int countForEntry = 0;
-                    for (int i=0; i<countForFile; i++) {
-                        final PackOutput candidate = activesForFile[i];
-                        if (candidate.putNextEntry(entry)) {
-                            activesForEntry[countForEntry++] = candidate;
-                        }
-                    }
-                    copy(input.getInputStream(), activesForEntry, countForEntry, buffer);
-                    /*
-                     * From that points, the entry has been copied to all target JARs. Now looks in
-                     * following input JARs to see if there is some META-INF/services files to merge.
-                     */
-                    final String name = entry.getName();
-                    if (PackOutput.mergeAllowed(name)) {
-                        for (final Map.Entry<File,PackInput> continuing : activeInputs.entrySet()) {
-                            final InputStream in = continuing.getValue().getInputStream(name);
-                            if (in != null) {
-                                final File file = continuing.getKey();
-                                int countForFollow = 0;
-                                for (int i=0; i<countForEntry; i++) {
-                                    final PackOutput candidate = activesForEntry[i];
-                                    if (candidate.contains(file)) {
-                                        activesForFollow[countForFollow++] = candidate;
-                                    }
-                                }
-                                copy(in, activesForFollow, countForFollow, buffer);
-                                Arrays.fill(activesForFollow, null);
-                            }
-                        }
-                    }
-                    for (int i=0; i<countForEntry; i++) {
-                        activesForEntry[i].closeEntry();
-                    }
-                    Arrays.fill(activesForEntry, null);
-                }
-                Arrays.fill(activesForFile, null);
-                activeInputs.clear();
-            } finally {
-                input.close();
-            }
-        }
-        close();
-    }
-
-    /**
-     * Copies fully the given input stream to the given destination.
-     * The given input stream is closed after the copy.
-     *
-     * @param  in     The input stream from which to get the the content to copy.
-     * @param  out    Where to copy the input stream content.
-     * @param  count  Number of valid entries in the {@code out} array.
-     * @param  buffer Temporary buffer to reuse at each method call.
-     * @throws IOException If an error occurred during the copy.
-     */
-    private static void copy(final InputStream in, final PackOutput[] out, final int count,
-                             final byte[] buffer) throws IOException
-    {
-        int n;
-        while ((n = in.read(buffer)) >= 0) {
-            for (int i=0; i<count; i++) {
-                out[i].write(buffer, n);
-            }
-        }
-        in.close();
-    }
-
-    /**
-     * Closes all streams.
-     *
-     * @throws IOException If an error occurred while closing the stream.
-     */
-    public void close() throws IOException {
-        for (final PackOutput jar : outputs.values()) {
-            jar.close();
-        }
-        for (final PackInput jar : inputs.values()) {
-            jar.close();
+        final File outDirectory = distributionDirectory(targetDirectory);
+        final PackOutput output = new PackOutput(getInputJARs(), new File(outDirectory, outputJAR));
+        try {
+            output.open(projectName, projectURL, version);
+            output.writeContent();
+        } finally {
+            output.close();
         }
-    }
-
-    /**
-     * Launch Pack200 after output JAR files have been created.
-     *
-     * @throws IOException If an error occurred while creating the PACK200 file.
-     */
-    public void pack() throws IOException {
-        for (final PackOutput jar : outputs.values()) {
-            jar.pack();
-        }
-    }
-
-    /**
-     * Filter the JAR files.
-     *
-     * @param  directory The directory (ignored).
-     * @param  name The filename.
-     * @return {@code true} if the given filename ends with {@code ".jar"}.
-     */
-    @Override
-    public boolean accept(final File directory, final String name) {
-        return name.endsWith(".jar");
+        return output;
     }
 }

Modified: sis/trunk/core/sis-build-helper/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-build-helper/src/site/apt/index.apt?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-build-helper/src/site/apt/index.apt [UTF-8] (original)
+++ sis/trunk/core/sis-build-helper/src/site/apt/index.apt [UTF-8] Tue Aug 20 22:50:04 2013
@@ -166,3 +166,14 @@ Building Apache SIS
 
   The Pack200 bundle does not include the <<<sis-webapp>>> module because the later can be downloaded
   as a <<<WAR>>> file from the Maven repository.
+
+
+* Distribution file
+
+  The distribution file is a ZIP file containing the same Pack200 bundle than above,
+  together with a <<<README>>> file, configuration files and convenience shell scripts.
+  The distribution file is generated as below:
+
+-------------------------------------------------------------------
+   mvn org.apache.sis.core:sis-build-helper:dist --non-recursive
+-------------------------------------------------------------------

Modified: sis/trunk/core/sis-feature/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/pom.xml?rev=1516013&r1=1516008&r2=1516013&view=diff
==============================================================================
--- sis/trunk/core/sis-feature/pom.xml (original)
+++ sis/trunk/core/sis-feature/pom.xml Tue Aug 20 22:50:04 2013
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.apache.sis</groupId>
     <artifactId>core</artifactId>
-    <version>0.4-jdk6-SNAPSHOT</version>
+    <version>0.4-SNAPSHOT</version>
   </parent>
 
 
@@ -101,7 +101,7 @@ Representations of geographic features.
   <dependencies>
     <dependency>
       <groupId>org.opengis</groupId>
-      <artifactId>geoapi-pending</artifactId>
+      <artifactId>geoapi</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.sis.core</groupId>

Propchange: sis/trunk/core/sis-feature/pom.xml
------------------------------------------------------------------------------
  Merged /sis/branches/JDK6/core/sis-feature/pom.xml:r1394364-1515763,1516006-1516008
  Merged /sis/branches/JDK7/core/sis-feature/pom.xml:r1515761-1515799

Propchange: sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java:r1515761-1515799
  Merged /sis/branches/JDK6/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeature.java:r1394364-1515763,1516006-1516008

Modified: sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/build-impl.xml Tue Aug 20 22:50:04 2013
@@ -138,6 +138,7 @@ is divided into following sections:
                 <available file="${test.console.dir}"/>
                 <available file="${test.netcdf.dir}"/>
                 <available file="${test.storage.dir}"/>
+                <available file="${test.feature.dir}"/>
                 <available file="${test.referencing.dir}"/>
                 <available file="${test.metadata.dir}"/>
                 <available file="${test.utility.dir}"/>
@@ -150,6 +151,7 @@ is divided into following sections:
                 <available file="${src.console.dir}"/>
                 <available file="${src.netcdf.dir}"/>
                 <available file="${src.storage.dir}"/>
+                <available file="${src.feature.dir}"/>
                 <available file="${src.referencing.dir}"/>
                 <available file="${src.metadata.dir}"/>
                 <available file="${src.utility.dir}"/>
@@ -245,12 +247,14 @@ is divided into following sections:
         <fail unless="src.console.dir">Must set src.console.dir</fail>
         <fail unless="src.netcdf.dir">Must set src.netcdf.dir</fail>
         <fail unless="src.storage.dir">Must set src.storage.dir</fail>
+        <fail unless="src.feature.dir">Must set src.feature.dir</fail>
         <fail unless="src.referencing.dir">Must set src.referencing.dir</fail>
         <fail unless="src.metadata.dir">Must set src.metadata.dir</fail>
         <fail unless="src.utility.dir">Must set src.utility.dir</fail>
         <fail unless="test.console.dir">Must set test.console.dir</fail>
         <fail unless="test.netcdf.dir">Must set test.netcdf.dir</fail>
         <fail unless="test.storage.dir">Must set test.storage.dir</fail>
+        <fail unless="test.feature.dir">Must set test.feature.dir</fail>
         <fail unless="test.referencing.dir">Must set test.referencing.dir</fail>
         <fail unless="test.metadata.dir">Must set test.metadata.dir</fail>
         <fail unless="test.utility.dir">Must set test.utility.dir</fail>
@@ -274,7 +278,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -314,7 +318,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -346,7 +350,7 @@ is divided into following sections:
     </target>
     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -442,6 +446,9 @@ is divided into following sections:
                         <fileset dir="${test.storage.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.feature.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -489,6 +496,9 @@ is divided into following sections:
                     <fileset dir="${test.storage.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
+                    <fileset dir="${test.feature.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
+                        <filename name="@{testincludes}"/>
+                    </fileset>
                     <fileset dir="${test.referencing.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
                         <filename name="@{testincludes}"/>
                     </fileset>
@@ -616,6 +626,9 @@ is divided into following sections:
                         <fileset dir="${test.storage.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
+                        <fileset dir="${test.feature.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                            <filename name="@{testincludes}"/>
+                        </fileset>
                         <fileset dir="${test.referencing.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
                         </fileset>
@@ -989,7 +1002,7 @@ is divided into following sections:
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
@@ -999,6 +1012,7 @@ is divided into following sections:
             <fileset dir="${src.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1022,7 +1036,7 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.local-src.dir}:${src.webapp.dir}:${src.console.dir}:${src.netcdf.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.metadata.dir}:${src.utility.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -1298,6 +1312,9 @@ is divided into following sections:
             <fileset dir="${src.storage.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
+            <fileset dir="${src.feature.dir}" excludes="*.java,${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
             <fileset dir="${src.referencing.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
@@ -1329,6 +1346,9 @@ is divided into following sections:
             <fileset dir="${src.storage.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
+            <fileset dir="${src.feature.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
             <fileset dir="${src.referencing.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
@@ -1360,14 +1380,15 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target if="do.depend.true" name="-compile-test-depend">
-        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
     </target>
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1385,11 +1406,12 @@ is divided into following sections:
     <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}" srcdir="${test.console.dir}:${test.netcdf.dir}:${test.storage.dir}:${test.feature.dir}:${test.referencing.dir}:${test.metadata.dir}:${test.utility.dir}"/>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.netcdf.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.storage.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${test.feature.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.referencing.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.metadata.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${test.utility.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>

Modified: sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] Tue Aug 20 22:50:04 2013
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=d45d31b9
-nbproject/build-impl.xml.script.CRC32=bdea8683
+nbproject/build-impl.xml.data.CRC32=bd5320d7
+nbproject/build-impl.xml.script.CRC32=8f7cbac4
 nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.properties?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Tue Aug 20 22:50:04 2013
@@ -50,6 +50,8 @@ src.netcdf.dir       = ${project.root}/s
 test.netcdf.dir      = ${project.root}/storage/sis-netcdf/src/test/java
 src.storage.dir      = ${project.root}/storage/sis-storage/src/main/java
 test.storage.dir     = ${project.root}/storage/sis-storage/src/test/java
+src.feature.dir      = ${project.root}/core/sis-feature/src/main/java
+test.feature.dir     = ${project.root}/core/sis-feature/src/test/java
 src.referencing.dir  = ${project.root}/core/sis-referencing/src/main/java
 test.referencing.dir = ${project.root}/core/sis-referencing/src/test/java
 src.metadata.dir     = ${project.root}/core/sis-metadata/src/main/java
@@ -66,6 +68,7 @@ geoapi.version       = 3.0.0
 unit-api.version     = 0.6.1
 jsr275.version       = 0.9.3
 vecmath.version      = 1.5.2
+geometry.version     = 1.0
 georss.version       = 0.9.8
 rome.version         = 0.9
 jdom1.version        = 1.0
@@ -89,6 +92,7 @@ javac.classpath=\
     ${maven.repository}/org/unitsofmeasurement/unit-api/${unit-api.version}/unit-api-${unit-api.version}.jar:\
     ${maven.repository}/javax/measure/jsr-275/${jsr275.version}/jsr-275-${jsr275.version}.jar:\
     ${maven.repository}/java3d/vecmath/${vecmath.version}/vecmath-${vecmath.version}.jar:\
+    ${maven.repository}/com/esri/geometry/esri-geometry-api/${geometry.version}/esri-geometry-api-${geometry.version}.jar:\
     ${maven.repository}/org/geonames/georss-rome/${georss.version}/georss-rome-${georss.version}.jar:\
     ${maven.repository}/rome/rome/${rome.version}/rome-${rome.version}.jar:\
     ${maven.repository}/jdom/jdom/${jdom1.version}/jdom-${jdom1.version}.jar:\

Modified: sis/trunk/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/trunk/ide-project/NetBeans/nbproject/project.xml?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/trunk/ide-project/NetBeans/nbproject/project.xml Tue Aug 20 22:50:04 2013
@@ -28,6 +28,7 @@
                 <root id="src.console.dir" name="Console"/>
                 <root id="src.netcdf.dir" name="NetCDF"/>
                 <root id="src.storage.dir" name="Storage"/>
+                <root id="src.feature.dir" name="Feature"/>
                 <root id="src.referencing.dir" name="Referencing"/>
                 <root id="src.metadata.dir" name="Metadata"/>
                 <root id="src.utility.dir" name="Utility"/>
@@ -36,6 +37,7 @@
                 <root id="test.console.dir" name="Test Console"/>
                 <root id="test.netcdf.dir" name="Test NetCDF"/>
                 <root id="test.storage.dir" name="Test Storage"/>
+                <root id="test.feature.dir" name="Test Feature"/>
                 <root id="test.referencing.dir" name="Test Referencing"/>
                 <root id="test.metadata.dir" name="Test Metadata"/>
                 <root id="test.utility.dir" name="Test Utility"/>

Modified: sis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1516013&r1=1516012&r2=1516013&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Tue Aug 20 22:50:04 2013
@@ -188,6 +188,14 @@ Apache SIS is a free software, Java lang
       </roles>
     </developer>
     <developer>
+      <name>Travis L. Pinney</name>
+      <id>tlpinney</id>
+      <email>travis.pinney@gmail.com</email>
+      <roles>
+        <role>developer</role>
+      </roles>
+    </developer>
+    <developer>
       <name>Nga Chung</name>
       <id>nchung</id>
       <email>nchung@apache.org</email>
@@ -325,11 +333,21 @@ Apache SIS is a free software, Java lang
 
       <!-- Libraries (language, XML, network) -->
       <dependency>
+        <groupId>com.esri.geometry</groupId>
+        <artifactId>esri-geometry-api</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <dependency>
         <groupId>javax</groupId>
         <artifactId>javaee-api</artifactId>
         <version>6.0</version>
         <scope>provided</scope>
       </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-compress</artifactId>
+        <version>1.5</version>
+      </dependency>
 
       <!-- Optional dependencies -->
       <dependency>



Mime
View raw message