Hi all,

I'm having a hell of a time getting this to work with web.xml files.  Is
there an example I can look at that produces a bundle and then consumes
one?  If there are any uses of this where the template file is an XML file,
that'd be really useful.

I'm trying to do this using a web.xml file as the 'template' to be exported
to other modules.  Here is what I have so far:

=== Creating the bundle (source module) ===
<plugin>
  <artifactId>maven-remote-resources-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>bundle</goal>
      </goals>
      <configuration>
        <resourcesDirectory>${basedir}/src/main/webapp</resourcesDirectory>
        <includes>
          <param>**/*.xml</param>
        </includes>
      </configuration>
    </execution>
  </executions>
</plugin>

== Consuming the bundle (dependent module) ==
<plugin>
  <artifactId>maven-remote-resources-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>process</goal>
      </goals>
      <configuration>
        <resourceBundles>

<resourceBundle>${project.groupId}:moduleName:${project.version}</resourceBundle>
        </resourceBundles>
      </configuration>
    </execution>
  </executions>
</plugin>

When I look in the dependent module's
target\maven-shared-archive-resources\WEB-INF directory, there is nothing
there - no web.xml file.  Any ideas?

Cheers,

Les

On Thu, Feb 26, 2009 at 10:31 AM, Jason van Zyl <[email protected]>wrote:

> The remote-resources-plugin. This is exactly how we share license templates
> across projects. So if you have a web.xml template you want to be used
> across many projects I would take a look at  ^^^^^^^^
>
>
> On 25-Feb-09, at 4:33 PM, Les Hazlewood wrote:
>
>  I have a webapp that can be deployed as one .war (development) or as two
>> separate .war files (production w/ firewall in between the two).  I have 3
>> web modules to reflect this.
>>
>> web-colocated
>> web-front
>> web-back
>>
>> The web.xml file for each .war is nearly identical, save the spring files
>> listed to start up an ApplicationContext in each .war.
>>
>> How can I share a single web.xml file across all 3, but filter in
>> different
>> values for the comma-delimited spring file list based on profile?  Where
>> would that master "template" web.xml file live?  Or is there another way
>> to
>> go about this?
>>
>> Thanks,
>>
>> Les
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ----------------------------------------------------------
>
> A party which is not afraid of letting culture,
> business, and welfare go to ruin completely can
> be omnipotent for a while.
>
>  -- Jakob Burckhardt
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to