Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#3165 closed defect (fixed)

Port commons-pool won't compile under JDK 1.5

Reported by: ldegruchy@… Owned by: jberry@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: ak.lynch@…
Port:

Description

I've set my default JDK to 1.5 and tried to install the tomcat5 package. I ran into a snag at the commons-pool port:

Command output: [javac] /opt/local/var/db/dports/build/file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_java_commons-pool/work/commons-pool-1.2/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java:238: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier

[javac] (try -source 1.4 or lower to use 'enum' as an identifier) [javac] Enumeration enum = stack.elements();

Switching to 1.4 will solve the problem.

I'm not sure when Apple will make JDK 1.5 the default, but it might be a good idea to ensure these ports work with that JDK.

Change History (4)

comment:1 Changed 19 years ago by jmpp@…

Owner: changed from darwinports-bugs@… to jberry@…

comment:2 Changed 19 years ago by ak.lynch@…

I ran into the same problem. I'm not familiar with the ports system, but editing /work/commons-pool-1.2/build.xml to add source="1.4" to the javac task did the trick.

comment:3 Changed 19 years ago by ak.lynch@…

Cc: ak.lynch@… added

comment:4 Changed 19 years ago by jberry@…

Resolution: fixed
Status: newclosed

Added source="1.4" to javac tasks. This now compiles with java 1.5 set as the default. Thanks ak.lynch.

Note: See TracTickets for help on using tickets.