apache / apache/maven-install-plugin

[MINSTALL-198] maven-embedder: second install-file overrides first one

Open
#320 4 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
43
Forks
44
Avg merge
1d 23h
Merged PRs (30d)
11

Description

**[Franz-Josef Färber](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER305087)** opened **[MINSTALL-198](https://issues.apache.org/jira/browse/MINSTALL-198?redirect=false)** and commented

I am using the maven `install:install-file` goal with both cases: Jar-Files containing a pom-file or not, as described in https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html .

While on the command-line the following works:

```bash
mvn install:install-file -Dfile=somefile.jar -DgroupId=somegroup -DartifactId=someartefact -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true

mvn install:install-file -Dfile=someotherfile-containing-a-pom-file.jar
```

using maven-embedder, it does not work: On the second install:install-file goal, the `-DgroupId`, `-Dartifact` parameters from the first call are still somehow present and trigger overriding the first Jar file in the local maven repo.

MRE: https://github.com/fjf2002/78041113-maven-embedder-maven-install-plugin-bug-second-install-file-overrides-first-one

---
No further details from [MINSTALL-198](https://issues.apache.org/jira/browse/MINSTALL-198?redirect=false)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.