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

maven install failes: plugin for this project did not assign a main file to the project #9

Open
ChrWeissDe opened this issue May 21, 2024 · 2 comments

Comments

@ChrWeissDe
Copy link
Contributor

Starting from version >= 3.x the behaviour of the maven-install-plugin changed.
It is not longer possible to install "attached artefacts" only.

Thus when running a build with a new maven-install-plugin version you might see the following error:
--> failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-install) on project <project_name>: NoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]

The issue is also discussed here: https://issues.apache.org/jira/browse/MINSTALL-151

@ChrWeissDe
Copy link
Contributor Author

Possible workaround is to use either "old plugins" - or to define the allowIncompleteProjects for the maven-install-plugin:
see: https://github.com/ot4i/ace-maven-plugin/blob/feature/java17/samples/SumAPI/Calculator_LIB/pom.xml

next step is to check if we can define a "primary artifact" within the plugin itself;

@ChrWeissDe
Copy link
Contributor Author

Current code which is used for the bar packaging:
https://github.com/ot4i/ace-maven-plugin/blob/feature/java17/ace-maven-plugin/src/main/java/ibm/maven/plugins/ace/mojos/PackageaceBarMojo.java

Uses "under the cover":

  • assemblies/ace-bar-project.xml
  • maven-source-plugin (to attach the source code - if requested)
  • build-helper-maven-plugin to attach the bar file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant