impactcentre / ocrevalUAtion

OCR evaluation brought to you by University of Alicante
Apache License 2.0
66 stars 27 forks source link

Compiling on OSX fails #7

Closed nicholasjhenry closed 10 years ago

nicholasjhenry commented 10 years ago

In order get ocrevalUAtion running on OSX, I attempted to compile a JAR file, but running mvn package results in a compilation error:

INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.790s
[INFO] Finished at: Sat Dec 14 14:42:46 EST 2013
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ocrevalUAtion: Compilation failure: Compilation failure:
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/main/java/eu/digitisation/gui/Pulldown.java:[39,14] type javax.swing.JComboBox does not take parameters
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/main/java/eu/digitisation/gui/Pulldown.java:[52,29] type javax.swing.JComboBox does not take parameters
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/main/java/eu/digitisation/gui/Pulldown.java:[62,18] type javax.swing.JComboBox does not take parameters
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/main/java/eu/
nicholasjhenry commented 10 years ago

Upgrading Java didn't resolve the compilation errors:

java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

rccarrasco commented 10 years ago

Thanks for testing the compilation. I have downgraded the code to Java 6 and the current version should compile without those errors. Please, let me know any other issue.

nicholasjhenry commented 10 years ago

OK, making progress! That gets me pass the original compilation error, however, I get a new one:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/EncodingTest.java:[23,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/image/BImageTest.java:[27,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/TextContentTest.java:[23,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/Page/ViewerTest.java:[24,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[27,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/CharFilterTest.java:[29,21] package java.nio.file does not exist
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/EncodingTest.java:[64,21] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.io.EncodingTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/image/BImageTest.java:[71,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.image.BImageTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/TextContentTest.java:[65,21] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.io.TextContentTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/Page/ViewerTest.java:[67,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.Page.ViewerTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/Page/ViewerTest.java:[69,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.Page.ViewerTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/Page/ViewerTest.java:[75,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.Page.ViewerTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[69,21] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.ocrevaluation.ErrorMeasureTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[85,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.ocrevaluation.ErrorMeasureTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[88,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.ocrevaluation.ErrorMeasureTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[109,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.ocrevaluation.ErrorMeasureTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/ocrevaluation/ErrorMeasureTest.java:[112,22] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.ocrevaluation.ErrorMeasureTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/CharFilterTest.java:[76,21] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.io.CharFilterTest
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/test/java/eu/digitisation/io/CharFilterTest.java:[99,33] cannot find symbol
symbol  : variable Paths
location: class eu.digitisation.io.CharFilterTest
rccarrasco commented 10 years ago

"Paths.get(resourceUrl.toURI()).toFile()", which is only in Java 7 package java.nio.file.*, has been replaced with traditional "new File(resourceUrl.toURI())", valid also in Java 6.

Hopefully that is it.

nicholasjhenry commented 10 years ago

After pulling master and trying again I get:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Volumes/Data/Users/nicholas/Source/apps/zweet-tesseract-research/ocrevalUAtion/src/main/java/eu/digitisation/math/Counter.java:[174,28] inconvertible types
found   : Type
required: java.lang.String
[INFO] 1 error
rccarrasco commented 10 years ago

Solved. Again a problem caused by using Java 7 locally while declaring the code compatible with Java 6. Sorry.

nicholasjhenry commented 10 years ago

Compiled! Thank you.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.319s
[INFO] Finished at: Sat Dec 21 08:59:20 EST 2013
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------