All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.serendigity.maven.plugin.lifecycle.helper.vo.MavenExecutionSummary Maven / Gradle / Ivy

Go to download

A Maven 3.x plugin to inspect the lifecycle of your project. The plugin provides goals aimed at helping to inspects your project lifecycle phases and if a plugin-goal is executed and when. It includes the ability to list all plugin-goal mapping to executed phases and group the execution plan result by lifecycle/phases/plugin/goal.

There is a newer version: 1.2.1
Show newest version
package it.serendigity.maven.plugin.lifecycle.helper.vo;

import java.util.HashMap;
import java.util.Map;

public class MavenExecutionSummary {

	private Map attributeMaxStringLength;

	public MavenExecutionSummary() {
		attributeMaxStringLength = new HashMap<>();
	}

	public void updateSummary( MavenExecutionInfo executionInfo ) {

		updateMaxStringLength( executionInfo );
	}

	protected void updateMaxStringLength( MavenExecutionInfo executionInfo ) {

		MavenExecutionAttribute[] values = MavenExecutionAttribute.values();

		for ( MavenExecutionAttribute mavenExecutionAttribute : values ) {

			String key = mavenExecutionAttribute.getCode();

			int newStringLength = executionInfo.getStringLength( mavenExecutionAttribute );
			Integer oldMaxStringLength = attributeMaxStringLength.get( key );

			if ( oldMaxStringLength == null || oldMaxStringLength.compareTo( newStringLength ) < 0 ) {
				attributeMaxStringLength.put( key, newStringLength );
			}

		}

	}

	public int getMaxStringLength( MavenExecutionAttribute attribute ) {
		

		return attributeMaxStringLength.get( attribute.getCode() );
	
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy