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: creating a project property from dependency details
Date Mon, 16 Sep 2013 18:15:02 GMT
I get the feeling there is something about the maven approach to doing
things that we are failing you by not explaining correctly.

The really annoying, for me, thing is that you keep coming close to the
established best ways... And then just at the last second you swerve
violently left/right to hijack and abuse properties and classifiers.

We need the big picture, then we can try and provide our considered view
and hopefully then you can either shine a light on where we were failing
you or you can show us how we are wrong and how your approach is more
obvious, less hacky and leads to a simpler overall build once encapsulated
in an appropriate plugin(s) / build extension(s) / packaging lifecycle(s)

The stuff you describe is *screaming* hack layered on hack layered on
hack... Which is an anti pattern to my mind

On Monday, 16 September 2013, Richard Sand wrote:

> Hi all,
>
>
>
> I’ve a project where I’m creating an assembly from a zipped up app server
> and a war file pre-deployed. The war file may be one of several different
> versions and (optionally) classifiers, which I provide via build
> properties:
>
>
>
>                                              <dependency>
>
>
> <groupId>com.idfconnect</groupId>
>
>
> <artifactId>myapp</artifactId>
>
>
> <version>${myapp.version}</version>
>
>
> <classifier>${myapp.classifier}</classifier>
>
>
> <type>war</type>
>
>                                              </dependency>
>
>
>
> I want to take the actual filename of the above dependency and inject it
> into a configuration file (e.g. a Tomcat context.xml file) using the
> codehaus template plugin. So the xml file would have something like:
>
>
>
> <Context path="/myapp" docBase="../app/${myapp.filename}">
>
>
>
> So I’d like to have this property “myapp.filename” determined dynamically
> based upon the dependency, mainly because the classifier may be blank,
> which makes it annoying to generate the proper filename. Is there a way I
> can instruct maven to derive the proper filename from the dependency, or do
> I need to write a plug-in to do this?
>
>
>
> I figure the template plugin could also be useful for things like inserting
> this information into a README file.
>
>
>
> Thanks for any advice!
>
>
>
> -Richard
>


-- 
Sent from my phone

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