Package org.apache.maven.plugin.ear.util
Class ModuleIdentifierValidator
- java.lang.Object
-
- org.apache.maven.plugin.ear.util.ModuleIdentifierValidator
-
public class ModuleIdentifierValidator extends java.lang.Object
This class will check the list of modules if there exist a duplicate artifactId. If we have such case it's necessary to create a warning to the user otherwise it can happen to overwrite existing artifacts during the EAR creation process. This is a temporary solution to keep backward compatibility with previous versions. For the next major release 3.X the creation of the EAR archive should be done based on unique identifiers likegroupId:artifactId:version
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<EarModule>
earModules
private java.util.Map<java.lang.String,java.util.List<EarModule>>
result
-
Constructor Summary
Constructors Constructor Description ModuleIdentifierValidator(java.util.List<EarModule> earModules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
analyze()
ModuleIdentifierValidator
checkForDuplicateArtifacts()
Trigger the module list check.boolean
existDuplicateArtifacts()
You have to callcheckForDuplicateArtifacts()
before otherwise you will get alwaysfalse
.java.util.Map<java.lang.String,java.util.List<EarModule>>
getDuplicateArtifacts()
java.util.List<EarModule>
getEarModules()
ModuleIdentifierValidator
setEarModules(java.util.List<EarModule> paramEarModules)
-
-
-
Method Detail
-
existDuplicateArtifacts
public boolean existDuplicateArtifacts()
You have to callcheckForDuplicateArtifacts()
before otherwise you will get alwaysfalse
.- Returns:
- true in case of existing duplicates false otherwise.
-
checkForDuplicateArtifacts
public ModuleIdentifierValidator checkForDuplicateArtifacts()
Trigger the module list check.- Returns:
- this for fluent usage.
-
analyze
private void analyze()
-
getDuplicateArtifacts
public java.util.Map<java.lang.String,java.util.List<EarModule>> getDuplicateArtifacts()
- Returns:
- A map of duplicate artifacts.
-
setEarModules
public ModuleIdentifierValidator setEarModules(java.util.List<EarModule> paramEarModules)
- Parameters:
paramEarModules
-EarModule
- Returns:
ModuleIdentifierValidator
-
-