0

I am migrating existing Ant project to Maven. But I am facing a problem while building the project in Maven as I have to achieve the existing targets.

I want to copy the files based on ENV I passed. In Ant I am using like below:

<fileset dir="${scripts.dir}" />
            <filtermapper>
                <replacestring from=".${param.environment}" to="" />
            </filtermapper>

EDIT I have achived this:

enter image description here

Edit

Now I want to keep my files as below:

enter image description here

Chowdappa
  • 1,580
  • 1
  • 15
  • 31
  • Could you explain what it is you want to do exactly? It's really unclear from your question. – Tunaki Jan 29 '16 at 09:23
  • Why have the 2 targets have to run one after another ? What is the expected output format ? – Hendrik Jander Jan 29 '16 at 10:04
  • @jah, I missed 1 point to add, I have to run 1 *-build.xml for one region (It takes 1 set of properties like DB credentials, web services details and etc) and After I deploy that I may run for another region with second *-build.xml. – Chowdappa Jan 29 '16 at 11:44
  • Could you be more specific regarding your last comment. – Hendrik Jander Jan 29 '16 at 12:34

1 Answers1

0

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.

If you want to copy files as a part of Maven built, then you should take a look at the Maven Copy Resources plugin

Community
  • 1
  • 1
Peter G. Horvath
  • 535
  • 1
  • 3
  • 15