[MacPorts] #19916: JUnit won't build with "incompatible types" errors

MacPorts noreply at macports.org
Thu Jun 11 09:34:45 PDT 2009


#19916: JUnit won't build with "incompatible types" errors
------------------------------------+---------------------------------------
 Reporter:  jon.abourbih@…          |       Owner:  nox@…           
     Type:  defect                  |      Status:  new             
 Priority:  Normal                  |   Milestone:                  
Component:  ports                   |     Version:  1.7.1           
 Keywords:                          |        Port:  junit           
------------------------------------+---------------------------------------
Changes (by macsforever2000@…):

  * owner:  macports-tickets@… => nox@…


Old description:

> 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.

New description:

 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.

--

Comment:

 WFM. What version of Xcode are you running? Please update to 3.1.2 if not,
 clean the port and try again.

-- 
Ticket URL: <http://trac.macports.org/ticket/19916#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list