private ArtifactVersion extractArtifactVersion( boolean uniqueVersions, boolean usePremanagedVersion )
{
if ( usePremanagedVersion && node.getPremanagedVersion() != null )
{
return new DefaultArtifactVersion( node.getPremanagedVersion() );
}
Artifact artifact = node.getArtifact();
String version = uniqueVersions ? artifact.getVersion() : artifact.getBaseVersion();
if ( version != null )
{
return new DefaultArtifactVersion( version );
}
try
{
return artifact.getSelectedVersion();
}