Skip to content

flattenMode=oss leaves repositories, contra docs #362

@jglick

Description

@jglick

/**
* For Open-Source-Software projects that want to keep all {@link FlattenDescriptor optional POM elements} except
* for {@link Model#getRepositories() repositories} and {@link Model#getPluginRepositories() pluginRepositories}.
*/
oss,
and
* <td>oss</td>
* <td>For Open-Source-Software projects that want to keep all {@link FlattenDescriptor optional POM elements}
* except for {@link Model#getRepositories() repositories} and {@link Model#getPluginRepositories()
* pluginRepositories}.</td>
yet
case oss:
descriptor.setCiManagement(ElementHandling.expand);
descriptor.setContributors(ElementHandling.expand);
descriptor.setDistributionManagement(ElementHandling.expand);
descriptor.setInceptionYear(ElementHandling.expand);
descriptor.setIssueManagement(ElementHandling.expand);
descriptor.setMailingLists(ElementHandling.expand);
descriptor.setOrganization(ElementHandling.expand);
descriptor.setPrerequisites(ElementHandling.expand);
// $FALL-THROUGH$
case ossrh:
descriptor.setName(ElementHandling.expand);
descriptor.setDescription(ElementHandling.expand);
descriptor.setUrl(ElementHandling.expand);
descriptor.setScm(ElementHandling.expand);
descriptor.setDevelopers(ElementHandling.expand);
// $FALL-THROUGH$
case defaults:
descriptor.setRepositories(ElementHandling.expand);
break;
does not

descriptor.setRepositories(ElementHandling.remove);

as the docs imply. This can cause an error staging to Nexus:

Release repository is not allowed

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