You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pavel Štěpánek <pa...@gmail.com> on 2007/03/03 15:44:51 UTC

Problems with Maven example

Hi, I´m trying Maven and followed the simple guide which is included
in the book Bettter build with Maven and also in the 5 minute
guide. Everything goes fine (donwloading, compiling), but when I try
to package the sample app (mvn package),
or test it, I always get this exception:


[INFO] Surefire report directory: C:\maven_projekt\application\target\surefire-r
eports
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantia
te and execute Surefire; nested exception is java.lang.ClassNotFoundException: o
rg.apache.maven.surefire.Surefire
java.lang.ClassNotFoundException: org.apache.maven.surefire.Surefire
       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:306)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(Isolat
edClassLoader.java:103)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:281)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:818)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Sat Mar 03 13:45:37 CET 2007
[INFO] Final Memory: 5M/11M
[INFO] ------------------------------------------------------------------------


Surfire is presented in my local repository, but Maven does not see it?
Please help :)

-- 
Pavel Štěpánek
pavel.stepanek@gmail.com

Re: Problems with Maven example

Posted by Pavel Štěpánek <pa...@gmail.com>.
Well maybe it is because of the name of my home dir. I´m testing maven
on my personal notebok where my account name is my full name. I don´t
think it is extremely weird case :)
The problem could be that my name (in czech language) contains some
national chars. So it is not composed only form standard ASCII chars.
But Windows can deal with it and I haven´t such a problem before.In
the same home directory I have also files specific to GIMP or Netbeans
IDE and I have no known problems with these apps.

I have written my solution already in my previous post:

When I created new account without any czech characters and spaces
everything works fine. I believe that the national chars are
problematic rather, than the space chars. I know that on serious
project I would not have these problems, because there would be
standard english directory names :)






On 3/4/07, Wendy Smoak <ws...@gmail.com> wrote:
> On 3/4/07, Pavel Štěpánek <pa...@gmail.com> wrote:
>
> > I think that Maven should be resistant to these issues (using
> > quotes?), because the name is valid in windows, so when maven is using
> > it, it should take in account all the valid possibilities and dir
> > names.
>
> Maven can deal with the spaces in "C:\Documents and Settings" well
> enough, so it should be possible.  I can't say I've ever heard of
> someone using spaces in the username, though.
>
> I'm not sure if it's a core Maven issue or a problem with Surefire.
> I'd probably start by opening an issue in Surefire, since that is
> where it manifests.
>
> http://jira.codehaus.org/browse/SUREFIRE
>
> Thanks for taking the time to let us know how you solved it!
>
> --
> Wendy
>


-- 
Pavel Štěpánek
pavel.stepanek@gmail.com

Re: Problems with Maven example

Posted by Wendy Smoak <ws...@gmail.com>.
On 3/4/07, Pavel Štěpánek <pa...@gmail.com> wrote:

> I think that Maven should be resistant to these issues (using
> quotes?), because the name is valid in windows, so when maven is using
> it, it should take in account all the valid possibilities and dir
> names.

Maven can deal with the spaces in "C:\Documents and Settings" well
enough, so it should be possible.  I can't say I've ever heard of
someone using spaces in the username, though.

I'm not sure if it's a core Maven issue or a problem with Surefire.
I'd probably start by opening an issue in Surefire, since that is
where it manifests.

http://jira.codehaus.org/browse/SUREFIRE

Thanks for taking the time to let us know how you solved it!

-- 
Wendy

Re: Problems with Maven example

Posted by Pavel Štěpánek <pa...@gmail.com>.
I´m sorry, I post it twice because I thought that my first mail was
not successful (i was not fully subscribed yet).
Anyway just a few minutes ago I found the solution to my problem.
The problem was, that my windows user name and also the name of my
home directory is containing a space char: "name surname". The space
causes problems to maven. Now I tried it under my new user account
"name" and everything works fine.

I think that Maven should be resistant to these issues (using
quotes?), because the name is valid in windows, so when maven is using
it, it should take in account all the valid possibilities and dir
names.

Pavel Stepanek

On 3/4/07, Wendy Smoak <ws...@gmail.com> wrote:
> On 3/3/07, Pavel Štěpánek <pa...@gmail.com> wrote:
> > Hi, I´m trying Maven and followed the simple guide which is included
> > in the book Bettter build with Maven and also in the 5 minute
> > guide. Everything goes fine (donwloading, compiling), but when I try
> > to package the sample app (mvn package),
> > or test it, I always get this exception:
>
> Don't re-post the same question under a different subject line.  If
> you haven't received a reply in a few days, then it's appropriate to
> reply to your own post to bump it up in our inboxes.
>
> Besides the fact that it's a weekend, you haven't given us enough
> information to easily help you.  What version of Maven?  What commands
> did you execute before you got the error?
>
> I spent quite a bit of time yesterday with Maven 2.0.5 and the
> quickstart archetype, and didn't have any problems with Surefire.
>
> Without knowing the details, I would suggest (re) installing Maven
> 2.0.5 which is the latest release, and deleting everything surefire
> related [1] from your local repository (usually ~/.m2/repository/ ) to
> force Maven to download it again.
>
> [1] org/apache/maven/surefire
>      org/apache/maven/plugins/maven-surefire-plugin
>      org/apache/maven/plugins/maven-surefire-report-plugin
>
> --
> Wendy
>


-- 
Pavel Štěpánek
pavel.stepanek@gmail.com

Re: Problems with Maven example

Posted by Wendy Smoak <ws...@gmail.com>.
On 3/3/07, Pavel Štěpánek <pa...@gmail.com> wrote:
> Hi, I´m trying Maven and followed the simple guide which is included
> in the book Bettter build with Maven and also in the 5 minute
> guide. Everything goes fine (donwloading, compiling), but when I try
> to package the sample app (mvn package),
> or test it, I always get this exception:

Don't re-post the same question under a different subject line.  If
you haven't received a reply in a few days, then it's appropriate to
reply to your own post to bump it up in our inboxes.

Besides the fact that it's a weekend, you haven't given us enough
information to easily help you.  What version of Maven?  What commands
did you execute before you got the error?

I spent quite a bit of time yesterday with Maven 2.0.5 and the
quickstart archetype, and didn't have any problems with Surefire.

Without knowing the details, I would suggest (re) installing Maven
2.0.5 which is the latest release, and deleting everything surefire
related [1] from your local repository (usually ~/.m2/repository/ ) to
force Maven to download it again.

[1] org/apache/maven/surefire
     org/apache/maven/plugins/maven-surefire-plugin
     org/apache/maven/plugins/maven-surefire-report-plugin

-- 
Wendy