001 /* 002 * Copyright (C) 2006-2007 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 package org.codehaus.gmaven.common; 018 019 /** 020 * Represents a Maven-artifact. 021 * 022 * @version $Id: ArtifactItem.java 58 2009-11-26 10:15:40Z user57 $ 023 * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> 024 */ 025 public class ArtifactItem 026 { 027 /** 028 * Group Id of artifact. 029 * 030 * @parameter 031 * @required 032 */ 033 private String groupId; 034 035 /** 036 * Name of artifact. 037 * 038 * @parameter 039 * @required 040 */ 041 private String artifactId; 042 043 /** 044 * Version of artifact. 045 * 046 * @parameter 047 */ 048 private String version = null; 049 050 /** 051 * Type of artifact. 052 * 053 * @parameter 054 * @required 055 */ 056 private String type = "jar"; 057 058 /** 059 * Classifier for artifact. 060 * 061 * @parameter 062 */ 063 private String classifier; 064 065 public String toString() { 066 return groupId + ":" + artifactId + ":" + classifier + ":" + version + ":" + type; 067 } 068 069 /** 070 * @return Returns the artifactId. 071 */ 072 public String getArtifactId() { 073 return artifactId; 074 } 075 076 /** 077 * @param artifactId The artifactId to set. 078 */ 079 public void setArtifactId(final String artifactId) { 080 this.artifactId = artifactId; 081 } 082 083 /** 084 * @return Returns the groupId. 085 */ 086 public String getGroupId() { 087 return groupId; 088 } 089 090 /** 091 * @param groupId The groupId to set. 092 */ 093 public void setGroupId(final String groupId) { 094 this.groupId = groupId; 095 } 096 097 /** 098 * @return Returns the type. 099 */ 100 public String getType() { 101 return type; 102 } 103 104 /** 105 * @param type The type to set. 106 */ 107 public void setType(final String type) { 108 this.type = type; 109 } 110 111 /** 112 * @return Returns the version. 113 */ 114 public String getVersion() { 115 return version; 116 } 117 118 /** 119 * @param version The version to set. 120 */ 121 public void setVersion(final String version) { 122 this.version = version; 123 } 124 125 /** 126 * @return Classifier. 127 */ 128 public String getClassifier() { 129 return classifier; 130 } 131 132 /** 133 * @param classifier Classifier. 134 */ 135 public void setClassifier(final String classifier) { 136 this.classifier = classifier; 137 } 138 }