You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Neil Chaudhuri <nc...@potomacfusion.com> on 2009/08/16 19:21:21 UTC

Failure When Compiling Tests

My application is laid out precisely according to the Maven layout conventions.  I can compile my source just fine and package it and everything!  However, when I run my tests from the command line with mvn test, I get a "cannot find symbol" error referencing one of my source files--indeed, the class I actually want to test.  I am sure this is something silly, but is there anything special I have to do for Maven to look at target/classes in the classpath?

Incidentally, when I run the test goal from within IntelliJ (rather than the command line as above), I don't get that "cannot find symbol" error but simply find this:

[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Not compiling test sources
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------

I imagine this result is for the same reason as the other, but are there any IntelliJ users out there who can also shed light on why the reporting would be different?

Thanks.

RE: Failure When Compiling Tests

Posted by Neil Chaudhuri <nc...@potomacfusion.com>.
That is actually all it took.  Things ran fine.  I knew it had to be something trivial, so thanks for that.

Now my goal is to figure out how to get IntelliJ to always run clean before it runs test.

Thanks again.


-----Original Message-----
From: mknutson@baselogic.com on behalf of Mick Knutson
Sent: Sun 8/16/2009 12:42 PM
To: Maven Users List
Subject: Re: Failure When Compiling Tests
 
Can you run "mvn clean test -e" and post the trace please?

---
Thank You.

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Sun, Aug 16, 2009 at 10:21 AM, Neil Chaudhuri <
nchaudhuri@potomacfusion.com> wrote:

> My application is laid out precisely according to the Maven layout
> conventions.  I can compile my source just fine and package it and
> everything!  However, when I run my tests from the command line with mvn
> test, I get a "cannot find symbol" error referencing one of my source
> files--indeed, the class I actually want to test.  I am sure this is
> something silly, but is there anything special I have to do for Maven to
> look at target/classes in the classpath?
>
> Incidentally, when I run the test goal from within IntelliJ (rather than
> the command line as above), I don't get that "cannot find symbol" error but
> simply find this:
>
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Not compiling test sources
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Tests are skipped.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
>
> I imagine this result is for the same reason as the other, but are there
> any IntelliJ users out there who can also shed light on why the reporting
> would be different?
>
> Thanks.
>




Re: Failure When Compiling Tests

Posted by Mick Knutson <mi...@gmail.com>.
Can you run "mvn clean test -e" and post the trace please?

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Sun, Aug 16, 2009 at 10:21 AM, Neil Chaudhuri <
nchaudhuri@potomacfusion.com> wrote:

> My application is laid out precisely according to the Maven layout
> conventions.  I can compile my source just fine and package it and
> everything!  However, when I run my tests from the command line with mvn
> test, I get a "cannot find symbol" error referencing one of my source
> files--indeed, the class I actually want to test.  I am sure this is
> something silly, but is there anything special I have to do for Maven to
> look at target/classes in the classpath?
>
> Incidentally, when I run the test goal from within IntelliJ (rather than
> the command line as above), I don't get that "cannot find symbol" error but
> simply find this:
>
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Not compiling test sources
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Tests are skipped.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
>
> I imagine this result is for the same reason as the other, but are there
> any IntelliJ users out there who can also shed light on why the reporting
> would be different?
>
> Thanks.
>