Salil Surendran
Salil Surendran

Reputation: 2335

No plugin found for prefix


I am trying to deploy a file to a remote repository using the command:

mvn deploy:deploy-file –DgroupId=io.mymetrics -DartifactId=metrics-core -Dversion=4.0.0- -Dpackaging=jar –Dfile=/Users/ssurendran/code/telemetry2/metrics/lib/mymetrics-core.jar -DrepositoryId=releases –Durl=http://maven.mycompany.com/nexus/content/repositories/central/

I get this error message:
No plugin found for prefix '–Durl=http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/ssurendran/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

Upvotes: 0

Views: 5891

Answers (1)

Daniel
Daniel

Reputation: 4221

I don't know if it is a result of unfortunate copy-pasting, but a couple of things come to mind:

  • There is a dash at the end of the version flag.
  • The dashes before DgroupId, Dfile and Durl are long dashes (0xe28093) and should be regular hyphen/minus characters (0x2d).

The long dashes will confuse mvn on some platforms. Just change them to hyphen/minus characters and it should work.

The reason it got stuck on the string "–Durl=http" is that it is trying to parse the entire last string as a plugin command (<plugin>:<goal>) and your URL includes a colon.

Upvotes: 3

Related Questions