![](/img/trans.png)
[英]Adding dependent project's properties file to the build target folder in Maven
[英]Maven Target folder properties
我想您要實現的目標是將構件復制到構建時的Web服務器部署目錄。
可以使用maven-resources-plugin
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${tomcat_home}/webapps</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/eBuddy</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
用這個
<profiles>
<profile>
<id>myDirectory</id>
<build>
<directory>your-preffered-directory</directory>
</build>
</profile>
</profiles>
mvn編譯-PmyDirectory
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.