Skip to content

Implement RelationshipType for all known Maven scopes #213

@nielsm5

Description

@nielsm5

Right now only the compile, runtime, and test scopes are used. Maven only has a total of 6 scopes. It's a shame the code only supports half of them...

private RelationshipType scopeToRelationshipType( String scope, boolean optional )
{
if ( scope == null )
{
return RelationshipType.OTHER;
}
else if ( optional )
{
return RelationshipType.HAS_OPTIONAL_COMPONENT;
}
else if ( scope.equals( "compile" ) || scope.equals( "runtime" ) )
{
return RelationshipType.HAS_DYNAMIC_LINK;
}
else if ( scope.equals( "test" ) )
{
return RelationshipType.DEPENDS_ON;
}
else
{
return RelationshipType.OTHER;
}
}

Please consider adding:

  • provided -> hasProvidedDependency / PROVIDED_DEPENDENCY_OF
  • system -> hasStaticLink / STATIC_LINK
  • import -> this is used for bom (dependency) version enforcing ...

Also javax and jakarta api depdendencies are specifications... hasSpecification?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions