An XSD is available at:
<extend>${basedir}/../project.xml</extend>
.
]]>
groupId
and artifactId
elements if they were previously empty.
]]>
war
ear
pom
.
Plugins can create their own packaging, and
therefore their own packaging types,
so this list does not contain all possible types.
]]>
http://my.corp/project-logo.png
). This is used
when generating the project documentation.
]]>
maven.repo.central.directory
.
]]>
groupId:artifactId:packaging:version
*/
public String getId()
{
StringBuilder id = new StringBuilder( 64 );
id.append( ( getGroupId() == null ) ? "[inherited]" : getGroupId() );
id.append( ":" );
id.append( getArtifactId() );
id.append( ":" );
id.append( getPackaging() );
id.append( ":" );
id.append( ( getVersion() == null ) ? "[inherited]" : getVersion() );
return id.toString();
}
@Override
public String toString()
{
return getId();
}
]]>
Profile
objects.
]]>
pluginMap;
/**
* Reset the pluginsMap
field to null
*/
public synchronized void flushPluginMap()
{
this.pluginMap = null;
}
/**
* @return a Map of plugins field with Plugins#getKey()
as key
* @see org.apache.maven.model.Plugin#getKey()
*/
public synchronized java.util.Map getPluginsAsMap()
{
if ( pluginMap == null )
{
pluginMap = new java.util.LinkedHashMap();
if ( plugins != null )
{
for ( java.util.Iterator it = plugins.iterator(); it.hasNext(); )
{
Plugin plugin = (Plugin) it.next();
pluginMap.put( plugin.getKey(), plugin );
}
}
}
return pluginMap;
}
]]>
groupId
and
artifactId
together instead.
]]>
war
, and plugin
.
A dependency of type plugin
is loaded as a Maven plugin and
not added to the project build classpath.
]]>
war
, ejb-client
and test-jar
: see default
artifact handlers for a list.
New types can be defined by plugins that set
extensions
to true
, so this is not a complete list.
]]>
sources
and javadoc
:
see default artifact handlers for a list,jdk14
and jdk15
.WEB-INF/lib
.
]]>
runtime
,
test
, system
, and provided
. Used to
calculate the various classpaths used for compilation, testing, and so on.
It also assists in determining which artifacts to include in a distribution of
this project. For more information, see
the
dependency mechanism.
]]>
${java.home}
.
]]>
Boolean
. Default value is false
.
]]>
groupId:artifactId:type
*/
public String getManagementKey()
{
return groupId + ":" + artifactId + ":" + type + ( classifier != null ? ":" + classifier : "" );
}
]]>
id:type
*/
public String getKey()
{
return getId() + ":" + getType();
}
/**
* @return the groupId as artifact directory
*/
public String getArtifactDirectory()
{
return getGroupId();
}
/**
* @return the artifact name as artifactId-version.extension
if <jar/> not set
*/
public String getArtifact()
{
// If the jar name has been explicty set then use that. This
// is when the converted
(repository manager converted this from an Maven 1 POM),
partner
(directly synced from a partner Maven 2 repository), deployed
(was deployed from a Maven 2
instance), verified
(has been hand verified as correct and final).
]]>
http://my.corp/logo.png
). This value is used
when generating the project documentation.
]]>
../pom.xml
.
Maven looks for the parent POM first in this location on
the filesystem, then the local repository, and lastly in the remote repo.
relativePath
allows you to select a different location,
for example when your structure is flat, or deeper without an intermediate parent POM.
However, the group ID, artifact ID and version are still required,
and must match the file in the location given or it will revert to the repository for the POM.
This feature is only for enhancing the development in a local checkout of that project.
Set the value to an empty string in case you want to disable the feature and always resolve
the parent POM from the repositories.
]]>
groupId:artifactId:version
*/
public String getId()
{
StringBuilder id = new StringBuilder( 64 );
id.append( getGroupId() );
id.append( ":" );
id.append( getArtifactId() );
id.append( ":" );
id.append( "pom" );
id.append( ":" );
id.append( getVersion() );
return id.toString();
}
@Override
public String toString()
{
return getId();
}
]]>
org.apache.maven.messages
), you must specify this
element with this value: org/apache/maven/messages
.
This is not required if you simply put the resources in that directory
structure at the source, however.
]]>
filters
element. Note: While the type
of this field is String
for technical reasons, the semantic type is actually
Boolean
. Default value is false
.
]]>
sourceDirectory
.
]]>
sourceDirectory
.
]]>
1.1-alpha1
,
1.2-beta
,
1.3.2
etc.
]]>
default
.
]]>
Boolean
. Default value is true
.
]]>
daily
(default),
interval:XXX
(in minutes) or
never
(only if it doesn't exist locally).
]]>
fail
or
warn
(the default).
]]>
Boolean
. Default value is true
.
]]>
By default, every element content is trimmed, but starting with Maven 3.1.0, you can add
xml:space="preserve"
to elements you want to preserve whitespace.
You can control how child POMs inherit configuration from parent POMs by adding combine.children
or combine.self
attributes to the children of the configuration element:
combine.children
: available values are merge
(default) and append
,combine.self
: available values are merge
(default) and override
.See POM Reference documentation and Xpp3DomUtils for more information.
]]>
Boolean
. Default value is false
.
]]>
executionMap = null;
/**
* Reset the executionMap
field to null
*/
public void flushExecutionMap()
{
this.executionMap = null;
}
/**
* @return a Map of executions field with PluginExecution#getId()
as key
* @see org.apache.maven.model.PluginExecution#getId()
*/
public java.util.Map getExecutionsAsMap()
{
if ( executionMap == null )
{
executionMap = new java.util.LinkedHashMap();
if ( getExecutions() != null )
{
for ( java.util.Iterator i = getExecutions().iterator(); i.hasNext(); )
{
PluginExecution exec = (PluginExecution) i.next();
if ( executionMap.containsKey( exec.getId() ) )
{
throw new IllegalStateException( "You cannot have two plugin executions with the same (or missing) elements.\nOffending execution\n\nId: \'" + exec.getId() + "\'\nPlugin:\'" + getKey() + "\'\n\n" );
}
executionMap.put( exec.getId(), exec );
}
}
}
return executionMap;
}
/**
* Gets the identifier of the plugin.
*
* @return The plugin id in the form {@code ::}, never {@code null}.
*/
public String getId()
{
StringBuilder id = new StringBuilder( 128 );
id.append( ( getGroupId() == null ) ? "[unknown-group-id]" : getGroupId() );
id.append( ":" );
id.append( ( getArtifactId() == null ) ? "[unknown-artifact-id]" : getArtifactId() );
id.append( ":" );
id.append( ( getVersion() == null ) ? "[unknown-version]" : getVersion() );
return id.toString();
}
//TODO we shall reset key variable when groupId/artifactId change
private String key = null;
/**
* @return the key of the plugin, ie groupId:artifactId
*/
public String getKey()
{
if ( key == null )
{
key = constructKey( groupId, artifactId );
}
return key;
}
/**
* @param groupId
* @param artifactId
* @return the key of the plugin, ie groupId:artifactId
*/
public static String constructKey( String groupId, String artifactId )
{
return groupId + ":" + artifactId;
}
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals( Object other )
{
if ( other instanceof Plugin )
{
Plugin otherPlugin = (Plugin) other;
return getKey().equals( otherPlugin.getKey() );
}
return false;
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
return getKey().hashCode();
}
/**
* @see java.lang.Object#toString()
*/
public String toString()
{
return "Plugin [" + getKey() + "]";
}
]]>
Boolean
. Default value is false
.
]]>
reportPluginMap;
/**
* Reset the reportPluginMap
field to null
*/
public synchronized void flushReportPluginMap()
{
this.reportPluginMap = null;
}
/**
* @return a Map of plugins field with ReportPlugin#getKey()
as key
* @see org.apache.maven.model.ReportPlugin#getKey()
*/
public synchronized java.util.Map getReportPluginsAsMap()
{
if ( reportPluginMap == null )
{
reportPluginMap = new java.util.LinkedHashMap();
if ( getPlugins() != null )
{
for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); )
{
ReportPlugin reportPlugin = (ReportPlugin) it.next();
reportPluginMap.put( reportPlugin.getKey(), reportPlugin );
}
}
}
return reportPluginMap;
}
]]>
!1.4
matches any JDK that is not version 1.4.
]]>
Windows XP
.
]]>
unix
.
]]>
reportSetMap = null;
/**
* Reset the reportSetMap
field to null
*/
public void flushReportSetMap()
{
this.reportSetMap = null;
}
/**
* @return a Map of reportSets field with ReportSet#getId()
as key
* @see org.apache.maven.model.ReportSet#getId()
*/
public java.util.Map getReportSetsAsMap()
{
if ( reportSetMap == null )
{
reportSetMap = new java.util.LinkedHashMap();
if ( getReportSets() != null )
{
for ( java.util.Iterator i = getReportSets().iterator(); i.hasNext(); )
{
ReportSet reportSet = (ReportSet) i.next();
reportSetMap.put( reportSet.getId(), reportSet );
}
}
}
return reportSetMap;
}
/**
* @return the key of the report plugin, ie groupId:artifactId
*/
public String getKey()
{
return constructKey( groupId, artifactId );
}
/**
* @param groupId
* @param artifactId
* @return the key of the report plugin, ie groupId:artifactId
*/
public static String constructKey( String groupId, String artifactId )
{
return groupId + ":" + artifactId;
}
]]>
boolean equal( T obj1, T obj2 )
{
return ( obj1 != null ) ? obj1.equals( obj2 ) : obj2 == null;
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
int result = 17;
result = 37 * result + ( getArtifactId() != null ? getArtifactId().hashCode() : 0 );
result = 37 * result + ( getGroupId() != null ? getGroupId().hashCode() : 0 );
result = 37 * result + ( getVersion() != null ? getVersion().hashCode() : 0 );
return result;
}
]]>