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 "Artifact has not been packaged yet" error #3198

Closed
GCHQDeveloper314 opened this issue Apr 25, 2024 · 0 comments · Fixed by #3199
Closed

Maven "Artifact has not been packaged yet" error #3198

GCHQDeveloper314 opened this issue Apr 25, 2024 · 0 comments · Fixed by #3199
Assignees
Labels
bug Confirmed or suspected bug
Milestone

Comments

@GCHQDeveloper314
Copy link
Member

Describe the bug
When Gaffer is opened in IDEs which use M2Eclipse/m2e some modules are shown as having an error against their POMs.

The modules with this problem are:

  • map-rest
  • accumulo-rest
  • federated-demo
  • road-traffic-rest
  • basic-rest

The same error occurs when running mvn compile with these modules.

To Reproduce
Open Gaffer in an IDE using m2e.
OR
Run mvn compile -am -pl :map-rest.

Expected behaviour
These errors shouldn't be seen because the POM works as expected and/or the project otherwise works correctly in the IDE.

Stack trace and errors

Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.5.0:unpack (unpack) on project map-rest: Artifact has not been packaged yet. When used on reactor artifact, unpack should be executed after packaging: see MDEP-98.

Additional context
This problem sometimes disappears after a full build has been performed. It appears to be caused by plugin configuration which takes a previously packaged artifact and unpacks it to reuse it as part of the module. If this artifact doesn't exist then the error occurs.

@GCHQDeveloper314 GCHQDeveloper314 added the bug Confirmed or suspected bug label Apr 25, 2024
@GCHQDeveloper314 GCHQDeveloper314 added this to the v2.2.1 milestone Apr 25, 2024
@GCHQDeveloper314 GCHQDeveloper314 self-assigned this Apr 25, 2024
GCHQDeveloper314 added a commit that referenced this issue Apr 26, 2024
* Change unpack phase from compile to prepare-package
Unpack is not required for the compile phase and this fixes a problem where compile fails

* Ignore unpack goal in m2e
This goal is not relevant to m2e. See https://eclipse.dev/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata for info on the syntax.

* Upgrade plugin version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant