e-gineering / gitflow-helper-maven-plugin

An extension and plugin that teaches Maven to work well with gitflow projects and CI servers.
Apache License 2.0
76 stars 21 forks source link

Fix handling of maven aggregator projects with no attachments #77

Closed ukcrpb6 closed 7 years ago

ukcrpb6 commented 7 years ago

Updates AbstractGitFlowBasedRepositoryMojo to Fix #44 Updates pom.xml to add expected code level (inferred from usage of Files.createTempDirectory which is @since 1.7) Updates AbstractGitFlowBasedRepositoryMojo to 1.7 compatibility

Pertaining to #44:

When a pom type artifact is processed, whilst the project artifact has a value it does not have a file and therefore the main artifact is not added to the catalog, this is correct behaviour. However since neither the primary artifact nor the attached artifacts contribute any entries to the catalog this results in an empty file being sent to the repository. Certain repositories, I have tested under nexus 1.9.1, do not allow empty artifacts to be uploaded and therefore this results in an error when processing the promote-master mojo.

This can be resolved by adding a section header to the catalog such that it is of the form:

[artifacts]
group:artifact:extension:classifier-1:version
group:artifact:extension:classifier-2:version

with this the empty version becomes

[artifacts]

and thus behaves as expected

bvarner commented 7 years ago

Excellent catch. Thanks for tracking this down!