Put the code in public void addArtifactItem(Element artifactItems, String groupId, String artifactId, String version);