[英]Maven - changing deployed artifact name
when i deploy an artifact ( Liferay Portal theme ) to Tomcat , it is stored in directory webapps/artifactId-version/
. 当我将工件( Liferay Portal主题 )部署到Tomcat时 ,它存储在目录webapps/artifactId-version/
。 However, I do need for directory to be named without the version suffix. 但是,我确实需要为目录命名时不带版本后缀。 How can I accomplish that? 我该怎么做?
Thanks. 谢谢。
您没有描述如何部署,但是我认为这应该可以解决问题: http : //maven.apache.org/pom.html#Build将project.build.finalName更改为
<finalName>${project.artifactId}</finalName>
Okay, it was Liferay Portal specific issue. 好的,这是Liferay Portal的特定问题。 What worked for me was adding liferay-plugin-package.properties
file. 对我liferay-plugin-package.properties
是添加liferay-plugin-package.properties
文件。 Although there isn't anything close to name-like info in it (maybe it is because of <module-incremental-version>
), if this file is present, it names the deployed folder without the version suffix. 尽管其中没有任何类似于名称的信息(可能是由于<module-incremental-version>
),但如果存在此文件,它将命名已部署的文件夹,而没有版本后缀。
Use recommended-deployment-context
configuration. 使用recommended-deployment-context
配置。 That will make Liferay's deployer rename your artifact before deploying it into Tomcat. 这将使Liferay的部署者在将其工件部署到Tomcat之前对其重命名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.