0

I have my environment specific property files in main/src/env/dev, qa, prod, etc. and I want to include them in my myProject-sources.jar. What I cannot figure out is how to get the "env" folder to be included. Right now I get dev, qa, and prod folders directly in the root of the sources jar.

Here is what my plugin configuration looks like:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>add-environment-specific-properties</id>
            <phase>process-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${basedir}/src/main/env</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

I cannot specify just /src/main, because there are other folders under there that I do NOT want included.

I am hoping that I am just missing something simple, and not that I have to put a bunch of exclusions in somehow to skip all the stuff I don't want.

pjanssen
  • 1,065
  • 13
  • 35
cneff
  • 388
  • 6
  • 15
  • You might have to perform a copy before the add-source, as I don't think add-source has any filtering. – Paul Grime Apr 03 '13 at 14:32
  • If you like to add the whole folder use the addResources goal of the build-helper-maven plugin, cause resources are no sources which need to be compiled. – khmarbaise Apr 03 '13 at 16:33

0 Answers0