From 753a6c60f47f3ac4f270005b65e9d6481de8eb68 Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:00:02 -0700 Subject: Adding maven and ant source trees Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445 Signed-off-by: Ashlee Young --- .../maven-core/lifecycle-executor.txt | 217 +++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 framework/src/maven/apache-maven-3.3.3/maven-core/lifecycle-executor.txt (limited to 'framework/src/maven/apache-maven-3.3.3/maven-core/lifecycle-executor.txt') diff --git a/framework/src/maven/apache-maven-3.3.3/maven-core/lifecycle-executor.txt b/framework/src/maven/apache-maven-3.3.3/maven-core/lifecycle-executor.txt new file mode 100644 index 00000000..41e98bfd --- /dev/null +++ b/framework/src/maven/apache-maven-3.3.3/maven-core/lifecycle-executor.txt @@ -0,0 +1,217 @@ +We have a lifecycle mapping for the packaging of *jar* below. You see that for this packaging we have a *default* lifecycle and a list of phases where each phase is a comma separated list of goals to run and they are in the form groupId:artifactId:version. + + + + + default + + org.apache.maven.plugins:maven-resources-plugin:resources + org.apache.maven.plugins:maven-compiler-plugin:compile + org.apache.maven.plugins:maven-resources-plugin:testResources + org.apache.maven.plugins:maven-compiler-plugin:testCompile + org.apache.maven.plugins:maven-surefire-plugin:test + org.apache.maven.plugins:maven-jar-plugin:jar + org.apache.maven.plugins:maven-install-plugin:install + org.apache.maven.plugins:maven-deploy-plugin:deploy + + + + + +We need to turn this list of phases into a set of plugin objects that have an xml representation like the following: + + + + org.apache.maven.plugins + maven-resources-plugin + + + + process + + + + + . + . + . + + +We need this form so that the model builder can make the first pass at merging. Full merging cannot be done because we don't know what the version of the plugin is yet that the user has requested. For plugins in the default lifecycle they are typically defined in the plugin management section of the parent POM. When the merging is complete we are going to have something that looks like the following: + + + + org.apache.maven.plugins + maven-resources-plugin + 1.0 + + + + process + + + + + . + . + . + + +Once we have the version of the plugins the appropriate call to the plugin manager can be made to get the MojoDescriptor for the goal that needs to be run. In the MojoDescriptor we are interested in the element and element. From these elements we need to make a component configuration for the MojoExecution. The actual DOM like structure we create is of type PlexusConfiguration and is the type we use with the ComponentConfigurator to initialize fields in a Plexus component. Typically this is done within Plexus with the configuration supplied with component configuration, but in Maven we take configuration values from the POM. So we have to use the ComponentConfigurator outside of Plexus in order to configurure the Maven Mojo which is just a Plexus component. We can use the information from the MojoDescriptor along with the merged configuration information that is now present in the POM to create the complete PlexusConfiguration used to populate values in the Maven Mojo. + +foreach configuration element: + - if read only and being set squawk + + - find the parameter + - get value from expression or default + - if required and null squawk + + + + ${localRepository} + ${project.resources} + ${project.repositories} + ${project.remoteArtifactRepositories} + ${basedir}/src/main/appended-resources + ${excludeScope} + ${includeScope} + ${excludeGroupIds} + ${remoteresources.skip} + ${project.build.directory}/maven-shared-archive-resources + ${excludeArtifactIds} + ${excludeTransitive} + ${includeGroupIds} + ${session} + ${project} + ${includeArtifactIds} + + + + + appendedResourcesDirectory + java.io.File + false + true + + + attached + boolean + false + true + + + excludeArtifactIds + java.lang.String + false + true + + + excludeGroupIds + java.lang.String + false + true + + + excludeScope + java.lang.String + false + true + + + excludeTransitive + boolean + false + true + + + includeArtifactIds + java.lang.String + false + true + + + includeGroupIds + java.lang.String + false + true + + + includeScope + java.lang.String + false + true + + + localRepository + org.apache.maven.artifact.repository.ArtifactRepository + true + false + + + mavenSession + org.apache.maven.execution.MavenSession + true + false + The Maven session. + + + outputDirectory + java.io.File + false + true + + + project + org.apache.maven.project.MavenProject + true + false + + + properties + java.util.Map + false + true + + + remoteArtifactRepositories + java.util.List + true + false + + + repositories + java.util.List + true + false + + + resourceBundles + java.util.List + true + true + + + resources + java.util.List + true + false + + + skip + boolean + false + true + + + supplementalModels + java.lang.String[] + false + true + + + +- we need to know what came from the POM, and validate those +- plugin in any default values +- check to see if anything is missing + +In the case of something like Modello where it is common to specify the configuration for all the goals outside the execution block we need to account for creating the right configuration element which includes only those configuration elements for a particular goal that that particular goal understands. We need to walk through the parameters of the Mojo in question and only take the configuration options that apply. -- cgit 1.2.3-korg