Difference between revisions of "Deploying Single Files with Maven"
m (Fix packaging.) |
(Add command-line to add the sources of a JAR file, too.) |
||
| Line 8: | Line 8: | ||
# mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' | # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' | ||
| + | |||
| + | To additionally install the sources for a JAR file, use: | ||
| + | |||
| + | # mvn install:install-file -Dfile=''file'' -DgroupId=''groupId'' -DartifactId=''artifactId'' -Dpackaging=jar -Dversion=''version'' -Dclassifier=sources | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:Java]] | [[Category:Java]] | ||
[[Category:Maven]] | [[Category:Maven]] | ||
Revision as of 20:59, 4 September 2013
In order to deploy single files that are not controlled by Maven, you need the deploy:deploy-file goal.
# mvn deploy:deploy-file -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version -DrepositoryId=repositoryId -Durl=scp://host/path
The repository ID is necessary in case you have authentication information defined for your repository.
To install a file only locally, use:
# mvn install:install-file -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version
To additionally install the sources for a JAR file, use:
# mvn install:install-file -Dfile=file -DgroupId=groupId -DartifactId=artifactId -Dpackaging=jar -Dversion=version -Dclassifier=sources