[英]Migrating Ant targets to Maven goals
I am migrating existing Ant project to Maven. 我正在将现有的Ant项目迁移到Maven。 But I am facing a problem while building the project in Maven as I have to achieve the existing targets.
但是我在Maven中构建项目时遇到了问题,因为我必须实现现有目标。
I want to copy the files based on ENV I passed. 我想根据通过的ENV复制文件。 In Ant I am using like below:
在Ant中,我使用如下所示:
<fileset dir="${scripts.dir}" />
<filtermapper>
<replacestring from=".${param.environment}" to="" />
</filtermapper>
EDIT I have achived this: 编辑我已经做到了这一点:
Edit 编辑
Now I want to keep my files as below: 现在,我想保留我的文件,如下所示:
If you want a custom build output structure, then you should take a look at this post . 如果您想要一个自定义构建输出结构,那么您应该看看这篇文章 。
You might want to familiarize yourself with the concept of Maven build profiles , that should allow you to have different build configurations based on an external setting. 您可能想熟悉Maven构建配置文件的概念,它应该允许您基于外部设置具有不同的构建配置。
If you want to copy files as a part of Maven built, then you should take a look at the Maven Copy Resources plugin 如果要复制文件作为Maven构建的一部分,那么应该看看Maven复制资源插件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.