Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: _Plugin Submission
-
Labels:None
-
Environment:Windows XP
-
Complexity:Intermediate
-
Number of attachments :
Description
The submitted items contain the maven 1.x and Maven 2.x plugins for checking duplicate jars as well as duplicate classes in jars from a specified repository. If there are duplicates, the build process will be forcibly failed.
The attached zip will contain the plugin code for the two different versions of Maven in different directories.
Following points highlight the importance of the plugin ( which is done for both Maven 1.x and Maven 2.x)
Java Utility will perform the following tasks:
•It will take directory path as the input. Even there is a provision for taking more than one directory path as input so that it can report duplicates considering all the directories.
•It will recursively check for the jars in the given directory path.
•A list of duplicate jars occurrence is maintained.
•The utility will populate this list with names of duplicate jars if found. It checks for duplicate jars irrespective of the jar versions
•If a particular jar does not have any duplicate entries irrespective of the jar version, it will next check if there are duplicate classes within itself or with any other jar.
•Class Name duplicate is checked based on the following cases.
i.Check for the duplicate classes considering the full package structure. If any duplicate classes are found then error message will be appended to a list which will be displayed at last
ii.Check for the duplicate classes without considering the package structure i.e. only class name will be considered. In such case if duplicate class is found then warning message will be added to a list which will be displayed at last.
•Finally after searching for all the Duplicate Jars and Duplicate Classes all the Error Messages and Warning messages will be displayed. And exception will be thrown only if there are any error messages. Exception is not thrown for warning messages.