private static void addDependency ( List < Dependency > dependencies , MavenCoordinates requiredArtifact , Constants . ArtifactType type , String scope ) { Dependency dependency = new Dependency ( ) ; dependency . setGroupId ( requiredArtifact . getGroupId ( ) ) ; dependency . setArtifactId ( requiredArtifact . getArtifactId ( ) ) ; dependency . setVersion ( requiredArtifact . getVersion ( ) ) ; if ( scope != null ) { dependency . setScope ( scope ) ; } if ( type != null ) { dependency . setType ( type . getType ( ) ) ; } dependencies . add ( dependency ) ; }
Add dependency to the list of Maven Dependencies .