I have the following configuration for resources: 

        src/main/resources        (Contains files for building any war)
        src/main/resources/dev    (Contains files for building only the
development war)
        src/main/resources/qa     (Contains files for building only the
qa war)
        src/main/resources/prod   (Contains files for building only the
production war)

In my pom, I have the following set up for resources:

        <resources>
            <resource>
                <directory>src/main/resources/${environment}</directory>
                <filtering>true</filtering>
            </resource>
        <resources>

${environment} is defined in a profile in pom as well. This allows me to
only pull the files from the folder for which I'm building, i.e. if I'm
building for dev, only the files from the dev folder will be included in
my war, etc.
 
I also need to be able to build the war with the files in
src/main/resources. There are files here that are general files that are
not environment specific. 
 
I tried added the following two solutions:

1.      <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
        </resource>
2.      <resource>
            <directory>src/main/resources/*.*</directory>
            <filtering>true</filtering>
        </resource>

Neither of these seem to work. Only the environment specific files are
being including in the war. 
 
Does anyone know how to accomplish this? 
 
Thanks...
Frank Russo
Senior Developer
FX Alliance, LLC

Reply via email to