mirror of https://github.com/apache/maven.git
o adding test with multiple executions
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@777100 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9efd21d0c9
commit
9024112b87
|
@ -8,6 +8,7 @@ import org.apache.maven.AbstractCoreMavenComponentTestCase;
|
|||
import org.apache.maven.exception.ExceptionHandler;
|
||||
import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.PluginExecution;
|
||||
import org.apache.maven.plugin.MojoExecution;
|
||||
import org.apache.maven.plugin.descriptor.MojoDescriptor;
|
||||
import org.codehaus.plexus.component.annotations.Requirement;
|
||||
|
@ -131,13 +132,24 @@ public class LifecycleExecutorTest
|
|||
File pom = getProject( "project-with-multiple-executions" );
|
||||
MavenSession session = createMavenSession( pom );
|
||||
assertEquals( "project-with-multiple-executions", session.getCurrentProject().getArtifactId() );
|
||||
assertEquals( "1.0", session.getCurrentProject().getVersion() );
|
||||
assertEquals( "1.0.1", session.getCurrentProject().getVersion() );
|
||||
List<MojoExecution> lifecyclePlan = lifecycleExecutor.calculateBuildPlan( session, "clean", "install" );
|
||||
|
||||
/*
|
||||
for ( Plugin p : session.getCurrentProject().getBuildPlugins() )
|
||||
{
|
||||
for ( PluginExecution pe : p.getExecutions() )
|
||||
{
|
||||
System.out.println( pe.getConfiguration() );
|
||||
}
|
||||
}
|
||||
|
||||
for ( MojoExecution me : lifecyclePlan )
|
||||
{
|
||||
System.out.println( me.getExecutionId() );
|
||||
System.out.println( me.getMojoDescriptor().getFullGoalName() );
|
||||
//System.out.println( me.getConfiguration() ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
//[01] clean:clean
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>project-with-multiple-executions</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>1.5.8</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.modello</groupId>
|
||||
<artifactId>modello-maven-plugin</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>site-docs</id>
|
||||
<phase>pre-site</phase>
|
||||
<goals>
|
||||
<goal>xdoc</goal>
|
||||
<goal>xsd</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>1.0.0</version>
|
||||
<models>
|
||||
<model>src/main/mdo/supplemental-model.mdo</model>
|
||||
</models>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>site-docs-supplement</id>
|
||||
<phase>pre-site</phase>
|
||||
<goals>
|
||||
<goal>xdoc</goal>
|
||||
<goal>xsd</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>1.1.0</version>
|
||||
<models>
|
||||
<model>src/main/mdo/remote-resources.mdo</model>
|
||||
</models>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>remote-resources</id>
|
||||
<goals>
|
||||
<goal>xpp3-writer</goal>
|
||||
<goal>java</goal>
|
||||
<goal>xpp3-reader</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>1.1.0</version>
|
||||
<models>
|
||||
<model>src/main/mdo/remote-resources.mdo</model>
|
||||
</models>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>supplemental-models</id>
|
||||
<goals>
|
||||
<goal>xpp3-writer</goal>
|
||||
<goal>java</goal>
|
||||
<goal>xpp3-reader</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<version>1.0.0</version>
|
||||
<models>
|
||||
<model>src/main/mdo/supplemental-model.mdo</model>
|
||||
</models>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,61 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you 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.
|
||||
-->
|
||||
|
||||
<model>
|
||||
<id>remoteResourcesBundle</id>
|
||||
<name>RemoteResourcesBundle</name>
|
||||
<description><![CDATA[
|
||||
A bundle of remote resources.
|
||||
This is the model specification for remote-resources.xml.
|
||||
]]></description>
|
||||
<defaults>
|
||||
<default>
|
||||
<key>package</key>
|
||||
<value>org.apache.maven.plugin.resources.remote</value>
|
||||
</default>
|
||||
</defaults>
|
||||
<classes>
|
||||
<class rootElement="true" xml.tagName="remoteResourcesBundle">
|
||||
<name>RemoteResourcesBundle</name>
|
||||
<version>1.1.0</version>
|
||||
<description>Root element of the remote-resources.xml file.</description>
|
||||
<fields>
|
||||
<field>
|
||||
<name>remoteResources</name>
|
||||
<version>1.1.0</version>
|
||||
<description><![CDATA[
|
||||
Remote resources that are contained in a remote resources bundle.
|
||||
]]></description>
|
||||
<association>
|
||||
<type>String</type>
|
||||
<multiplicity>*</multiplicity>
|
||||
</association>
|
||||
</field>
|
||||
<field>
|
||||
<name>sourceEncoding</name>
|
||||
<version>1.1.0</version>
|
||||
<description><![CDATA[
|
||||
Source encoding of the remote resources contained in the bundle.
|
||||
]]></description>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
</classes>
|
||||
</model>
|
|
@ -0,0 +1,61 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you 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.
|
||||
-->
|
||||
|
||||
<model>
|
||||
<id>supplementalModel</id>
|
||||
<name>SupplementalDataModel</name>
|
||||
<description>Provides access to supplemental POM data models.</description>
|
||||
<defaults>
|
||||
<default>
|
||||
<key>package</key>
|
||||
<value>org.apache.maven.plugin.resources.remote</value>
|
||||
</default>
|
||||
</defaults>
|
||||
<classes>
|
||||
<class rootElement="true" xml.tagName="supplementalDataModels" xsd.compositor="sequence">
|
||||
<name>SupplementalDataModel</name>
|
||||
<version>1.0.0</version>
|
||||
<description>Root element of the supplemental-models.xml file.</description>
|
||||
<fields>
|
||||
<field xml.listStyle="flat">
|
||||
<name>supplement</name>
|
||||
<version>1.0.0</version>
|
||||
<description>Snippets of POM xml files used to supplement the data model.</description>
|
||||
<association>
|
||||
<type>Supplement</type>
|
||||
<multiplicity>*</multiplicity>
|
||||
</association>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
<class>
|
||||
<name>Supplement</name>
|
||||
<version>1.0.0</version>
|
||||
<description>A single supplement</description>
|
||||
<fields>
|
||||
<field>
|
||||
<name>project</name>
|
||||
<version>1.0.0</version>
|
||||
<description>Snippets of POM xml files used to supplement the data model.</description>
|
||||
<type>DOM</type>
|
||||
</field>
|
||||
</fields>
|
||||
</class>
|
||||
</classes>
|
||||
</model>
|
Loading…
Reference in New Issue