I want to push the bahir jar to my local m2 repository. I'm using maven-3.5.0 downloaded tar.gz and jdk8, both are set as environment variables and are working fine.

I built apache bahir for spark from the available download from git using maven, which was BUILD SUCCESS and it created a target folder which has the jar called bahir-parent_2.11-2.3.0-SNAPSHOT-tests.jar

now when I execute:

$mvn install:install-file -Dfile=/home/awisha/trial/bahir-master/target/bahir-parent_2.11-2.3.0-SNAPSHOT-tests.jar -DgroupId=org.apache.bahir -DartifactId=spark-streaming-mqtt_2.11 -Dversion=2.2.0

Its supposed to push the jar to my local .m2/repository. But instead it gives me the following error:

[ERROR]   Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The artifact information is incomplete or not valid:
[ERROR]   [0]  'packaging' is missing.

But when I used "apt install maven" : maven-3.3.9, I got BUILD SUCCESS I'm not able to figure out why is it giving me error when using maven-3.5.0.

1

There are 1 best solutions below

0
On

You need to simply add "-Dpackaging=jar" to your mvn install:install-file cmd:

$mvn install:install-file -Dpackage=jar -Dfile=/home/awisha/trial/bahir-master/target/bahir-parent_2.11-2.3.0-SNAPSHOT-tests.jar -DgroupId=org.apache.bahir -DartifactId=spark-streaming-mqtt_2.11 -Dversion=2.2.0