the full error :
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.959 s
[INFO] Finished at: 2022-07-18T10:49:26 01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file (default-cli) on project projectt: The parameters 'file' for goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file are missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
and this is my commande :
mvn clean package -Dmaven.test.failure.ignore=true deploy:deploy-file -Durl=file://C:\Users\username\.m2\repository -DgroupId=com.projectt.api -DartifactId=projectt -Dversion=1.1 -DgeneratePom=true
-Dpackaging=jar -DrepositoryId=deploymentRepo -Durl=http://localhost:8081/repository/maven-releases/ -Dfile=target/projectt-1.1.jar
*im deploying locally
CodePudding user response:
You're either referring to a missing file target/projectt-1.1.jar
or you're missing a backslash at end of the first line.
Tip: you shouldn't need to specify groupId
/artifactId
/version
if the jar file is built with maven (i.e. contains a pom.xml
file) and you're not overriding the values in the pom.xml
file. Haven't tested this, I'm merely assuming on the working of the maven-install-plugin:install-file
task. Give it a try and let me know.