Closed brweber2 closed 12 years ago
Interestingly enough, I am working on getting the engine jar into the Maven Central Repository, which will require Mavenizing the project and fixing up the Ant file. I was going to start this soon so this comes at a good time.
My changes are in a branch called 'maven'.
There are two problems that I encountered.
1) The grammar files are picked up from the file system relative to the project root when running unit tests via maven. So I have two copies of them, one in $PROJECT_HOME/grammars and one in $PROJECT_HOME/src/test/resources/grammars
This is solvable in several different ways, I just haven't tackled it yet.
2) There was a failing unit test.
src/test/java/com/creativewidgetworks/goldparser/parser/test/GOLDParserTest.java
Here is the diff of the line I changed:
I'm not sure if that error is because of differing versions of Java or the OS, but maybe the code should be changed to not use the text from the Java Exception?
I haven't done the work to make the Ant script use the new directory structure, but I don't believe it would require too much work.
Let me know if you have any questions.
Thanks. Bryan
The failing unit is due to the differing messages returned by various JVM implementations by the IOException thrown in FileInputStream(). I shouldn't be asserting messages that the engine code isn't setting. I'll modify the code to catch the IOException and set the message based on the resource properties in the project. Good catch.
The code has been restructured to conform to Maven conventions and I addressed the /grammar path issue you brought up. Soon the jar, sources, and javadoc artifacts will be available via the Maven central repository. The ant file conversion for non-Maven users has also been started and I should have it finished sometime Thursday.
Tag v5_0_0 is structured for Maven and contains a Maven pom.xml and ant build.xml file.
I forked your project and added maven support in a branch. With a little bit of work to your Ant build script I think we could get this working with Ant and Maven. Is this something you are interested in?