code: 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);
  	}
docs: Add dependency to the list of Maven Dependencies.
  
  @param dependencies The list of dependencies to append to.
  @param requiredArtifact The required artifact to add as a dependency.
  @param type The type of artifact, or null if jar.