error of org.apache.maven.cli.MavenCli

560 views
Skip to first unread message

Fabrício Riberio

unread,
Apr 17, 2018, 6:19:14 PM4/17/18
to robocode-developers
Hello,

I'm having trouble setting up Robocode on my PC.
When I try to follow the procedure quoted in here the error below is presented:

D:\Arquivos\robocode-workspace\robocode-master>mvnassembly
java
.lang.ClassNotFoundException: org.apache.maven.cli.MavenCli
        at java
.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java
.security.AccessController.doPrivileged(Native Method)
        at java
.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java
.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at org
.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader
.java:195)
        at org
.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m
.java:255)
        at org
.codehaus.classworlds.Launcher.getMainClass(Launcher.java:169)
        at org
.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:292)
        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)


I use Windows, Java 6 and Maven 3.2.5. If anyone can help me, I appreciate it.

Flemming Larsen

unread,
Apr 18, 2018, 3:09:13 PM4/18/18
to robocode-developers
Hi Fabricio,

You could try using the JDK 8 instead of version 6. Robocode can be built with a at least Java 8 - even though it is compiled for Java 6. :-)

The issue might also be caused if you have Maven installed already - perhaps and old Maven version?
Robocode has Maven "built-in" under the /tools/bin folder (mvn), and mvnassembly will make sure that it is being used. the loadTools command under /tools is responsible for that.

You could run loadTools.cmd first, to make sure it is running correctly, before calling mvnassembly again.

Cheers,
- Flemming

Fabrício Riberio

unread,
Apr 19, 2018, 2:17:40 PM4/19/18
to robocode-developers
Hello Flemming,

I followed his council. I installed JDK 8 and then run the file loadTools.cmd.

This solved my problem. Thank you!

Flemming Larsen

unread,
Apr 20, 2018, 12:48:58 AM4/20/18
to robocode-developers
I am happy to hear that it works for you now. :-)
Reply all
Reply to author
Forward
0 new messages