jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x Java Plugin
  • MPJAVA-47

Maven 1.1 ignores maven.compile.target=1.5 with a 1.6 JDK

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.6.1
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Debian Stable x86
    Java 1.6.0_02-b05 and
    Java 1.5.0_10-b03

Description

I recently attempted upgrading from 1.0.2 to 1.1 and had been using JDK 1.6 on the project for several months. I have been using source compiled with Maven 1.0.2 and JDK 1.6 with the properties

maven.compile.source=1.5
maven.compile.target=1.5

in my project.properties and the deployment environment has been using the 1.5 JDK. There have been no issues with this previous configuration. I switched in Maven 1.1 and with a few minor fixes, was able to compile and deploy everything. But now when my appserver (JBoss 4.0.4) starts up, I get this exception:

ava.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
...

If I change back to a 1.5 JDK for compiling, the issue goes away. Running my build with "-X" shows

'-target'
'1.5'
'-g:lines,vars,source'
'-source'
'1.5'

but something appears to be getting through with Maven 1.1 that didn't get through with 1.0.2.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Matt Ray
Vote (0)
Watch (1)

Dates

  • Created:
    28/Sep/07 4:22 PM
    Updated:
    28/Sep/07 4:22 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.