I also tried reverting my change, and changing the warpath plugin configuration so it now says:

<configuration>
<warpathExcludes>applicationContext- resources.xml,ApplicationResources*.properties,ehcache.xml,hibernate.cfg .xml,jdbc.properties,log4j.xml,mail.properties,persistence.xml</ warpathExcludes>
</configuration>

i.e. everything in the excludes on one line. Even if I'm somehow not picking up a binary of the plugin that includes the fix you referred to, this should now work if the plugin does indeed influence war overlay behavior the way you suggest it does.

Same result: hibernate.cfg.xml is still being included in the war file. Any ideas?


Cheers
Rob

On 25-Feb-07, at 9:05 PM, Rob van Oostrum wrote:

That's what I was looking at originally. I was already working against 2.0-M4-SNAPSHOT and didn't have any luck. I tried running 'mvn -U' and running 'mvn install' against a trunk working copy of the plugin as well to make sure my repository had the latest and greatest, again all without luck. After reading the the plugin docs ("The filter that determines the resources, from the dependent war's WEB-INF/classes directory, to exclude from the classpath. Note that excludes takes priority over includes. The default is the empty string, i.e. exclude nothing.") I got the impression that it was a tool for compiler classpath manipulation. The documentation doesn't seem to suggest the plugin does more than that.

R.

On 25-Feb-07, at 8:52 PM, Matt Raible wrote:

This should be fixed in 2.0-m4-SNAPSHOT.  You can fix it the way you
have done, or exclude files from the warpath plugin. The warpath
plugin is better because that will exclude it from your classpath as
well.

http://issues.appfuse.org/browse/APF-571

Matt

On 2/25/07, Rob van Oostrum <[EMAIL PROTECTED]> wrote:
Didn't see this mentioned before going through my archives, so forgive me if
this is old news, but I thought it might save some people some
troubleshooting. Of course, it would be nice to have this incorporated in
the modular archetypes.

When I create a new project using the modular Spring MVC archetype, there is a hibernate.cfg,xml file in core/src/main/resources, which gets ignored at runtime because maven-war-plugin overlays a copy in WEB-INF/ classes that
gets picked up instead.

I added this to my web project's pom.xml to fix this:

<build>
  <plugins>

    [...]

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <version>2.0.2</version>
      <configuration>

<dependentWarExcludes>WEB-INF/classes/hibernate.cfg.xml</ dependentWarExcludes>

      </configuration>
    </plugin>

    [...]

  </plugins>
</build>


Cheers
Rob


--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to