Issue
I ran the following command to install a custom jar in my local repository:
mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -Dfile=<path-to-file>
but when i try this:
mvn install:install-file -Dfile=E:\jarFiles\utill-1.0.jar -DlocalRepositoryPath=E:\repo
it gives me the following error:
The artifact information is incomplete or not valid:
[ERROR] [0] 'groupId' is missing.
[ERROR] [1] 'artifactId' is missin
[ERROR] [2] 'packaging' is missing
[ERROR] [3] 'version' is missing.
Solution
You have to provide that information (groupId, artifactId, packaging, version) too.
mvn install:install-file -Dfile=path-to-your-artifact-jar \
-DgroupId=your.groupId \
-DartifactId=your-artifactId \
-Dversion=version \
-Dpackaging=jar \
-DgeneratePom=true
Check here for more details
Answered By - Abimaran Kugathasan
Answer Checked By - David Marino (JavaFixing Volunteer)