1 /* 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, 13 software distributed under the License is distributed on an 14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 KIND, either express or implied. See the License for the 16 specific language governing permissions and limitations 17 under the License. 18 =================== DO NOT EDIT THIS FILE ==================== 19 Generated by Modello 2.4.0, 20 any modifications will be overwritten. 21 ============================================================== 22 */ 23 24 package org.apache.maven.model; 25 26 /** 27 * Modifications to the build process which is activated based on 28 * environmental 29 * parameters or command line arguments. 30 * 31 * @version $Revision$ $Date$ 32 */ 33 @SuppressWarnings( "all" ) 34 public class Profile 35 extends ModelBase 36 implements java.io.Serializable, java.lang.Cloneable 37 { 38 39 //--------------------------/ 40 //- Class/Member Variables -/ 41 //--------------------------/ 42 43 /** 44 * The identifier of this build profile. This is used for 45 * command line 46 * activation, and identifies profiles to be 47 * merged. 48 * 49 */ 50 private String id = "default"; 51 52 /** 53 * The conditional logic which will automatically trigger the 54 * inclusion of this 55 * profile. 56 */ 57 private Activation activation; 58 59 /** 60 * Information required to build the project. 61 */ 62 private BuildBase build; 63 64 65 //-----------/ 66 //- Methods -/ 67 //-----------/ 68 69 /** 70 * Method clone. 71 * 72 * @return Profile 73 */ 74 public Profile clone() 75 { 76 try 77 { 78 Profile copy = (Profile) super.clone(); 79 80 if ( this.activation != null ) 81 { 82 copy.activation = (Activation) this.activation.clone(); 83 } 84 85 if ( this.build != null ) 86 { 87 copy.build = (BuildBase) this.build.clone(); 88 } 89 90 return copy; 91 } 92 catch ( java.lang.Exception ex ) 93 { 94 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 95 + " does not support clone()" ).initCause( ex ); 96 } 97 } //-- Profile clone() 98 99 /** 100 * Get the conditional logic which will automatically trigger 101 * the inclusion of this 102 * profile. 103 * 104 * @return Activation 105 */ 106 public Activation getActivation() 107 { 108 return this.activation; 109 } //-- Activation getActivation() 110 111 /** 112 * Get information required to build the project. 113 * 114 * @return BuildBase 115 */ 116 public BuildBase getBuild() 117 { 118 return this.build; 119 } //-- BuildBase getBuild() 120 121 /** 122 * Get the identifier of this build profile. This is used for 123 * command line 124 * activation, and identifies profiles to be 125 * merged. 126 * 127 * @return String 128 */ 129 public String getId() 130 { 131 return this.id; 132 } //-- String getId() 133 134 /** 135 * Set the conditional logic which will automatically trigger 136 * the inclusion of this 137 * profile. 138 * 139 * @param activation a activation object. 140 */ 141 public void setActivation( Activation activation ) 142 { 143 this.activation = activation; 144 } //-- void setActivation( Activation ) 145 146 /** 147 * Set information required to build the project. 148 * 149 * @param build a build object. 150 */ 151 public void setBuild( BuildBase build ) 152 { 153 this.build = build; 154 } //-- void setBuild( BuildBase ) 155 156 /** 157 * Set the identifier of this build profile. This is used for 158 * command line 159 * activation, and identifies profiles to be 160 * merged. 161 * 162 * @param id a id object. 163 */ 164 public void setId( String id ) 165 { 166 this.id = id; 167 } //-- void setId( String ) 168 169 170 171 public static final String SOURCE_POM = "pom"; 172 173 public static final String SOURCE_SETTINGS = "settings.xml"; 174 175 // We don't want this to be parseable...it's sort of 'hidden' 176 // default source for this profile is in the pom itself. 177 private String source = SOURCE_POM; 178 179 public void setSource( String source ) 180 { 181 this.source = source; 182 } 183 184 public String getSource() 185 { 186 return source; 187 } 188 189 /** 190 * @see java.lang.Object#toString() 191 */ 192 public String toString() 193 { 194 return "Profile {id: " + getId() + ", source: " + getSource() + "}"; 195 } 196 197 198 }