o Put modello-maven-plugin under dependencyManagement and chose version

1.0-alpha-5-SNAPSHOT for all so they're all the same.
  
o Updated modello plugin invocations in all poms to by adding execution elements
  and fixing goals section to get rid of deprecated notation.
  
o Removed dependency on modello-core in maven-plugin-tools; it seems it
  was there because maven-plugin-tools-java used StringUtils from modello -
  changed that to use the plexus-utils version.

o Reversed commons-cli version back to 1.0 (brett asked me to, a few days back).

o Updated all models to use fully qualified classnames - do not assume
  java.util.* is included! (it won't be anymore from modello 
  1.0-alpha-5-SNAPSHOT onward).

o Added some <?xml processing instructions to some models that didn't have them
  - vim now recognizes these files as XML (so I get syntax highlighting :))




git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2005-09-13 11:41:52 +00:00
parent 2af27a640f
commit 4aa55430cf
16 changed files with 128 additions and 110 deletions

View File

@ -86,7 +86,7 @@
<dependency> <dependency>
<groupId>commons-cli</groupId> <groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId> <artifactId>commons-cli</artifactId>
<version>1.0-beta-2</version> <version>1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>plexus</groupId> <groupId>plexus</groupId>

View File

@ -1,3 +1,5 @@
<?xml version="1.0"?>
<!-- <!--
| |
| o add specification element to a field, this would be more a technical description of | o add specification element to a field, this would be more a technical description of
@ -742,21 +744,21 @@
<codeSegment> <codeSegment>
<version>4.0.0</version> <version>4.0.0</version>
<code><![CDATA[ <code><![CDATA[
Map pluginMap; java.util.Map pluginMap;
public void flushPluginMap() public void flushPluginMap()
{ {
this.pluginMap = null; this.pluginMap = null;
} }
public Map getPluginsAsMap() public java.util.Map getPluginsAsMap()
{ {
if ( pluginMap == null ) if ( pluginMap == null )
{ {
pluginMap = new HashMap(); pluginMap = new java.util.HashMap();
if ( plugins != null ) if ( plugins != null )
{ {
for ( Iterator it = plugins.iterator(); it.hasNext(); ) for ( java.util.Iterator it = plugins.iterator(); it.hasNext(); )
{ {
Plugin plugin = (Plugin) it.next(); Plugin plugin = (Plugin) it.next();
pluginMap.put( plugin.getKey(), plugin ); pluginMap.put( plugin.getKey(), plugin );
@ -1334,12 +1336,12 @@
return getJar(); return getJar();
} }
String artifact; String artifact;
if ("ejb-client".equals(getType())) { if ("ejb-client".equals(getType())) {
artifact = getArtifactId() + "-" + getVersion() + "-client." + getExtension(); artifact = getArtifactId() + "-" + getVersion() + "-client." + getExtension();
} else { } else {
artifact = getArtifactId() + "-" + getVersion() + "." + getExtension(); artifact = getArtifactId() + "-" + getVersion() + "." + getExtension();
} }
return artifact; return artifact;
@ -1759,6 +1761,28 @@
<defaultValue>../pom.xml</defaultValue> <defaultValue>../pom.xml</defaultValue>
</field> </field>
</fields> </fields>
<codeSegments>
<codeSegment>
<version>4.0.0</version>
<code><![CDATA[
public String getId()
{
StringBuffer id = new StringBuffer();
id.append( getGroupId() );
id.append( ":" );
id.append( getArtifactId() );
id.append( ":" );
// id.append( getPackaging() );
id.append( ":" );
id.append( getVersion() );
return id.toString();
}
]]></code>
</codeSegment>
</codeSegments>
</class> </class>
<class> <class>
<name>Repository</name> <name>Repository</name>
@ -2343,21 +2367,21 @@
<codeSegment> <codeSegment>
<version>4.0.0</version> <version>4.0.0</version>
<code><![CDATA[ <code><![CDATA[
private Map executionMap = null; private java.util.Map executionMap = null;
public void flushExecutionMap() public void flushExecutionMap()
{ {
this.executionMap = null; this.executionMap = null;
} }
public Map getExecutionsAsMap() public java.util.Map getExecutionsAsMap()
{ {
if ( executionMap == null ) if ( executionMap == null )
{ {
executionMap = new HashMap(); executionMap = new java.util.HashMap();
if ( getExecutions() != null ) if ( getExecutions() != null )
{ {
for ( Iterator i = getExecutions().iterator(); i.hasNext(); ) for ( java.util.Iterator i = getExecutions().iterator(); i.hasNext(); )
{ {
PluginExecution exec = (PluginExecution) i.next(); PluginExecution exec = (PluginExecution) i.next();
@ -2385,7 +2409,7 @@
} }
/** @deprecated */ /** @deprecated */
private Map goalMap = null; private java.util.Map goalMap = null;
/** @deprecated */ /** @deprecated */
public void flushGoalMap() public void flushGoalMap()
{ {
@ -2393,14 +2417,14 @@
} }
/** @deprecated */ /** @deprecated */
public Map getGoalsAsMap() public java.util.Map getGoalsAsMap()
{ {
if ( goalMap == null ) if ( goalMap == null )
{ {
goalMap = new HashMap(); goalMap = new java.util.HashMap();
if ( goals != null ) if ( goals != null )
{ {
for ( Iterator i = goals.iterator(); i.hasNext(); ) for ( java.util.Iterator i = goals.iterator(); i.hasNext(); )
{ {
Goal g = (Goal) i.next(); Goal g = (Goal) i.next();
goalMap.put( g.getId(), g ); goalMap.put( g.getId(), g );
@ -2512,21 +2536,21 @@
<codeSegment> <codeSegment>
<version>4.0.0</version> <version>4.0.0</version>
<code><![CDATA[ <code><![CDATA[
Map reportPluginMap; java.util.Map reportPluginMap;
public void flushReportPluginMap() public void flushReportPluginMap()
{ {
this.reportPluginMap = null; this.reportPluginMap = null;
} }
public Map getReportPluginsAsMap() public java.util.Map getReportPluginsAsMap()
{ {
if ( reportPluginMap == null ) if ( reportPluginMap == null )
{ {
reportPluginMap = new HashMap(); reportPluginMap = new java.util.HashMap();
if ( getPlugins() != null ) if ( getPlugins() != null )
{ {
for ( Iterator it = getPlugins().iterator(); it.hasNext(); ) for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); )
{ {
ReportPlugin reportPlugin = (ReportPlugin) it.next(); ReportPlugin reportPlugin = (ReportPlugin) it.next();
reportPluginMap.put( reportPlugin.getKey(), reportPlugin ); reportPluginMap.put( reportPlugin.getKey(), reportPlugin );
@ -2742,21 +2766,21 @@
<codeSegment> <codeSegment>
<version>4.0.0</version> <version>4.0.0</version>
<code><![CDATA[ <code><![CDATA[
private Map reportSetMap = null; private java.util.Map reportSetMap = null;
public void flushReportSetMap() public void flushReportSetMap()
{ {
this.reportSetMap = null; this.reportSetMap = null;
} }
public Map getReportSetsAsMap() public java.util.Map getReportSetsAsMap()
{ {
if ( reportSetMap == null ) if ( reportSetMap == null )
{ {
reportSetMap = new HashMap(); reportSetMap = new java.util.HashMap();
if ( getReportSets() != null ) if ( getReportSets() != null )
{ {
for ( Iterator i = getReportSets().iterator(); i.hasNext(); ) for ( java.util.Iterator i = getReportSets().iterator(); i.hasNext(); )
{ {
ReportSet reportSet = (ReportSet) i.next(); ReportSet reportSet = (ReportSet) i.next();
reportSetMap.put( reportSet.getId(), reportSet ); reportSetMap.put( reportSet.getId(), reportSet );

View File

@ -22,7 +22,6 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-4-SNAPSHOT</version>
<configuration> <configuration>
<version>4.0.0</version> <version>4.0.0</version>
<model>maven.mdo</model> <model>maven.mdo</model>

View File

@ -31,7 +31,6 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<configuration> <configuration>
<model>src/main/mdo/lifecycle.mdo</model> <model>src/main/mdo/lifecycle.mdo</model>
<version>1.0.0</version> <version>1.0.0</version>

View File

@ -1,3 +1,5 @@
<?xml version="1.0"?>
<model> <model>
<id>plugin-registry</id> <id>plugin-registry</id>
<name>PluginRegistry</name> <name>PluginRegistry</name>
@ -97,15 +99,15 @@
<codeSegment> <codeSegment>
<version>1.0.0</version> <version>1.0.0</version>
<code><![CDATA[ <code><![CDATA[
private Map pluginsByKey; private java.util.Map pluginsByKey;
public Map getPluginsByKey() public java.util.Map getPluginsByKey()
{ {
if ( pluginsByKey == null ) if ( pluginsByKey == null )
{ {
pluginsByKey = new HashMap(); pluginsByKey = new java.util.HashMap();
for ( Iterator it = getPlugins().iterator(); it.hasNext(); ) for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); )
{ {
Plugin plugin = (Plugin) it.next(); Plugin plugin = (Plugin) it.next();
@ -191,4 +193,4 @@
</codeSegments> </codeSegments>
</class> </class>
</classes> </classes>
</model> </model>

View File

@ -25,22 +25,20 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version> <version>1.0-alpha-5-SNAPSHOT</version>
<goals> <executions>
<goal> <execution>
<id>xpp3-writer</id> <goals>
</goal> <goal>xpp3-writer</goal>
<goal> <goal>java</goal>
<id>java</id> <goal>xpp3-reader</goal>
</goal> </goals>
<goal> <configuration>
<id>xpp3-reader</id> <version>1.0.0</version>
</goal> <model>plugin-registry.mdo</model>
</goals> </configuration>
<configuration> </execution>
<version>1.0.0</version> </executions>
<model>plugin-registry.mdo</model>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -19,11 +19,6 @@
<artifactId>maven-project</artifactId> <artifactId>maven-project</artifactId>
<version>2.0-beta-1-SNAPSHOT</version> <version>2.0-beta-1-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-core</artifactId>
<version>1.0-alpha-1</version>
</dependency>
<dependency> <dependency>
<groupId>plexus</groupId> <groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId> <artifactId>plexus-utils</artifactId>

View File

@ -29,7 +29,7 @@ import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.descriptor.Requirement; import org.apache.maven.plugin.descriptor.Requirement;
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor; import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
import org.codehaus.modello.StringUtils; import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.logging.AbstractLogEnabled;
import java.io.File; import java.io.File;

View File

@ -63,22 +63,19 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<configuration> <configuration>
<model>src/main/mdo/descriptor.mdo</model> <model>src/main/mdo/descriptor.mdo</model>
<version>1.0.0</version> <version>1.0.0</version>
</configuration> </configuration>
<goals> <executions>
<goal> <execution>
<id>xpp3-reader</id> <goals>
</goal> <goal>xpp3-reader</goal>
<goal> <goal>xpp3-writer</goal>
<id>xpp3-writer</id> <goal>java</goal>
</goal> </goals>
<goal> </execution>
<id>java</id> </executions>
</goal>
</goals>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -39,7 +39,6 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<configuration> <configuration>
<model>src/main/mdo/verifications.mdo</model> <model>src/main/mdo/verifications.mdo</model>
<version>1.0.0</version> <version>1.0.0</version>

View File

@ -144,6 +144,11 @@
<artifactId>plexus-utils</artifactId> <artifactId>plexus-utils</artifactId>
<version>1.0.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-5-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<modules> <modules>

View File

@ -33,22 +33,19 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version> <executions>
<goals> <execution>
<goal> <goals>
<id>xpp3-writer</id> <goal>xpp3-writer</goal>
</goal> <goal>java</goal>
<goal> <goal>xpp3-reader</goal>
<id>java</id> </goals>
</goal> <configuration>
<goal> <version>1.0.0</version>
<id>xpp3-reader</id> <model>profiles.mdo</model>
</goal> </configuration>
</goals> </execution>
<configuration> </executions>
<version>1.0.0</version>
<model>profiles.mdo</model>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -22,7 +22,6 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<configuration> <configuration>
<version>1.0.0</version> <version>1.0.0</version>
<model>src/main/mdo/metadata.mdo</model> <model>src/main/mdo/metadata.mdo</model>

View File

@ -28,22 +28,19 @@
<plugin> <plugin>
<groupId>org.codehaus.modello</groupId> <groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId> <artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-3</version> <executions>
<goals> <execution>
<goal> <goals>
<id>xpp3-writer</id> <goal>xpp3-writer</goal>
</goal> <goal>java</goal>
<goal> <goal>xpp3-reader</goal>
<id>java</id> </goals>
</goal> <configuration>
<goal> <version>1.0.0</version>
<id>xpp3-reader</id> <model>settings.mdo</model>
</goal> </configuration>
</goals> </execution>
<configuration> </executions>
<version>1.0.0</version>
<model>settings.mdo</model>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,3 +1,5 @@
<?xml version="1.0"?>
<model> <model>
<id>settings</id> <id>settings</id>
<name>Settings</name> <name>Settings</name>
@ -212,12 +214,12 @@
{ {
if(activeProxy == null) if(activeProxy == null)
{ {
List proxies = getProxies(); java.util.List proxies = getProxies();
if ( proxies != null && !proxies.isEmpty() ) if ( proxies != null && !proxies.isEmpty() )
{ {
if ( proxies.size() > 1 ) if ( proxies.size() > 1 )
{ {
for ( Iterator it = proxies.iterator(); it.hasNext(); ) for ( java.util.Iterator it = proxies.iterator(); it.hasNext(); )
{ {
Proxy proxy = (Proxy) it.next(); Proxy proxy = (Proxy) it.next();
if ( proxy.isActive() ) if ( proxy.isActive() )
@ -242,10 +244,10 @@
{ {
Server match = null; Server match = null;
List servers = getServers(); java.util.List servers = getServers();
if ( servers != null && serverId != null ) if ( servers != null && serverId != null )
{ {
for ( Iterator it = servers.iterator(); it.hasNext(); ) for ( java.util.Iterator it = servers.iterator(); it.hasNext(); )
{ {
Server server = (Server) it.next(); Server server = (Server) it.next();
if ( serverId.equals( server.getId() ) ) if ( serverId.equals( server.getId() ) )
@ -263,10 +265,10 @@
{ {
Mirror match = null; Mirror match = null;
List mirrors = getMirrors(); java.util.List mirrors = getMirrors();
if ( mirrors != null && repositoryId != null ) if ( mirrors != null && repositoryId != null )
{ {
for ( Iterator it = mirrors.iterator(); it.hasNext(); ) for ( java.util.Iterator it = mirrors.iterator(); it.hasNext(); )
{ {
Mirror mirror = (Mirror) it.next(); Mirror mirror = (Mirror) it.next();
if ( repositoryId.equals( mirror.getMirrorOf() ) ) if ( repositoryId.equals( mirror.getMirrorOf() ) )
@ -280,22 +282,22 @@
return match; return match;
} }
private Map profileMap; private java.util.Map profileMap;
public void flushProfileMap() public void flushProfileMap()
{ {
this.profileMap = null; this.profileMap = null;
} }
public Map getProfilesAsMap() public java.util.Map getProfilesAsMap()
{ {
if ( profileMap == null ) if ( profileMap == null )
{ {
profileMap = new HashMap(); profileMap = new java.util.HashMap();
if ( getProfiles() != null ) if ( getProfiles() != null )
{ {
for ( Iterator it = getProfiles().iterator(); it.hasNext(); ) for ( java.util.Iterator it = getProfiles().iterator(); it.hasNext(); )
{ {
Profile profile = (Profile) it.next(); Profile profile = (Profile) it.next();
@ -764,4 +766,4 @@
</class> </class>
<!-- /BuildProfile support --> <!-- /BuildProfile support -->
</classes> </classes>
</model> </model>

View File

@ -172,6 +172,11 @@
<artifactId>plexus-utils</artifactId> <artifactId>plexus-utils</artifactId>
<version>1.0.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<version>1.0-alpha-5-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<modules> <modules>