Re: netcdf-java for maven?

Hi Brian:

Brian Schlining wrote:

Hi John,

Has netcdf been published in a maven 2 repository anywhere yet?


Maven (version 2) is pretty new so some folks on the list may not be familiar with what a Maven 'repository' is yet. A repository is basically a web server that hosts a pre-built netcdf.jar and includes a XML descriptor for the jar. When someone builds a project using Maven (instead of say, ant), Maven will fetch the dependencies from the repository. One nice thing about this is that you don't need to check all the dependent libraries into your version control system. There's a maven repository on Ibiblio that you could host the netcdf.jar on. There's a how-to for this at http://maven.apache.org/maven-1.x/reference/repository-upload.html. (NOTE: Most new Maven projects will probably be using Maven 2). You don't need to build netcdf-java with Maven in order to host the jar on the repository.
No, we looked at moving our builds to maven, and decided for now not to. We did layout our directories in maven compatible way (I hope). Im assuming isn not too hard, but dont have time now. Any maven gurus who'd like to create a maven build file for us?


I downloaded the netcdf-2.2 src and looked at the build structure. It's close to a maven build, but slightly different. The current structure is:

netcdf
|~~ build.xml          // ant build file
|~~ lib                   // dependencies
|~~ resources
|   `~~ resources    // stuff to include in netcdf.jar
`~~ src
    |~~ dods
    |~~ thredds
    `~~ ucar

It is possible to build a maven project for the existing netcdf structure, but from what I've gathered it's not generally recommended. Anyway, for maven 2, the directory structure should really look like:

netcdf
|~~ pom.xml      // maven2 build file
`~~ src
    |~~ main
    |   |~~ java   // java source goes here
| | |~~ dods | | |~~ thredds | | |~~ ucar | `~~ resources // stuff to include in netcdf.jar
    `~~ test      // unit tests
        |~~ java
        `~~ resources


The src jar reflects the old layout in CVS. We recently moved to subversion and reorganized the structure like this one. We are considering how to do src releases in the future, possibly allowing web access to the svn repository. Its complicated because the thredds and the nj22 work are closely interwined.

thanks for the info, it sounds like we can get into the maven repository with less trouble than i realized.

John

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


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: