spidru / JGribX

Java GRIB-1/GRIB-2 decoder
MIT License
34 stars 14 forks source link

Added Build Automation #2

Closed reymalahay closed 6 years ago

reymalahay commented 6 years ago

Hi there,

Please accept this pull request, which contains the following:

  1. The ability to build a jar file using build automation.

  2. Fixed the project layout.

  3. Fixed the broken test.

Thanks in advance and kind regards, rey malahay

spidru commented 6 years ago

Hi @reymalahay, many thanks for the PR! Out of curiosity, is there a particular reason why in GribExample1.java you replaced:

GribFile gribFile = new GribFile(gribFilename);

with:

final InputStream gribStream = GribExample1.class.getResourceAsStream(gribFilename);
GribFile gribFile = new GribFile(gribStream);
reymalahay commented 6 years ago

@spidru thank you for accepting my code. to answer to your question, when i restructured the project, the test grib files were placed in the 'resources' directory. the resources directory is part of the classpath and a quick way to find files on the classpath is to use getResourceAsStream()

Kind regards, rey malahay

Hi @reymalahay, many thanks for the PR! Out of curiosity, is there a particular reason why in GribExample1.java you replaced:

GribFile gribFile = new GribFile(gribFilename);

with:

final InputStream gribStream = GribExample1.class.getResourceAsStream(gribFilename);
GribFile gribFile = new GribFile(gribStream);