Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flattenMode=oss leaves repositories, contra docs #362

Open
jglick opened this issue Jun 13, 2023 · 0 comments
Open

flattenMode=oss leaves repositories, contra docs #362

jglick opened this issue Jun 13, 2023 · 0 comments

Comments

@jglick
Copy link

jglick commented Jun 13, 2023

/**
* 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
Vlatombe added a commit to Vlatombe/plugin-pom that referenced this issue Jul 6, 2023
This workarounds mojohaus/flatten-maven-plugin#362

and strips <repositories> from deployed pom for plugins using JEP-229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant