java - Isn't maven-deploy-plugin aware of the pom in which I declared it as a build plugin? -


i have maven project. in pom declared group id, artifact id, version.

i declared maven-deploy-plugin build plugin, goal of deploy:deploy-file.

then launched maven eclipse same goal, wuth -durl declared jvm arg.

maven build fails saying did not supply groupid, artifactid, package, file not defined.

why doesn't values pom?

there must way ti tell plugin use pom values, right? because maven people believe in die-dry - duplication evil, don't repeat yourself? otherwise, create artefact distribution contradicts pom?

  1. why, doesn't plugin know wish deploy project, including source , not single jar or pom?

  2. why, doesn't plugin know should @ pom artifactid declaration groupid , artifactid.

rant:

  • if these features missing, though hope not mmissing - why, doesn't plugin developer feel these important features?

the goal deploy:deploy-file used deploy artifacts, not built maven, why have specify parameters.

to deploy artifact, built maven (a normal maven project), should use deploy goal , specify target repository in pom.xml distributionmanagement element, this:

<distributionmanagement>     <repository>         <uniqueversion>false</uniqueversion>         <id>corp1</id>         <name>corporate repository</name>         <url>file:///home/myfolder/.m2</url>         <layout>default</layout>     </repository> </distributionmanagement> 

then can call mvn deploy in project root.

that default maven way deploy projects maven repository.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -