Why compile Java ports and commons-logging

Blair Zajac blair at orcaware.com
Tue Feb 5 09:26:36 PST 2008


Hi James,

I've noticed that many of the Java ports you've worked on compile the Jar files 
newly.

Is there any reason to do this?  I like the fact that using the supplied jar 
files from a distribution are guaranteed to work.

The reason I am asking is because with the upgrade to junit 4.4, commons-logging 
doesn't compile.

compile.tests:
     [javac] Compiling 30 source files to 
/opt/local-development/var/macports/build/_opt_local-development_var_macports_sources_rsync.macports.org_release_ports_java_commons-logging/work/commons-logging-1.1-src/target/tests
     [javac] 
/opt/local-development/var/macports/build/_opt_local-development_var_macports_sources_rsync.macports.org_release_ports_java_commons-logging/work/commons-logging-1.1-src/src/test/org/apache/commons/logging/AbstractLogTest.java:20: 
package junit.framework does not exist
     [javac] import junit.framework.TestCase;

Additionally, with the upgrade to Spring 2.5.x, one needs JDK 6 to compile it, 
so for that port, I had to disable compilation and just use the supplied jar's, 
which I'm happy to do.

The only reason I see to compile a Java port is if you are patching the source code.

Regards,
Blair



More information about the macports-dev mailing list