Я разработал несколько служебных классов, включая
FileHelper.java
Helper.java
и соответствующие тестовые классы
FileHelperTest.java
HelperTest.java
Я могу скомпилировать, установить и развернуть проект без каких-либо проблем.
![enter image description here](https://i.stack.imgur.com/MNHGx.png)
So far so good. The problem appears when I include this jar file in another project's pom file to use my utility classes
![enter image description here](https://i.stack.imgur.com/Db7Yv.png)
and the test class also appears in intelliscence, which of course is not a very good approach.
I have tried pretty much all available solutions to exclude the test classes to jar file but all solutions are helping to skip the unit test execution during the build process not blocking test classes to be a part of jar file.
I tried different plugins:
org.apache.maven.plugins
maven-surefire-plugin
2.12.4
**/FileHelperTest.java*
**/HelperTest.java*
org.apache.maven.plugins
maven-jar-plugin
2.4
**/FileHelperTest*
**/HelperTest*
and a couple of more but .m2 files always contains.
введите описание изображения здесь
Надеюсь, я подробно объяснил свою проблему и sh вы уже сталкивались с этой проблемой и успешно ее решили, заранее спасибо.