Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Note: this story affects maven-install-plugin and maven-deploy-plugin equally.
Currently, in DefaultProjectInstaller, if a project does not have literally "pom" as packaging, then if there are no other artifacts, install:install fails (as does deploy:deploy) with
NoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'.
However, for some custom lifecycles (and therefore different packaging types), we might want to be able to have a lifecycle that just installs/deploys the pom file alone with no additional artifacts.
Further, if a plugin explicitly sets the main artifact (via MavenProject.setArtifact) to the `ProjectArtifact`, aka the pom file itself (which I tried as a work around), then install and deploy perform the same action twice (which would then break deploy, if the maven central repo blocks duplicate pushes, as we have setup in our Nexus environment for release (non-snapshot) artifacts)
Our use case might be weird, but we want to be able to use maven to lookup version updates for it, even though the artifacts themselves are not in maven (our use case is docker, helm charts, etc).
I see this as a relatively simple fix in the above mentioned class, and am happy to contribute a pull request for it.
Attachments
Issue Links
- is fixed by
-
MINSTALL-189 Add parameter to lax project validation
- Closed
- is related to
-
MINSTALL-118 MavenProject with only attachments must have packaging "pom"
- Closed
- relates to
-
MINSTALL-151 Projects without primary artifacts, but with attachment artifacts fail install
- Closed