001 package org.apache.maven.tools.plugin.annotations.datamodel;
002
003 /*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements. See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership. The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License. You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied. See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022 import org.apache.maven.plugins.annotations.Execute;
023 import org.apache.maven.plugins.annotations.LifecyclePhase;
024
025 import java.lang.annotation.Annotation;
026
027 /**
028 * @author Olivier Lamy
029 * @since 3.0
030 */
031 public class ExecuteAnnotationContent
032 implements Execute
033 {
034 private String goal;
035
036 private String lifecycle;
037
038 private LifecyclePhase phase;
039
040 public LifecyclePhase phase()
041 {
042 return this.phase;
043 }
044
045 public String goal()
046 {
047 return this.goal;
048 }
049
050 public String lifecycle()
051 {
052 return this.lifecycle;
053 }
054
055
056 public void phase( String phase )
057 {
058 this.phase = LifecyclePhase.valueOf( phase );
059 }
060
061 public void goal( String goal )
062 {
063 this.goal = goal;
064 }
065
066 public void lifecycle( String lifecycle )
067 {
068 this.lifecycle = lifecycle;
069 }
070
071
072 public Class<? extends Annotation> annotationType()
073 {
074 return null;
075 }
076
077 @Override
078 public String toString()
079 {
080 final StringBuilder sb = new StringBuilder();
081 sb.append( "ExecuteAnnotationContent" );
082 sb.append( "{goal='" ).append( goal ).append( '\'' );
083 sb.append( ", lifecycle='" ).append( lifecycle ).append( '\'' );
084 sb.append( ", phase=" ).append( phase );
085 sb.append( '}' );
086 return sb.toString();
087 }
088 }