You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aitor Iturriondobeitia <la...@gmail.com> on 2015/05/19 20:56:15 UTC
copy file renaming to WEB-INF
hello
i have some files into one directory:
jboss-ejb-client_local.xml
jboss-ejb-client_pre.xml
jboss-ejb-client_prod.xml
i have into my pom some profiles, one for each file (local, pre. prod)
if i compiel for one profile, for example, pre, i need to copy the pre file
(jboos-ejb-client_pre.xml to WEB-INF with the name jboss-ejb-client.xml
can i make this using maven?
can you help me?
thanks
Re: copy file renaming to WEB-INF
Posted by Greg Trasuk <tr...@stratuscom.com>.
Hello Aitor:
Using profiles is really the wrong way to do this. You are better off to realize that you have three separate artifacts that are being generated:
- The “.war” file for ‘pre’
- The “.war” file for ‘local’
- The “.war” file for ‘prod’.
You should treat these as separate artifacts, with a separate artifact-id, otherwise, how do you know that a given artifact was built using the correct profile? You don’t want to risk installing your ‘pre’ build into production, do you?
That being the case, you should have three separate assembly projects that generate the separate artifacts.
Cheers,
Greg Trasuk
Web Age Solutions http://www.webagesolutions.com <http://www.webagesolutions.com/>
> On May 19, 2015, at 2:56 PM, Aitor Iturriondobeitia <la...@gmail.com> wrote:
>
> hello
>
> i have some files into one directory:
> jboss-ejb-client_local.xml
> jboss-ejb-client_pre.xml
> jboss-ejb-client_prod.xml
>
> i have into my pom some profiles, one for each file (local, pre. prod)
> if i compiel for one profile, for example, pre, i need to copy the pre file
> (jboos-ejb-client_pre.xml to WEB-INF with the name jboss-ejb-client.xml
>
> can i make this using maven?
>
> can you help me?
>
> thanks