Search Interview Questions | Click here and help us by providing the answer. Click Correct / Improve and please let us know. |
|
|||
|
| ||||
| Maven - Interview Questions and Answers for 'Ban duplicate classes enforcer plugin' - 2 question(s) found - Order By Newest | ||||
| ||||
| Ans. Yes , we have been using this plugin with our projects and its purpose is to warn and stop the Build if there are duplicates of the same package and class are being carried either directly or through transitive dependencies. the duplicate could be coming through different types of dependencies or through different versions of the same dependency. Its purpose is to make sure that there is only one copy thats being used at compile time and runtime and hence shouldnt later result in runtime problems. | ||||
a. Maven b. Ant c. Gradle d. svn | ||||
| ||||
| Ans. The simplest way is to ignore them if Maven enforcer plugin is complaining about it but it may lead to runtime problems later. We can do the dependency:tree to see from where these duplicate ones are coming and hence can exclude the duplicate one. | ||||
a. Maven b. Ant c. Gradle d. svn | ||||