public static Artifact createArtifact ( final String groupId , final String artifactId , final String version , final String classifier , final String type , final String extension , final String origin ) { final Artifact artifact = new Artifact ( ) ; artifact . setGroupId ( groupId ) ; artifact . setArtifactId ( artifactId ) ; artifact . setVersion ( version ) ; if ( classifier != null ) { artifact . setClassifier ( classifier ) ; } if ( type != null ) { artifact . setType ( type ) ; } if ( extension != null ) { artifact . setExtension ( extension ) ; } artifact . setOrigin ( origin == null ? "maven" : origin ) ; return artifact ; }
Generates an artifact regarding the parameters .