Message:
The following issue has been closed.
Resolver: Brett Porter
Date: Fri, 9 Apr 2004 10:37 PM
I fixed the JDK 1.5 issue by adding -source and defaulting it to 1.3. If you want to
compile for 1.4 or 1.5, you must set maven.compile.source and maven.compile.target
yourself.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPJAVA-16
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPJAVA-16
Summary: Incorrect defaults cause problems with javac changes
Type: Bug
Status: Closed
Priority: Major
Resolution: FIXED
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven-java-plugin
Assignee: Brett Porter
Reporter: Berin Loritsch
Created: Wed, 3 Mar 2004 10:39 AM
Updated: Fri, 9 Apr 2004 10:37 PM
Environment: JDK 1.5
Description:
The problem is that the defaults on the "javac" compiler are different, and the fact
that we set the "-target" option without specifying the "-source" option means that
all compilation will fail with the following message:
javac: source release 1.4 requires target release 1.4
The default "-source" option is "1.4" for JDK 1.5, which means you need a
"-target" of "1.4". Actually, unless you intend to have Java 1.1 compatible binaries,
the "-target" option should never be set.
For each "-source" option, the compiler will default to the lowest option available
for it. For example:
* "-source 1.5" will default to "-target 1.5"
* "-source 1.4" will default to "-target 1.4"
* "-source 1.3" will default to "-target 1.2"
The only reason to ever specify "-target" at all is to get a "1.1" compatible class
file.
Please remove the "-target", or have it always default to "-source".
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]