PR: MNG-971

add clean and site lifecycles for short names and possible bindings

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307237 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-08 02:05:08 +00:00
parent 314b721251
commit ae98e4f4b8
6 changed files with 474 additions and 154 deletions

View File

@ -42,7 +42,6 @@ import org.apache.maven.plugin.PluginManagerException;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.lifecycle.Execution;
import org.apache.maven.plugin.lifecycle.Lifecycle;
import org.apache.maven.plugin.lifecycle.Phase;
import org.apache.maven.plugin.version.PluginVersionResolutionException;
import org.apache.maven.project.MavenProject;
@ -84,12 +83,14 @@ public class DefaultLifecycleExecutor
private ExtensionManager extensionManager;
private List phases;
private List lifecycles;
private ArtifactHandlerManager artifactHandlerManager;
private List defaultReports;
private Map phaseToLifecycleMap;
// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
@ -416,7 +417,7 @@ public class DefaultLifecycleExecutor
// if it's a phase, then we don't need to check whether it's an aggregator.
// simply add it to the current task partition.
if ( phases.contains( task ) )
if ( getPhaseToLifecycleMap().containsKey( task ) )
{
if ( currentSegment != null && currentSegment.aggregate() )
{
@ -507,11 +508,13 @@ public class DefaultLifecycleExecutor
throws LifecycleExecutionException, ArtifactNotFoundException, MojoExecutionException,
ArtifactResolutionException, MojoFailureException
{
if ( phases.contains( task ) )
if ( getPhaseToLifecycleMap().containsKey( task ) )
{
Lifecycle lifecycle = getLifecycleForPhase( task );
// we have a lifecycle phase, so lets bind all the necessary goals
Map lifecycleMappings = constructLifecycleMappings( session, task, project );
executeGoalWithLifecycle( task, session, lifecycleMappings, project, response );
Map lifecycleMappings = constructLifecycleMappings( session, task, project, lifecycle );
executeGoalWithLifecycle( task, session, lifecycleMappings, project, response, lifecycle );
}
else
{
@ -520,11 +523,11 @@ public class DefaultLifecycleExecutor
}
private void executeGoalWithLifecycle( String task, MavenSession session, Map lifecycleMappings,
MavenProject project, MavenExecutionResponse response )
MavenProject project, MavenExecutionResponse response, Lifecycle lifecycle )
throws ArtifactResolutionException, LifecycleExecutionException, MojoExecutionException, MojoFailureException,
ArtifactNotFoundException
{
List goals = processGoalChain( task, lifecycleMappings );
List goals = processGoalChain( task, lifecycleMappings, lifecycle );
executeGoals( goals, session, project, response );
}
@ -759,13 +762,15 @@ public class DefaultLifecycleExecutor
Map lifecycleMappings = null;
if ( targetPhase != null )
{
Lifecycle lifecycle = getLifecycleForPhase( targetPhase );
// Create new lifecycle
lifecycleMappings = constructLifecycleMappings( session, targetPhase, project );
lifecycleMappings = constructLifecycleMappings( session, targetPhase, project, lifecycle );
String executeLifecycle = mojoDescriptor.getExecuteLifecycle();
if ( executeLifecycle != null )
{
Lifecycle lifecycleOverlay;
org.apache.maven.plugin.lifecycle.Lifecycle lifecycleOverlay;
try
{
lifecycleOverlay = pluginDescriptor.getLifecycleMapping( executeLifecycle );
@ -810,7 +815,9 @@ public class DefaultLifecycleExecutor
MavenProject executionProject = new MavenProject( project );
if ( targetPhase != null )
{
executeGoalWithLifecycle( targetPhase, session, lifecycleMappings, executionProject, response );
Lifecycle lifecycle = getLifecycleForPhase( targetPhase );
executeGoalWithLifecycle( targetPhase, session, lifecycleMappings, executionProject, response, lifecycle );
}
else
{
@ -821,6 +828,18 @@ public class DefaultLifecycleExecutor
project.setExecutionProject( executionProject );
}
private Lifecycle getLifecycleForPhase( String phase )
throws LifecycleExecutionException
{
Lifecycle lifecycle = (Lifecycle) getPhaseToLifecycleMap().get( phase );
if ( lifecycle == null )
{
throw new LifecycleExecutionException( "Unable to find lifecycle for phase '" + phase + "'" );
}
return lifecycle;
}
private MojoDescriptor getMojoDescriptor( PluginDescriptor pluginDescriptor, String goal )
throws LifecycleExecutionException
{
@ -866,11 +885,12 @@ public class DefaultLifecycleExecutor
}
}
private Map constructLifecycleMappings( MavenSession session, String selectedPhase, MavenProject project )
private Map constructLifecycleMappings( MavenSession session, String selectedPhase, MavenProject project,
Lifecycle lifecycle )
throws ArtifactResolutionException, LifecycleExecutionException, ArtifactNotFoundException
{
// first, bind those associated with the packaging
Map lifecycleMappings = bindLifecycleForPackaging( session, selectedPhase, project );
Map lifecycleMappings = bindLifecycleForPackaging( session, selectedPhase, project, lifecycle );
// next, loop over plugins and for any that have a phase, bind it
for ( Iterator i = project.getBuildPlugins().iterator(); i.hasNext(); )
@ -883,14 +903,15 @@ public class DefaultLifecycleExecutor
return lifecycleMappings;
}
private Map bindLifecycleForPackaging( MavenSession session, String selectedPhase, MavenProject project )
private Map bindLifecycleForPackaging( MavenSession session, String selectedPhase, MavenProject project,
Lifecycle lifecycle )
throws ArtifactResolutionException, LifecycleExecutionException, ArtifactNotFoundException
{
Map mappings = findMappingsForLifecycle( session, project );
Map mappings = findMappingsForLifecycle( session, project, lifecycle );
Map lifecycleMappings = new HashMap();
for ( Iterator i = phases.iterator(); i.hasNext(); )
for ( Iterator i = lifecycle.getPhases().iterator(); i.hasNext(); )
{
String phase = (String) i.next();
@ -926,16 +947,21 @@ public class DefaultLifecycleExecutor
return lifecycleMappings;
}
private Map findMappingsForLifecycle( MavenSession session, MavenProject project )
private Map findMappingsForLifecycle( MavenSession session, MavenProject project, Lifecycle lifecycle )
throws ArtifactResolutionException, LifecycleExecutionException, ArtifactNotFoundException
{
String packaging = project.getPackaging();
LifecycleMapping m;
Map mappings = null;
try
{
m = (LifecycleMapping) findExtension( project, LifecycleMapping.ROLE, packaging, session.getSettings(),
session.getLocalRepository() );
LifecycleMapping m = (LifecycleMapping) findExtension( project, LifecycleMapping.ROLE, packaging,
session.getSettings(),
session.getLocalRepository() );
if ( m != null )
{
mappings = m.getPhases( lifecycle.getId() );
}
}
catch ( PluginVersionResolutionException e )
{
@ -948,20 +974,39 @@ public class DefaultLifecycleExecutor
"Cannot load extension plugin obtaining lifecycle mappings for: \'" + packaging + "\'.", e );
}
if ( m == null )
Map defaultMappings = lifecycle.getDefaultPhases();
if ( mappings == null )
{
try
{
m = (LifecycleMapping) session.lookup( LifecycleMapping.ROLE, packaging );
LifecycleMapping m = (LifecycleMapping) session.lookup( LifecycleMapping.ROLE, packaging );
mappings = m.getPhases( lifecycle.getId() );
}
catch ( ComponentLookupException e )
{
throw new LifecycleExecutionException(
"Cannot find lifecycle mapping for packaging: \'" + packaging + "\'.", e );
if ( defaultMappings == null )
{
throw new LifecycleExecutionException(
"Cannot find lifecycle mapping for packaging: \'" + packaging + "\'.", e );
}
}
}
return m.getPhases();
if ( mappings == null )
{
if ( defaultMappings == null )
{
throw new LifecycleExecutionException(
"Cannot find lifecycle mapping for packaging: \'" + packaging + "\', and there is no default" );
}
else
{
mappings = defaultMappings;
}
}
return mappings;
}
private Object findExtension( MavenProject project, String role, String roleHint, Settings settings,
@ -1159,16 +1204,16 @@ public class DefaultLifecycleExecutor
}
}
private List processGoalChain( String task, Map phaseMap )
private List processGoalChain( String task, Map phaseMap, Lifecycle lifecycle )
{
List goals = new ArrayList();
// only execute up to the given phase
int index = phases.indexOf( task );
int index = lifecycle.getPhases().indexOf( task );
for ( int i = 0; i <= index; i++ )
{
String p = (String) phases.get( i );
String p = (String) lifecycle.getPhases().get( i );
List phaseGoals = (List) phaseMap.get( p );
@ -1185,7 +1230,7 @@ public class DefaultLifecycleExecutor
throws ArtifactResolutionException, LifecycleExecutionException, ArtifactNotFoundException
{
String goal;
Plugin plugin = null;
Plugin plugin;
PluginDescriptor pluginDescriptor = null;
@ -1333,6 +1378,38 @@ public class DefaultLifecycleExecutor
getLogger().info( "----------------------------------------------------------------------------" );
}
public Map getPhaseToLifecycleMap()
throws LifecycleExecutionException
{
if ( phaseToLifecycleMap == null )
{
phaseToLifecycleMap = new HashMap();
for ( Iterator i = lifecycles.iterator(); i.hasNext(); )
{
Lifecycle lifecycle = (Lifecycle) i.next();
for ( Iterator p = lifecycle.getPhases().iterator(); p.hasNext(); )
{
String phase = (String) p.next();
if ( phaseToLifecycleMap.containsKey( phase ) )
{
Lifecycle prevLifecycle = (Lifecycle) phaseToLifecycleMap.get( phase );
throw new LifecycleExecutionException( "Phase '" + phase +
"' is defined in more than one lifecycle: '" + lifecycle.getId() + "' and '" +
prevLifecycle.getId() + "'" );
}
else
{
phaseToLifecycleMap.put( phase, lifecycle );
}
}
}
}
return phaseToLifecycleMap;
}
private static class TaskSegment
{
private boolean aggregate;

View File

@ -0,0 +1,98 @@
package org.apache.maven.lifecycle;
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Class Lifecycle.
*/
public class Lifecycle
{
/**
* Field id
*/
private String id;
/**
* Field phases
*/
private List phases;
/**
* default phases.
*/
private Map defaultPhases;
/**
* Method addPhase
*
* @param phase
*/
public void addPhase( String phase )
{
getPhases().add( phase );
} //-- void addPhase(Phase)
/**
* Method getId
*/
public String getId()
{
return this.id;
} //-- String getId()
/**
* Method getPhases
*/
public List getPhases()
{
if ( this.phases == null )
{
this.phases = new ArrayList();
}
return this.phases;
} //-- java.util.List getPhases()
/**
* Method setId
*
* @param id
*/
public void setId( String id )
{
this.id = id;
} //-- void setId(String)
/**
* Method setPhases
*
* @param phases
*/
public void setPhases( List phases )
{
this.phases = phases;
} //-- void setPhases(java.util.List)
public Map getDefaultPhases()
{
return defaultPhases;
}
}

View File

@ -16,8 +16,10 @@ package org.apache.maven.lifecycle.mapping;
* limitations under the License.
*/
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Lifecycle mapping for a POM.
@ -28,10 +30,24 @@ import java.util.HashMap;
public class DefaultLifecycleMapping
implements LifecycleMapping
{
private Map phases = new HashMap();
private List lifecycles;
public Map getPhases()
private Map lifecycleMap;
public Map getPhases( String lifecycle )
{
return phases;
if ( lifecycleMap == null )
{
lifecycleMap = new HashMap();
for ( Iterator i = lifecycles.iterator(); i.hasNext(); )
{
Lifecycle l = (Lifecycle) i.next();
lifecycleMap.put( l.getId(), l );
}
}
Lifecycle l = (Lifecycle) lifecycleMap.get( lifecycle );
return l != null ? l.getPhases() : null;
}
}

View File

@ -0,0 +1,61 @@
package org.apache.maven.lifecycle.mapping;
/*
* Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.Map;
/**
* Class Lifecycle.
*/
public class Lifecycle
{
/**
* Field id
*/
private String id;
/**
* Field phases
*/
private Map phases;
/**
* Method getId
*/
public String getId()
{
return this.id;
} //-- String getId()
/**
* Method getPhases
*/
public Map getPhases()
{
return this.phases;
}
/**
* Method setId
*
* @param id
*/
public void setId( String id )
{
this.id = id;
} //-- void setId(String)
}

View File

@ -24,7 +24,7 @@ import java.util.Map;
*/
public interface LifecycleMapping
{
static String ROLE = LifecycleMapping.class.getName();
String ROLE = LifecycleMapping.class.getName();
Map getPhases();
Map getPhases( String lifecycle );
}

View File

@ -182,40 +182,67 @@
</requirement>
</requirements>
<configuration>
<!-- START SNIPPET: lifecyle -->
<phases>
<phase implementation="java.lang.String">validate</phase>
<phase implementation="java.lang.String">initialize</phase>
<phase implementation="java.lang.String">generate-sources</phase>
<phase implementation="java.lang.String">process-sources</phase>
<phase implementation="java.lang.String">generate-resources</phase>
<phase implementation="java.lang.String">process-resources</phase>
<phase implementation="java.lang.String">compile</phase>
<phase implementation="java.lang.String">process-classes</phase>
<phase implementation="java.lang.String">generate-test-sources</phase>
<phase implementation="java.lang.String">process-test-sources</phase>
<phase implementation="java.lang.String">generate-test-resources</phase>
<phase implementation="java.lang.String">process-test-resources</phase>
<phase implementation="java.lang.String">test-compile</phase>
<phase implementation="java.lang.String">test</phase>
<phase implementation="java.lang.String">package</phase>
<phase implementation="java.lang.String">integration-test</phase>
<phase implementation="java.lang.String">verify</phase>
<phase implementation="java.lang.String">install</phase>
<phase implementation="java.lang.String">deploy</phase>
</phases>
<!-- END SNIPPET: lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: lifecycle -->
<phases>
<phase>validate</phase>
<phase>initialize</phase>
<phase>generate-sources</phase>
<phase>process-sources</phase>
<phase>generate-resources</phase>
<phase>process-resources</phase>
<phase>compile</phase>
<phase>process-classes</phase>
<phase>generate-test-sources</phase>
<phase>process-test-sources</phase>
<phase>generate-test-resources</phase>
<phase>process-test-resources</phase>
<phase>test-compile</phase>
<phase>test</phase>
<phase>package</phase>
<phase>integration-test</phase>
<phase>verify</phase>
<phase>install</phase>
<phase>deploy</phase>
</phases>
<!-- END SNIPPET: lifecycle -->
</lifecycle>
<lifecycle>
<id>clean</id>
<phases>
<phase>pre-clean</phase>
<phase>clean</phase>
<phase>post-clean</phase>
</phases>
<default-phases>
<clean>org.apache.maven.plugins:maven-clean-plugin:clean</clean>
</default-phases>
</lifecycle>
<lifecycle>
<id>site</id>
<phases>
<phase>pre-site</phase>
<phase>site</phase>
<phase>post-site</phase>
</phases>
<default-phases>
<site>org.apache.maven.plugins:maven-site-plugin:site</site>
</default-phases>
</lifecycle>
</lifecycles>
<!-- START SNIPPET: default-reports -->
<defaultReports>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-project-info-reports-plugin</report>
<report>org.apache.maven.plugins:maven-project-info-reports-plugin</report>
<!-- TODO: currently in mojo - should they be defaults any more?
<report implementation="java.lang.String">org.apache.maven.plugins:maven-checkstyle-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-javadoc-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-changelog-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-surefire-report-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-jdepend-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-jxr-plugin</report>
<report implementation="java.lang.String">org.apache.maven.plugins:maven-taglist-plugin</report>
<report>org.apache.maven.plugins:maven-checkstyle-plugin</report>
<report>org.apache.maven.plugins:maven-javadoc-plugin</report>
<report>org.apache.maven.plugins:maven-changelog-plugin</report>
<report>org.apache.maven.plugins:maven-surefire-report-plugin</report>
<report>org.apache.maven.plugins:maven-jdepend-plugin</report>
<report>org.apache.maven.plugins:maven-jxr-plugin</report>
<report>org.apache.maven.plugins:maven-taglist-plugin</report>
-->
</defaultReports>
<!-- END SNIPPET: default-reports -->
@ -247,12 +274,17 @@
<role-hint>pom</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: pom-lifecycle -->
<phases>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: pom-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: pom-lifecycle -->
<phases>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: pom-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -261,20 +293,26 @@
<role-hint>jar</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: jar-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-jar-plugin:jar
</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: jar-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: jar-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-jar-plugin:jar
</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: jar-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -283,27 +321,33 @@
<role-hint>maven-plugin</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: maven-plugin-lifecycle -->
<phases>
<generate-resources>org.apache.maven.plugins:maven-plugin-plugin:descriptor</generate-resources>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-jar-plugin:jar,
org.apache.maven.plugins:maven-plugin-plugin:addPluginArtifactMetadata
</package>
<install>
org.apache.maven.plugins:maven-install-plugin:install,
org.apache.maven.plugins:maven-plugin-plugin:updateRegistry
</install>
<deploy>
org.apache.maven.plugins:maven-deploy-plugin:deploy
</deploy>
</phases>
<!-- END SNIPPET: maven-plugin-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: maven-plugin-lifecycle -->
<phases>
<generate-resources>org.apache.maven.plugins:maven-plugin-plugin:descriptor</generate-resources>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-jar-plugin:jar,
org.apache.maven.plugins:maven-plugin-plugin:addPluginArtifactMetadata
</package>
<install>
org.apache.maven.plugins:maven-install-plugin:install,
org.apache.maven.plugins:maven-plugin-plugin:updateRegistry
</install>
<deploy>
org.apache.maven.plugins:maven-deploy-plugin:deploy
</deploy>
</phases>
<!-- END SNIPPET: maven-plugin-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -312,20 +356,26 @@
<role-hint>ejb</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: ejb-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-ejb-plugin:ejb
</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: ejb-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: ejb-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>
org.apache.maven.plugins:maven-ejb-plugin:ejb
</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: ejb-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -334,18 +384,24 @@
<role-hint>war</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: war-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>org.apache.maven.plugins:maven-war-plugin:war</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: war-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: war-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>org.apache.maven.plugins:maven-war-plugin:war</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: war-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -354,15 +410,21 @@
<role-hint>ear</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: ear-lifecycle -->
<phases>
<generate-resources>org.apache.maven.plugins:maven-ear-plugin:generate-application-xml</generate-resources>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<package>org.apache.maven.plugins:maven-ear-plugin:ear</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: ear-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: ear-lifecycle -->
<phases>
<generate-resources>
org.apache.maven.plugins:maven-ear-plugin:generate-application-xml</generate-resources>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<package>org.apache.maven.plugins:maven-ear-plugin:ear</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: ear-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>
@ -371,18 +433,24 @@
<role-hint>rar</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<!-- START SNIPPET: rar-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>org.apache.maven.plugins:maven-rar-plugin:rar</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: rar-lifecycle -->
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: rar-lifecycle -->
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>org.apache.maven.plugins:maven-rar-plugin:rar</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
<!-- END SNIPPET: rar-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>