如何在 Mule 项目中直接在 zip 文件中添加 src/main/app 中的文件夹,而不是在使用 Maven 构建时在 类 中添加文件夹
How to add folder inside src/main/app in Mule project directly inside zip file and not in classes when building using maven
我的 src/main/app
in mule 项目中有一个名为 webapps
的文件夹。此 webapps
文件夹包含一个 war
,它在 mule-config.xml
到 jetty connector
中公开。我在我的 Maven 构建中尝试了很多组合,但是这个 webapps 文件夹最终在 zip
文件中的 classes
中。我想要它就在 zip
里面。
如何在 pom
中实现它?
尝试使用 maven ant 插件。
文件可以在编译后和打包前移动。
阶段:准备包装(就在打包之前)
https://maven.apache.org/guides/mini/guide-using-ant.html
希望对您有所帮助。
因为无法maven
构建 zip
文件,它会直接在根目录下复制 webapps
文件夹。我最终将包含 war
文件的 webapps
文件夹放在 src/main/resources
中。 Maven 构建复制了 类 下的 webapps
文件夹。 mule-config
将其称为
<jetty:connector name="Jetty" doc:name="Jetty">
<jetty:webapps port="${jetty.port}" host="${jetty.host}" directory="${app.home}/classes/webapps" />
</jetty:connector>
我的 src/main/app
in mule 项目中有一个名为 webapps
的文件夹。此 webapps
文件夹包含一个 war
,它在 mule-config.xml
到 jetty connector
中公开。我在我的 Maven 构建中尝试了很多组合,但是这个 webapps 文件夹最终在 zip
文件中的 classes
中。我想要它就在 zip
里面。
如何在 pom
中实现它?
尝试使用 maven ant 插件。
文件可以在编译后和打包前移动。 阶段:准备包装(就在打包之前)
https://maven.apache.org/guides/mini/guide-using-ant.html
希望对您有所帮助。
因为无法maven
构建 zip
文件,它会直接在根目录下复制 webapps
文件夹。我最终将包含 war
文件的 webapps
文件夹放在 src/main/resources
中。 Maven 构建复制了 类 下的 webapps
文件夹。 mule-config
将其称为
<jetty:connector name="Jetty" doc:name="Jetty">
<jetty:webapps port="${jetty.port}" host="${jetty.host}" directory="${app.home}/classes/webapps" />
</jetty:connector>