Two mini-projects that share a common code base as a dependency but have a single file in each project log4j.xml
Just build the one that you want.

Ron


On 31/10/2012 6:23 PM, Mike Summers wrote:
I'm trying to use a combination of resources and remote-resources plugin to
manage common production configuration files and still allow for some
latitude during development. The effect I want is any src/main/resources
file that also exists in the common set is replaced by the common file
during rpm build.

As a for instance, we have a standard log4j.xml file that everyone should
deploy to Prod with, but it's not terribly useful during Dev.

The resources section of my pom looks like:

<resources>
<resource>
<directory>
${project.build.directory}/maven-shared-archive-resources/
</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}/src/main/resources/</directory>
<filtering>true</filtering>
<excludes>
<exclude>log4j.xml</exclude>
</excludes>
</resource>
</resources>

And the remote-resources config is:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.4</version>
<configuration>
<resourceBundles>
<resourceBundle>
com.my.commons:my-commons-logging-resources:${my.commons.logging.resources}
</resourceBundle>
</resourceBundles>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<id>process-remote-resources</id>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>


The common log4j.xml file is not being picked-up and the local
(src/main/resources) version is always showing-up even in the remote
plugin's resource directory.

Should this work? Am I on the right track? Is there a better approach?

Thanks in advance.



--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to