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
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