RESOLVED: Base path when use maven 3

Hello.
---
My env:
OS: Gentoo x84-64;
JVM: oracle jdk 1.7.0_01;
IDEA: 10.5.2;
---
I have a big maven 3 project
I have SUPER-POM, >20 subsystem pom-s, and > 50 modules pom-s.
When I start test from maven, all work properly.
But from IDEA base path work incorrect.
For example, my structure:

SUPER-POM
  - subsystem-1
         - module-1.1
         - module-1.2
         ...
         - module-1.N

  - subsystem-2
          - module-2.1
         - module-2.2
         ...
         - module-2.N
  ...
  - subsystem-N
  ...
--------
If I start test with help Maven3 from module-1.1 and TestNG try load itself files from:
     PROJECT_ROOT/subsystem-1/module1.1/src/test/resources/test-part1.xml

But If I start the same tests from IDEA, then it find test-part1.xml in:
PROJECT_ROOT/src/test/resources/test-part1.xml

Question: Why IDEA doesn't find xml-file in correct location ?

4 comments

It sounds like the IDEA project is misconfigured?

How did you create your IDEA project? Did you

  1. manually configure it
  2. use the "import project from external model" option on the "New Project" dialog and then selected 'maven'
  3. opened the top level maven pom in IDEA and let IDEA create the project


It sounds like you most likely did #1. If you used options 2 & 3, IDEA would configure it's own project settings to match the maven configuration. In the "Maven Project" tool window, (on the right), do you see all your POM files? If not, click the "Add Projects" icon (the '+' icon). Navigate to and select your top level POM. IDEA should then import the POM and sync its settings to match the configuration of your maven POMs. You can also click the "Force Reimport All Maven Projects" icon (the far left icon that looks like a typical refresh icon). That will tell IDEA to reimport the maven project and sync its internal project settings to the maven configuration.

0

Try to select "MODULE_DIR" as the current directory to use in the test run configuration.

0

Please sign in to leave a comment.