/** * Method addPlugin * * @param artifactReference */ public void addPlugin(ArtifactReference artifactReference) { if ( !(artifactReference instanceof ArtifactReference) ) { throw new ClassCastException( "ArchivaProjectModel.addPlugins(artifactReference) parameter must be instanceof " + ArtifactReference.class.getName() ); } getPlugins().add( artifactReference ); } //-- void addPlugin(ArtifactReference)
/** * Method removePlugin * * @param artifactReference */ public void removePlugin(ArtifactReference artifactReference) { if ( !(artifactReference instanceof ArtifactReference) ) { throw new ClassCastException( "ArchivaProjectModel.removePlugins(artifactReference) parameter must be instanceof " + ArtifactReference.class.getName() ); } getPlugins().remove( artifactReference ); } //-- void removePlugin(ArtifactReference)
public static ArchivaProjectModel clone( ArchivaProjectModel model ) { if ( model == null ) { return null; } ArchivaProjectModel cloned = new ArchivaProjectModel(); cloned.setGroupId( model.getGroupId() ); cloned.setArtifactId( model.getArtifactId() ); cloned.setVersion( model.getVersion() ); cloned.setParentProject( clone( model.getParentProject() ) ); cloned.setName( model.getName() ); cloned.setDescription( model.getDescription() ); cloned.setUrl( model.getUrl() ); cloned.setPackaging( model.getPackaging() ); cloned.setOrigin( model.getOrigin() ); cloned.setMailingLists( cloneMailingLists( model.getMailingLists() ) ); cloned.setCiManagement( clone( model.getCiManagement() ) ); cloned.setIndividuals( cloneIndividuals( model.getIndividuals() ) ); cloned.setIssueManagement( clone( model.getIssueManagement() ) ); cloned.setLicenses( cloneLicenses( model.getLicenses() ) ); cloned.setOrganization( clone( model.getOrganization() ) ); cloned.setScm( clone( model.getScm() ) ); cloned.setRepositories( cloneRepositories( model.getRepositories() ) ); cloned.setDependencies( cloneDependencies( model.getDependencies() ) ); cloned.setPlugins( clonePlugins( model.getPlugins() ) ); cloned.setReports( cloneReports( model.getReports() ) ); cloned.setDependencyManagement( cloneDependencies( model.getDependencyManagement() ) ); return cloned; }