mirror of https://github.com/apache/maven.git
[MNG-8025] Restore compatibility (#1467)
This commit is contained in:
parent
52c5659b25
commit
3bad5068a2
|
@ -652,36 +652,18 @@
|
||||||
<version>4.0.0/4.0.99</version>
|
<version>4.0.0/4.0.99</version>
|
||||||
<code>
|
<code>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Map<String, Plugin> pluginMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the {@code pluginsMap} field to {@code null}
|
* Reset the {@code pluginsMap} field to {@code null}
|
||||||
*/
|
*/
|
||||||
public synchronized void flushPluginMap()
|
public void flushPluginMap() {
|
||||||
{
|
|
||||||
this.pluginMap = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a Map of plugins field with {@code Plugins#getKey()} as key
|
* @return a Map of plugins field with {@code Plugins#getKey()} as key
|
||||||
* @see Plugin#getKey()
|
* @see Plugin#getKey()
|
||||||
*/
|
*/
|
||||||
public synchronized Map<String, Plugin> getPluginsAsMap()
|
public Map<String, Plugin> getPluginsAsMap() {
|
||||||
{
|
return getPlugins().stream().collect(Collectors.toMap(plugin -> plugin.getKey(), plugin -> plugin));
|
||||||
if ( pluginMap == null )
|
|
||||||
{
|
|
||||||
pluginMap = new java.util.LinkedHashMap<String, Plugin>();
|
|
||||||
if ( getPlugins() != null )
|
|
||||||
{
|
|
||||||
for ( java.util.Iterator<Plugin> it = getPlugins().iterator(); it.hasNext(); )
|
|
||||||
{
|
|
||||||
Plugin plugin = (Plugin) it.next();
|
|
||||||
pluginMap.put( plugin.getKey(), plugin );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return pluginMap;
|
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</code>
|
</code>
|
||||||
|
@ -2298,6 +2280,17 @@
|
||||||
return ( getInherited() != null ) ? Boolean.parseBoolean( getInherited() ) : true;
|
return ( getInherited() != null ) ? Boolean.parseBoolean( getInherited() ) : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
]]>
|
||||||
|
</code>
|
||||||
|
</codeSegment>
|
||||||
|
<codeSegment>
|
||||||
|
<version>4.0.0/4.0.99</version>
|
||||||
|
<code>
|
||||||
|
<![CDATA[
|
||||||
|
@Deprecated
|
||||||
|
public void unsetInheritanceApplied() {
|
||||||
|
}
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</code>
|
</code>
|
||||||
</codeSegment>
|
</codeSegment>
|
||||||
|
@ -2389,20 +2382,12 @@
|
||||||
public void setExtensions(boolean extensions) {
|
public void setExtensions(boolean extensions) {
|
||||||
setExtensions(String.valueOf(extensions));
|
setExtensions(String.valueOf(extensions));
|
||||||
}
|
}
|
||||||
]]>
|
|
||||||
</code>
|
|
||||||
</codeSegment>
|
|
||||||
<codeSegment>
|
|
||||||
<version>4.0.0+</version>
|
|
||||||
<code>
|
|
||||||
<![CDATA[
|
|
||||||
private Map<String, PluginExecution> executionMap = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the {@code executionMap} field to {@code null}
|
* Reset the {@code executionMap} field to {@code null}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void flushExecutionMap() {
|
public void flushExecutionMap() {
|
||||||
this.executionMap = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2410,19 +2395,15 @@
|
||||||
* @see PluginExecution#getId()
|
* @see PluginExecution#getId()
|
||||||
*/
|
*/
|
||||||
public Map<String, PluginExecution> getExecutionsAsMap() {
|
public Map<String, PluginExecution> getExecutionsAsMap() {
|
||||||
if (executionMap == null) {
|
return getExecutions().stream().collect(Collectors.toMap(exec -> exec.getId(), exec -> exec));
|
||||||
executionMap = new java.util.LinkedHashMap<String, PluginExecution>();
|
|
||||||
for (java.util.Iterator<PluginExecution> 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) <id/> elements.\nOffending execution\n\nId: \'" + exec.getId() + "\'\nPlugin:\'" + getKey() + "\'\n\n");
|
|
||||||
}
|
}
|
||||||
executionMap.put(exec.getId(), exec);
|
]]>
|
||||||
}
|
</code>
|
||||||
}
|
</codeSegment>
|
||||||
return executionMap;
|
<codeSegment>
|
||||||
}
|
<version>4.0.0+</version>
|
||||||
|
<code>
|
||||||
|
<![CDATA[
|
||||||
/**
|
/**
|
||||||
* Gets the identifier of the plugin.
|
* Gets the identifier of the plugin.
|
||||||
*
|
*
|
||||||
|
@ -2646,6 +2627,20 @@
|
||||||
setExcludeDefaults(String.valueOf(excludeDefaults));
|
setExcludeDefaults(String.valueOf(excludeDefaults));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the <code>reportPluginMap</code> field to <code>null</code>
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void flushReportPluginMap() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a Map of plugins field with <code>ReportPlugin#getKey()</code> as key
|
||||||
|
* @see org.apache.maven.model.ReportPlugin#getKey()
|
||||||
|
*/
|
||||||
|
public java.util.Map<String, ReportPlugin> getReportPluginsAsMap() {
|
||||||
|
return getPlugins().stream().collect(Collectors.toMap(report -> report.getKey(), report -> report));
|
||||||
|
}
|
||||||
]]>
|
]]>
|
||||||
</code>
|
</code>
|
||||||
</codeSegment>
|
</codeSegment>
|
||||||
|
|
|
@ -163,6 +163,10 @@ public class Ansi implements Appendable {
|
||||||
return org.apache.maven.jline.MessageUtils.isColorEnabled() && org.jline.jansi.Ansi.isEnabled();
|
return org.apache.maven.jline.MessageUtils.isColorEnabled() && org.jline.jansi.Ansi.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setEnabled(final boolean flag) {
|
||||||
|
org.jline.jansi.Ansi.setEnabled(flag);
|
||||||
|
}
|
||||||
|
|
||||||
public static Ansi ansi() {
|
public static Ansi ansi() {
|
||||||
if (isEnabled()) {
|
if (isEnabled()) {
|
||||||
return new Ansi();
|
return new Ansi();
|
||||||
|
|
|
@ -123,7 +123,6 @@ under the License.
|
||||||
<exclude>org.apache.maven.model.*#setOtherLocation(java.lang.Object,org.apache.maven.model.InputLocation):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.*#setOtherLocation(java.lang.Object,org.apache.maven.model.InputLocation):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.ConfigurationContainer#isInheritanceApplied():METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.ConfigurationContainer#isInheritanceApplied():METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.ConfigurationContainer#setInherited(boolean):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.ConfigurationContainer#setInherited(boolean):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.ConfigurationContainer#unsetInheritanceApplied():METHOD_REMOVED</exclude>
|
|
||||||
<exclude>org.apache.maven.model.Contributor#addProperty(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Contributor#addProperty(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Dependency#clearManagementKey():METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Dependency#clearManagementKey():METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.ModelBase#addProperty(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.ModelBase#addProperty(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
||||||
|
@ -132,8 +131,6 @@ under the License.
|
||||||
<exclude>org.apache.maven.model.Notifier#addConfiguration(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Notifier#addConfiguration(java.lang.String,java.lang.String):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Plugin#getGoals():METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Plugin#getGoals():METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Plugin#setGoals(java.lang.Object):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Plugin#setGoals(java.lang.Object):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Reporting#flushReportPluginMap():METHOD_REMOVED</exclude>
|
|
||||||
<exclude>org.apache.maven.model.Reporting#getReportPluginsAsMap():METHOD_REMOVED</exclude>
|
|
||||||
<exclude>org.apache.maven.model.Resource#initMergeId():METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Resource#initMergeId():METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Scm#setChildScmConnectionInheritAppendPath(boolean):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Scm#setChildScmConnectionInheritAppendPath(boolean):METHOD_REMOVED</exclude>
|
||||||
<exclude>org.apache.maven.model.Scm#setChildScmDeveloperConnectionInheritAppendPath(boolean):METHOD_REMOVED</exclude>
|
<exclude>org.apache.maven.model.Scm#setChildScmDeveloperConnectionInheritAppendPath(boolean):METHOD_REMOVED</exclude>
|
||||||
|
|
Loading…
Reference in New Issue