I have a Maven Java project with two pacakages inside src/main/java
com.myproject.maincode com.myproject.resusablecode
Is there any way either through Java or with a Maven plugin/step to prevent the files inside the "com.myproject.resusablecode" package from importing files inside the package "com.myproject.maincode"?
The proper way would be to separate the reusable code into its own project (or module) and add it as a dependency to your main code. It sounds like they have no reason to be in the same project (judging by the name).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.