Are your test classes on a path marked as Java Build Path -> Sources ->
Contains test sources: Yes ? (And can you confirm that JUnit / Mockito are
defined in scope=test in your pom.xml ?



On Sat, May 25, 2019 at 8:27 AM KARR, DAVID <[email protected]> wrote:

> I'm using Eclipse 2019-03 with Java 8 on Win7, with m2e installed.
>
> I have a bunch of projects all built with Maven, that present SpringBoot
> REST services in different subdomains. All of them build fine from the
> command line, and all but one have no compile issues in Eclipse.
>
> I just inherited responsibility for a new project which has already been
> running, but which was maintained by a separate team. All the projects were
> constructed from a template, so many things are the same as I expect. It
> builds fine from the command line with Maven, including all the unit tests.
>
> When I import the project from my local git repo, it consistently reports
> that it can't find the "Junit" or "Mockito" artifacts, which causes compile
> errors in all of the unit tests. Those artifacts clearly show up in the
> effective POM, and in the "Maven Dependencies" tree in the Package
> Explorer. There are no red marks in the pom.xml.
>
> I've tried "Update Project". I've tried deleting the project and
> reimporting.
>
> I've looked at the entire set of compile errors, and there's nothing else
> unusual, besides not being able to find these artifacts.
>
> I've compared this project with a similar project that doesn't have this
> symptom, including the .classpath and .project files. There are very minor
> differences, but I haven't seen any differences that seem like they might
> be significant.
>
> I also tried deleting the imported project, then making sure that all
> eclipse dot files are removed from the repository, and reimporting.  Also
> no change.
> _______________________________________________
> m2e-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/m2e-users
>
_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-users

Reply via email to