Java – separate Classpaths for test code and main code
•
Java
I have two source code trees in my eclipse Java application One is "SRC" and the other is "test" Each contains Directory tree of java files So far, it's very good
However, I hope the class in "test" can see the class in "SRC", but for the class in "SRC", I can't see the class in "test" Again, I want to include some test libraries I don't want any of these libraries to be available in the main tree so that I don't use it without thinking
Is there an easy way to set it up in eclipse?
Solution
This problem cannot be solved in eclipse without dividing the two source trees into separate projects (one of which depends on the other) Maven can handle it at build time
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码