#18740 closed defect (fixed)
junit build failure (was subversion-javahlbindings failing with jUnit/hamcrest)
Reported by: | shoan | Owned by: | nox@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.0 |
Keywords: | Cc: | craig.cottingham@… | |
Port: | junit |
Description
I am getting the following error:
DEBUG: cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_junit/work/junit4.5 && javac -d classes -cp /opt/local/share/java/hamcrest-core.jar -sourcepath src src/junit/framework/JUnit4TestAdapter.java src/org/junit/internal/AssumptionViolatedException.java:3: cannot access org.hamcrest.Description bad class file: /opt/local/share/java/hamcrest-core.jar(org/hamcrest/Description.class) class file has wrong version 50.0, should be 49.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import org.hamcrest.Description; ^ 1 error 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.5 && javac -d classes -cp /opt/local/share/java/hamcrest-core.jar -sourcepath src src/junit/framework/JUnit4TestAdapter.java" returned error 1 Command output: src/org/junit/internal/AssumptionViolatedException.java:3: cannot access org.hamcrest.Description bad class file: /opt/local/share/java/hamcrest-core.jar(org/hamcrest/Description.class) class file has wrong version 50.0, should be 49.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import org.hamcrest.Description; ^ 1 error Warning: the following items did not execute (for junit): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: The following dependencies failed to build: junit Error: Status 1 encountered during processing.
I have also attempted to reinstall hamcrest-core, but it didn't help resolve the problem. I also attempted uninstalling and reinstalling junit. It didn't help.
Any advice?
Thanks in advance.
Peace, Shoan.
Attachments (1)
Change History (13)
Changed 16 years ago by shoan
Attachment: | subversion-javahlbindings.log added |
---|
comment:1 Changed 16 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to dluke@… |
---|
comment:2 follow-up: 3 Changed 16 years ago by danielluke (Daniel J. Luke)
Owner: | changed from dluke@… to nox@… |
---|---|
Summary: | subversion-javahlbindings failing with jUnit/hamcrest → junit build failure (was subversion-javahlbindings failing with jUnit/hamcrest) |
This appears to be a junit build problem, so I'm reassigning the ticket to the junit maintainer.
One thing I would try would be to remove both hamcrest and junit and then just try to install subversion-javahlbindings.
Make sure to do something like:
port -f uninstall junit hamcrest port clean --all junit hamcrest
to make sure you clean out archives if you have archive mode turned on.
comment:3 Changed 16 years ago by shoan
Replying to dluke@…:
Make sure to do something like:
port -f uninstall junit hamcrest port clean --all junit hamcrest
I get the same error.
comment:4 Changed 16 years ago by danielluke (Daniel J. Luke)
Port: | junit added; subversion-javahlbindings removed |
---|
comment:6 follow-up: 9 Changed 16 years ago by nox@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'll take this silence for a "yes, it works now".
comment:8 Changed 16 years ago by vulcan_@…
sorry, doing port upgrade junit gives me this today --- /opt/local root# port upgrade junit ---> 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/junit/framework/JUnit4TestAdapter.java" returned error 1 Command output: src/org/junit/internal/AssumptionViolatedException.java:3: cannot access org.hamcrest.Description bad class file: /opt/local/share/java/hamcrest-core.jar(org/hamcrest/Description.class) class file has wrong version 50.0, should be 49.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import org.hamcrest.Description;
1 error
Error: Unable to upgrade port: 1 ---
I am on Mac OS X 10.4.11 with port version: 1.710 this error comes up after -d sync and selfupdate so i have the latest dist packages
comment:9 Changed 16 years ago by vulcan_@…
Replying to nox@…:
I'll take this silence for a "yes, it works now".
hope this get signalled somehow .. it is not fixed yet
comment:10 Changed 16 years ago by nox@…
It is fixed. You need to upgrade hamcrest-core before. I don't know why port haven't upgraded it itself. Please check that port installed hamcrest-core
returns 1.1_2.
If hamcrest-core is not outdated, reinstall it and try again to rebuild junit.
comment:11 Changed 15 years ago by craig.cottingham@…
Either this is not fixed, or instructions given above are incomplete.
Mac OS X 10.4.11, Java 1.6.0-dp-b88-34.
craigc@tabitha:~$ sudo port clean --all junit hamcrest-core subversion-javahlbindings ---> Cleaning junit ---> Cleaning hamcrest-core ---> Cleaning subversion-javahlbindings craigc@tabitha:~$ sudo port install subversion-javahlbindings ---> Fetching hamcrest-core ---> Attempting to fetch hamcrest-1.1.tgz from http://hamcrest.googlecode.com/files/ ---> Verifying checksum(s) for hamcrest-core ---> Extracting hamcrest-core ---> Configuring hamcrest-core ---> Building hamcrest-core ---> Staging hamcrest-core into destroot ---> Installing hamcrest-core @1.1_2 ---> Activating hamcrest-core @1.1_2 ---> Cleaning hamcrest-core ---> Fetching junit ---> Attempting to fetch junit4.6.zip from http://voxel.dl.sourceforge.net/junit ---> Verifying checksum(s) for junit ---> Extracting junit ---> Configuring junit ---> 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/junit/framework/JUnit4TestAdapter.java" returned error 1 Command output: src/org/junit/internal/AssumptionViolatedException.java:3: cannot access org.hamcrest.Description bad class file: /opt/local/share/java/hamcrest-core.jar(org/hamcrest/Description.class) class file has wrong version 50.0, should be 49.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import org.hamcrest.Description; ^ 1 error Error: The following dependencies failed to build: junit Error: Status 1 encountered during processing.
Complete installation log