You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by youhaodeyi <yo...@gmail.com> on 2008/03/01 03:21:55 UTC
Counldn't find junit package
I have added the junit dependence in pom.xml file as follows:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
When I run "mvn test" to run my junit test, I always get the error "package
org.junit does not exist".
--
View this message in context: http://www.nabble.com/Counldn%27t-find-junit-package-tp15769349s177p15769349.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Counldn't find junit package
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Feb 29, 2008 at 7:21 PM, youhaodeyi <yo...@gmail.com> wrote:
> When I run "mvn test" to run my junit test, I always get the error "package
> org.junit does not exist".
That's odd. Once again I'd say go back to the quickstart archetype
(which has a JUnit dependency and a simple unit test) and see if you
can reproduce it.
This works for me:
$ mvn archetype:create -DgroupId=com.example -DartifactId=myproject
$ cd myproject
$ mvn test
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Counldn't find junit package
Posted by youhaodeyi <yo...@gmail.com>.
I have added the junit dependency and the junit.jar has been downloaded to my
local repository. I don't think I need to add local repository on classpath.
Maven can handle with it.
mgainty wrote:
>
> make sure junit.jar is on the classpath before you run mvn pom.xml..
>
> M-
> ----- Original Message -----
> Wrom: WLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBI
> To: <us...@maven.apache.org>
> Sent: Friday, February 29, 2008 9:21 PM
> Subject: Counldn't find junit package
>
>
>>
>> I have added the junit dependence in pom.xml file as follows:
>>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>3.8.1</version>
>> <scope>test</scope>
>> </dependency>
>>
>> When I run "mvn test" to run my junit test, I always get the error
> "package
>> org.junit does not exist".
>> --
>> View this message in context:
> http://www.nabble.com/Counldn%27t-find-junit-package-tp15769349s177p15769349
> html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Counldn%27t-find-junit-package-tp15769349s177p15773096.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Counldn't find junit package
Posted by mg...@hotmail.com.
make sure junit.jar is on the classpath before you run mvn pom.xml..
M-
----- Original Message -----
Wrom: WLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBI
To: <us...@maven.apache.org>
Sent: Friday, February 29, 2008 9:21 PM
Subject: Counldn't find junit package
>
> I have added the junit dependence in pom.xml file as follows:
>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <scope>test</scope>
> </dependency>
>
> When I run "mvn test" to run my junit test, I always get the error
"package
> org.junit does not exist".
> --
> View this message in context:
http://www.nabble.com/Counldn%27t-find-junit-package-tp15769349s177p15769349
html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org