I am facing a conflict with class and package names that have same name under different source. In a nutshell, the directory structure looks somewhat like this:
src/test/java
com.service.helper
Constants.java
src/intTest/java
com.service.helper
Constants.java
com.service.utility
SomethingTest.java
The few constant strings defined in both Constants.java are same and few are exclusive to these classes. Now I have a SomethingTest.java file under src/intTest/java which should utilize Constants.java defined under src/intTest/java.
However, it seems it is using Constants.java file which is defined under src/test/java package. Thus, I am not able to use constant string defined in Constants.java under src/intTest/java file.
Could anyone please give any clarity why is it so? Can I really access Constants.java defined under src/intTest/java, without changing package structure of current file names?
Appreciate the help. Thanks.