We would need to see your POM to see what's going on.
On 26 May 07, at 5:42 PM 26 May 07, Joe-D Morrison wrote:
I’m running into a strange Maven problem. I’m listing junit as a
dependency in the usual way, i.e.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
When I build the project cleanly:
mvn clean install
I get a bunch of error messages related to junit not being found, e.g.
[INFO] Compilation failure
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\service\common\aaa\PermissionBundleTest.java:[5,17]
package org.junit does not exist
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\service\common\aaa\PermissionBundleTest.java:[6,17]
package org.junit does not exist
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\cops\service\principal\SessionEndTest.java:[5,17]
package org.junit does not exist
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\cops\service\principal\SessionEndTest.java:[6,17]
package org.junit does not exist
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\service\common\aaa\EntityFactoryTest.java:[5,17]
package org.junit does not exist
C:\perforce\COPS\cops-service\branches\morrjoed\src\test\java\com\db
\cops\service\validation\ValidationServiceTest.java:[9,17]
package org.junit does not exist
… and so on…
But when I build the second time:
mvn install
it works properly. Can anyone suggest an explanation for this? I can
always run “mvn install” twice, so this isn’t a critical issue. But
I’d
really like to understand what’s going on. I’m not changing pom.xml
between runs, so there must be some state in the target directory
that’s
causing it to find org.junit when it couldn’t be found earlier.
Thanks for any help,
- Joe
--
Joe Morrison
Deutsche Bank, 60 Wall Street, 8th floor
office: +1 (212) 250-8486 mobile: +1 (917) 952-2935
---
This e-mail may contain confidential and/or privileged information.
If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in
this
e-mail is strictly forbidden.
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]