Maven deploy when testing
I am testing a sample version of a proprietary jar file. For convenience, I want to make this jar available in my maven repo. However I only want the jar to be included in test deployments of my web application, not production deployments, so if I don't refer to the jar in my pom.xml it won't be deployed with the application.
Will the maven deploy module allow me to do this? Here's the doc I have on mvn deploy, but it does not specify when it is to be used:
mvn deploy:deploy-file -DgroupId=<groupid> -DartifactId=<artifactid> -Dversion=<version> -DgeneratePom=true -Dpackaging=jar -Dfile=<filename>.jar -DrepositoryId=repo -Durl=file:/home/<user>/deploy/repo.war
Or do I want to use mvn install:install-file
for this purpose? Thanks.
If you need the jar in local repository only, go with install:install-file. If you want to make it available in remote repo, go with deploy.
链接地址: http://www.djcxy.com/p/79980.html上一篇: Maven将“发行说明”部署为工件
下一篇: Maven在测试时部署