001 package org.apache.maven.lifecycle; 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 java.util.List; 023 import java.util.Map; 024 025 /** 026 * Class Lifecycle. 027 */ 028 public class Lifecycle 029 { 030 public Lifecycle() 031 { 032 } 033 034 public Lifecycle( String id, List<String> phases, Map<String, String> defaultPhases ) 035 { 036 this.id = id; 037 this.phases = phases; 038 this.defaultPhases = defaultPhases; 039 } 040 041 // <lifecycle> 042 // <id>clean</id> 043 // <phases> 044 // <phase>pre-clean</phase> 045 // <phase>clean</phase> 046 // <phase>post-clean</phase> 047 // </phases> 048 // <default-phases> 049 // <clean>org.apache.maven.plugins:maven-clean-plugin:clean</clean> 050 // </default-phases> 051 // </lifecycle> 052 053 private String id; 054 055 private List<String> phases; 056 057 private Map<String, String> defaultPhases; 058 059 public String getId() 060 { 061 return this.id; 062 } 063 064 public List<String> getPhases() 065 { 066 return this.phases; 067 } 068 069 public Map<String, String> getDefaultPhases() 070 { 071 return defaultPhases; 072 } 073 074 @Override 075 public String toString() 076 { 077 return id + " -> " + phases; 078 } 079 080 }