Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test classpath with Maven #53

Closed
aeris opened this issue Aug 5, 2011 · 2 comments

Comments

@aeris
Copy link

commented Aug 5, 2011

Infinitest use wrong classpath (incomplete or wrong order) on a maven project with test resources.

When tests are run by Infinitest, classpath not use target/test-classes before target/classes, so only production resources are used (datasource, conf…) instead of test ones.

I made a little test to see the real classpath of Infinitest :

  1. /tmp/infinitest.jar
  2. ${project_loc)/target/classes/
  3. ${project_loc)/target/classes/
  4. ${project_loc)/target/test-classes/
  5. ${project_loc)/target/test-classes/
  6. All maven jar dependencies

Classpath entries 4 and 5 must be switched with 2 and 3.

@aeris

This comment has been minimized.

Copy link
Author

commented Aug 5, 2011

Seems this is an Eclipse bug and not an Infinitest one.
m2e define the classpath in the wrong order.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=333217

@dgageot dgageot closed this Jan 5, 2012

@ridoo

This comment has been minimized.

Copy link

commented May 24, 2019

One thing people who are facing the same issue can try out:

In eclipse you can re-order the classpath entries. Go to Project Properties (alt-enter) > Java Build Path > Order and Export and pull the test entry up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.