maven-install-plugin icon indicating copy to clipboard operation
maven-install-plugin copied to clipboard

[MINSTALL-178] Maven Doesn't Pick Locally Installed Package / Artifact

Open jira-importer opened this issue 3 years ago • 5 comments

Surendra opened MINSTALL-178 and commented

Java Version - 11

mvn clean install is not picking up a locally installed snapshot artifact that is present in the .m2 folder.

It complains with the following warning and then start looking for this artifact in maven central -

 

[DEBUG]  Could not find metadata
<GROUP_ID>:<ARTIFACT_ID>:0.0.1-SNAPSHOT/maven-metadata.xml in local 

 

I checked .m2 directory and it has maven-metadata-local.xml, why does maven look for maven-metadata.xml file? It's a locally installed artifact and maven should be able to pick this up directly. Looks like I'm missing something.


Affects: 3.0.1

jira-importer avatar Oct 19 '22 12:10 jira-importer

Michael Osipov commented

You should provide a sample project for this. Your information is very sparse.

jira-importer avatar Oct 19 '22 20:10 jira-importer

Surendra commented

Michael Osipov I don't have a sample project but I guess the problem statement is very clear. May I know what might cause this issue?

jira-importer avatar Oct 20 '22 03:10 jira-importer

Michael Osipov commented

Even if the statement is clear, but the environment not.

jira-importer avatar Oct 20 '22 11:10 jira-importer

Surendra commented

Michael Osipov please help understand this maven error, when does it happen? Why does maven look for a maven-metadata.xml file?

jira-importer avatar Oct 20 '22 11:10 jira-importer

Slawomir Jaranowski commented

surendra_lilly in your command example mvn clean install two Maven phase are executed: clean and install. Each phase can have configured many goal - some can be default ... but some can be added in your project.

So without simple example which reproduce your problem nobody is able to help.

https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

jira-importer avatar Apr 22 '23 10:04 jira-importer