maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: dynamically select resources and apply filtering
Date Tue, 26 Feb 2013 15:43:29 GMT
I have an answer on Stack Overflow that might help your thought processes:
http://stackoverflow.com/questions/14650468/whats-a-practicable-way-for-automated-configuration-versioning-and-deployment/14661186#14661186


On 26 February 2013 15:06, Jean-Noël Colin <jn.colin@gmail.com> wrote:

> so your suggestion would be to have maven do the compile, and a kind of
> 'war:exploded', and then run ant to add the customized files and create the
> war file, is that correct?
>
> or should I write a plugin that does that for me?
>
> You write: "Separating run-time deployment from Maven is a best practice";
> but then, what should I use to customise and deploy distribution kits?
>
> Best
>
> Jean-Noël
>
> On 26 Feb 2013, at 10:01, Ron Wheeler <rwheeler@artifact-software.com>
> wrote:
>
> > On 26/02/2013 2:54 AM, Baptiste MATHUS wrote:
> >> I *think* Ron means: using maven to produce your standard artifacts
> >> (jar/war/ear ?), and then use pure ant somewhere in the process just
> before
> >> deploying for a specific customer to do the replacements you're talking
> >> about.
> >>
> >> (By the way, invoking ant from maven (using antrun-maven-plugin) should
> >> always be considered something bad and temporary. Writing or using a
> >> dedicated maven plugin is the way to go).
> >>
> > Exactly.
> > My suggestion would be to run the ant after all the maven work is
> complete and you have a full set of release files in your repo
> > Have Ant (or some other process) merge the released code with
> configuration files, logos, etc to make distribution kits.
> >
> > Ron
> >> 2013/2/26 Jean-Noël Colin <jn.colin@gmail.com>
> >>
> >>> Hi Ron,
> >>>
> >>> Do you mean invoking the ant plugin from the pom.xml file? I was
> wondering
> >>> whether this was a good practice, or something to be kept only for
> >>> situations where you really can't avoid it
> >>>
> >>> Best regards
> >>>
> >>> Jean-Noël
> >>>
> >>> On 25 Feb 2013, at 21:31, Ron Wheeler <rwheeler@artifact-software.com>
> >>> wrote:
> >>>
> >>>> Why not move the production of the software to Maven and leave the
> >>> assembly in Ant.
> >>>> That would give you the best of both worlds.
> >>>>
> >>>>
> >>>> On 25/02/2013 2:41 PM, Jean-Noël Colin wrote:
> >>>>> Hi
> >>>>>
> >>>>> I'm trying to migrate my project from ant to maven, but I'm facing
a
> >>> few difficulties; I need to build my project for different environments
> >>> (customers, so possibly a long list). In my ant project, I had several
> >>> .properties file, one per customer; in this file, I had properties
> used to
> >>> customize some config file; I managed to use resource filtering to
> achieve
> >>> this.
> >>>>> However, some properties defined a filename that needed to be copied
> to
> >>> the war archive, but under a common name. For instance, I had several
> >>> logos: logo_customer1.jpg, logo_customer2.jpg, logo_customer3.jpg; the
> >>> source file name was specified in the properties file
> >>> (customer1.properties, customer2.properties, customer3.properties),
> but the
> >>> destination was always logo.jpg. How can I do that?
> >>>>> Second, the properties file defines the name of the file (resources)
> to
> >>> be filtered. For instance, I have a template for working with Spring
> >>> Security in LDAP environment and another template when working when
> Active
> >>> Directory; the customer properties file defined the name of the
> template to
> >>> use, but in both cases, the result file needs to be
> >>> applicationContext-security.xml. How can i achieve this? Or is there a
> way
> >>> to define conditional profiles so that in the customer .properties
> file, I
> >>> would say LDAP or AD, and based on that value, different profile would
> be
> >>> used?
> >>>>> Many thanks for your help
> >>>>>
> >>>>> Jean-Noël
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>>>> For additional commands, e-mail: users-help@maven.apache.org
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> Ron Wheeler
> >>>> President
> >>>> Artifact Software Inc
> >>>> email: rwheeler@artifact-software.com
> >>>> skype: ronaldmwheeler
> >>>> phone: 866-970-2435, ext 102
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>>> For additional commands, e-mail: users-help@maven.apache.org
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>> --
> >>> Baptiste <Batmat> MATHUS - http://batmat.net
> >>> Sauvez un arbre,
> >>> Mangez un castor ! nbsp;! <users-help@maven.apache.org>
> >>>
> >
> >
> > --
> > Ron Wheeler
> > President
> > Artifact Software Inc
> > email: rwheeler@artifact-software.com
> > skype: ronaldmwheeler
> > phone: 866-970-2435, ext 102
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message