gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.75k stars 354 forks source link

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

Closed GCHQDeveloper314 closed 2 months ago

GCHQDeveloper314 commented 2 months ago

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:

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.