Opened 15 years ago
Closed 15 years ago
#19916 closed defect (fixed)
JUnit won't build with "incompatible types" errors
Reported by: | jon.abourbih@… | Owned by: | nox@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.1 |
Keywords: | Cc: | ||
Port: | junit |
Description (last modified by mf2k (Frank Schima))
I cannot build the JUnit macport. The build fails with:
---> Building junit Error: Target org.macports.build returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_junit/work/junit4.6 && javac -d classes -cp /opt/local/share/java/hamcrest-core.jar -sourcepath src src/org/junit/Assume.java" returned error 1 Command output: src/org/junit/internal/matchers/IsCollectionContaining.java:44: incompatible types found : org.hamcrest.Matcher<java.lang.Iterable<java.lang.Object>> required: org.hamcrest.Matcher<java.lang.Iterable<T>> return hasItem(equalTo(element)); ^ src/org/junit/internal/matchers/IsCollectionContaining.java:54: cannot find symbol symbol : method allOf(java.util.Collection<org.hamcrest.Matcher<? extends java.lang.Iterable<T>>>) location: class org.junit.internal.matchers.IsCollectionContaining<T> return allOf(all); ^ src/org/junit/internal/matchers/IsCollectionContaining.java:64: cannot find symbol symbol : method allOf(java.util.Collection<org.hamcrest.Matcher<? extends java.lang.Iterable<T>>>) location: class org.junit.internal.matchers.IsCollectionContaining<T> return allOf(all); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors Error: Status 1 encountered during processing.
I have attempted to remove and reinstall hamcrest-core and hamcrest-library, as well as doing a clean removal of junit.
Change History (3)
comment:1 Changed 15 years ago by jon.abourbih@…
comment:2 Changed 15 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to nox@… |
WFM. What version of Xcode are you running? Please update to 3.1.2 if not, clean the port and try again.
Note: See
TracTickets for help on using
tickets.
Additional note: I'm using MacOS X 10.5.7 with Apple's Java 1.5 JVM.