ClassCastException when calling mvn ant:ant
-------------------------------------------

                 Key: MANTLR-25
                 URL: http://jira.codehaus.org/browse/MANTLR-25
             Project: Maven 2.x Antlr Plugin
          Issue Type: Bug
         Environment: 
java-config -L
The following VMs are available for generation-2:
1)      Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
2)      Sun 32bit JRE 1.6.0.03 [emul-linux-x86-java-1.6]
*)      Sun JDK 1.5.0.13 [sun-jdk-1.5]
4)      Sun JDK 1.6.0.03 [sun-jdk-1.6]

* Active vm

emerge --info
Portage 2.1.4_rc11 (default-linux/amd64/2006.1/desktop, gcc-4.2.2, 
glibc-2.7-r1, 2.6.23-gentoo x86_64)
=================================================================
System uname: 2.6.23-gentoo x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 
6000+
Timestamp of tree: Unknown
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r4
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config 
/usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf 
/etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ 
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo 
/etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="cvs distlocks metadata-transfer nostrip parallel-fetch sfperms strict 
unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/linux/distributions/gentoo";
LANG="en_NZ"
LC_ALL="en_NZ.utf8"
LINGUAS="en en_GB en_NZ"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --delete-after --stats --timeout=180 
--exclude=/distfiles --exclude=/local --exclude=/packages 
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/home/alistair/gentoo/cvs/gentoo-x86"
PORTDIR_OVERLAY="/home/alistair/gentoo/overlays/java-overlay 
/home/alistair/gentoo/overlays/java-experimental"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 apache2 berkdb bitmap-fonts cairo cdr clearcase 
cli cracklib crypt ctype cups cvs dbus doc dri dvd dvdr dvdread eds emboss 
encode esd fam firefox fortran gd gdbm gif glitz gpm gtk2 hal iconv ipv6 
isdnlog java java5 javamail jpeg jpeg2k kde ldap lm_sensors mad midi mikmod mp3 
mpeg mplayer mudflap mysql mysqli ncurses nls nptl nptlonly nsplugin offensive 
ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime 
readline reflection ruby sdl session source spell spl sql sqlite ssl subversion 
svg tcpd theora threads tiff tomcat truetype truetype-fonts type1-fonts unicode 
utempter vorbis xcomposite xine xml xorg xulrunner xv xvid xvmc zlib" 
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x 
ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 
trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw 
asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa 
lfloat linear meter mulaw multi null plug rate route share shm softvol" 
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm 
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host 
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir 
disk_cache env expires ext_filter file_cache filter headers include info 
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling 
status unique_id userdir usertrack vhost_alias" ELIBC="glibc" 
INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz 
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB 
en_NZ" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, 
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

            Reporter: Alistair Bush
         Attachments: mvnDebug.txt

I received the following error when running mvn ant:ant on the openjpa project 
(http://openjpa.apache.org/).  Still reproducible after removing ~/.m2

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] java.util.HashMap
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
java.lang.ClassCastException: java.util.HashMap
        at 
org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenPluginBasicOption(AntBuildWriterUtil.java:902)
        at 
org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenJarPluginBasicOption(AntBuildWriterUtil.java:838)
        at 
org.apache.maven.plugin.ant.AntBuildWriterUtil.writeJarTask(AntBuildWriterUtil.java:572)
        at 
org.apache.maven.plugin.ant.AntBuildWriter.writePackageTarget(AntBuildWriter.java:909)
        at 
org.apache.maven.plugin.ant.AntBuildWriter.writeGeneratedBuildXml(AntBuildWriter.java:304)
        at 
org.apache.maven.plugin.ant.AntBuildWriter.writeBuildXmls(AntBuildWriter.java:112)
        at org.apache.maven.plugin.ant.AntMojo.execute(AntMojo.java:112)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493
)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.j
ava:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Steps to reproduce:
1) Download src from 
http://www.apache.org/dyn/closer.cgi/openjpa/1.0.1/apache-openjpa-1.0.1-source.zip
 and uppack
2) run mvn ant:ant

Attached is the output of mvn -X -e ant:ant


-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to