packages - Something strange with Project Paths in IntelliJ 14.1.4 -


so, has started act weird in intellij project. tried removing iml , .idea data, no avail.

i go project structure. there, have content root. withing, have 3 folders - 1 jar (and jni lib), 1 samples , 1 tools (just tools written use jar). jar, samples , tools marked blue (sources).

in jar folder, have source tree (com\company\projectname\xxx), lib folder, folder jni lib , folder created call 'junit', focus of question. marked in project structure in green (tests).

within, have folder structure eerily similar code: com\company\projectname\junit.

when open file in junit\com\company\xxx\junit, have big red underline under package com.company.xxx.junit; line tells me: "package name 'com.company.xxx.junit' not correspond file path 'junit.com.company.xxx.junit'.

i under impression marking folder 'tests' instruct ide use "parent" folder, if will, eliminating need prepend folder name.

how can separate code unit tests , in fact, create 2 junit test suites (one internal use, other 'skeleton' distribution), park them under 1 "umbrella" folder , not have prepend package names folder name?

update: project structure:

enter image description here

based on screen shot, issue junit directory subdirectory of source directory, namely myprovider. source directory (whether "production" source or unit test source directory) cannot subdirectory of source directory.

you need either:

  1. move junit directory out of myprovider sibling directory, or
  2. unmark myprovider source directory, create main (or such directory) in myprovider, mark source directory, , move com directory/package main.

option 2 preferred way deal follows common directory structure standard.

update (following comment op)

here's couple of screenshot showing configuration desire: enter image description here enter image description here


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -