[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netcdf-java for maven?



Just a minor modification: in M2 you can also include the optional dependencies in the <dependencies> section, but each of them must contain the tag <optional>true</optional>.

For example:

   <dependency>
     <groupId>visad</groupId>
     <artifactId>visadNoDods</artifactId>
     <version>1.2.3</version>
     <optional>true</optional>
   </dependency>

Kris

Graham Leggett wrote:
On Wed, August 16, 2006 8:07 pm, John Caron wrote:

Is it easy to host our own jar files, or do you need to use
www.ibiblio.org?

The current maven design uses ibiblio.org as a starting point, so while
it's technically possible to host elsewhere, the nett effect of doing this
means people will assume the jar is not available.

That sounds great. One question, how does versioning work around
dependencies? For example, version 2.2.17 has somewhat different
dependencies than 2.2.16.

Each published jar defines both the name and version of each of it's
dependencies in a "project object model" file. Should an end user indicate
to maven that they want to use v2.2.17 instead of v2.2.16, maven downloads
the new pom file, sees new dependencies are being used, and downloads
those new dependencies automatically.

ok, heres the scoop for version 2.2.16

We create the following jar files:

  ncCore-2.2.16.jar        just the core netcdf-java classes
  netcdf-2.2.16.jar        complete netcdf-java, except for the UI and
optional libraries
  netcdfUI-2.2.16.jar      complete netcdf-java including the UI, without
optional libraries
  toolsUI-2.2.16.jar       complete netcdf-java including the UI and
optional libraries
  nc2.2.jar                library that can be used in the IDV

The optional libraries:

  bufr.jar                    required to read Bufr datasets
  commons-httpclient          required to read files remotely over HTTP
  commons-logging, codec      required by commons-httpclient
  gnu-regexp                  required by dods; dods library itself is now
directly contained in netcdf
  grib.jar                    required to read Grib-1 or Grib-2 datasets
  jdom.jar                    required to read thredds catalogs, and read
NcML
  jpeg2000.jar                required to read Grib-2 JPEG2000 compressed
files
  nlog4j.jar                  log4j logging. Alternately, you can use any
slf4j implementation.
  visadNoDods.jar             required to read ADDE datasets; this version
has the dods libraries removed
  xercesImpl.jar              required to validate thredds catalogs (jdk
1.4 only)
  xml-apis.jar                required by xerces library

  prefsAll.jar                required for UI state persistence, related
widgets
  resourcesOptional.jar       optional detailed maps and tables

The dependencies are somewhat complicated by that fast that you can
leave out the optional libraries if you dont need the feature. In what
follows I will assume you want all the optional features. So a
dependency graph would be:

jar

 library                depends on
  ncCore-2.2.16.jar        none
  netcdf-2.2.16.jar        bufr, commons-httpclient, gnu-regexp, grib.jar,
jdom.jar, visadNoDods.jar, xercesImpl.jar (jdk1.4 only)
  netcdfUI-2.2.16.jar      same as netcdf-2.2.16.jar, plus prefsAll.jar,
resourcesOptional.jar
  toolsUI-2.2.16.jar       none, its all in one big jar
  nc2.2.jar                none other than whats already in the IDV

  grib.jar                 jpeg2000.jar
  xercesImpl.jar           xml-apis.jar
  commons-httpclient       commons-logging, commons-codec

The project I am working on uses the netcdf v2.1 jar file - do you have
the dependancy tree of the files in the v2.1 tree?

The full recipe for publishing to www.ibiblio.org is here:
http://maven.apache.org/guides/mini/guide-ibiblio-upload.html

Essentially, you submit your released packaged jar along with a pom.xml
file, which for ncCore-2.2.16 might look like this:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>edu.ucar</groupId>
  <artifactId>ncCore</artifactId>
  <version>2.2.16</version>
  <packaging>jar</packaging>
  <name>Core netcdf-java classes</name>
  <url>http://www.unidata.ucar.edu/software/netcdf-java/</url>
  <description>Just the core netcdf-java classes.</description>
  <licenses>
    <license>
      <name>GNU Lesser General Public License (LGPL)</name>
      <url>http://www.gnu.org/copyleft/lesser.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
</project>

And for netcdf-2.2.16 might look like this:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>edu.ucar</groupId>
  <artifactId>netcdf</artifactId>
  <version>2.2.16</version>
  <packaging>jar</packaging>
  <name>Complete netcdf-java, except for UI and optional</name>
  <url>http://www.unidata.ucar.edu/software/netcdf-java/</url>
  <description>Complete netcdf-java, except for the user interface
               and the optional libraries.</description>
  <licenses>
    <license>
      <name>GNU Lesser General Public License (LGPL)</name>
      <url>http://www.gnu.org/copyleft/lesser.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>edu.ucar</groupId>
      <artifactId>bufr</artifactId>
      <version>2.2.16</version>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>gnu-regexp</groupId>
      <artifactId>gnu-regexp</artifactId>
      <version>1.1.4</version>
    </dependency>
    <dependency>
      <groupId>edu.ucar</groupId>
      <artifactId>grib</artifactId>
      <version>2.2.16</version>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>1.8.0</version>
    </dependency>
    <!-- this project optionally depends on visadNoDods.jar, and
jpeg2000.jar -->
  </dependencies>
</project>

Is the visad project also a ucar.edu project?

Regards,
Graham
--


===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================