On 2/26/07, Udaybhaskar Sarma Seetamraju wrote:
Hi there,

(mailing-list archive does not have a search facility. Google failed to
show much for [site: mail-archives.apache.org struts])

With many projects already painfully migrated to maven, its a royal pain
to ---copy--- the struts TLDs and DTDs to each developer's folder, for
each of the projects.
Epecially, since we have so successfully been upgrading to newer
versions of struts using Ant's <fileSet> in such a simple, --STABLE--
and effective manner.
While I agree that a general solution to this problem might be useful,
I've got a question about your specific use case ... why are you
copying the Struts TLDs and DTDs separately? The runtime environment
does not need them (unless your servlet container is totally broken
about loading resources from inside a jar file), so the only reason I
can think that you might want the files separately is for an IDE.
Even there, most IDEs have a way to register things external to the
project that is worth looking at.

As to the general resource copying problem, one thing you can actually
do is run Ant scripts in a Maven build, using the antrun plugin. It
would be pretty straightforward to use this in the resource-copying
phase to execute your own script to copy whatever files you need, to
wherever you need, without waiting for Maven to provide a plugin that
behaves the way you require.


The javaworld article on "The Maven 2 POM demystified" mentioned the use of

But that didn't work. I had to use a complex workaround that *!*!* may
not work for too long *!*!*.

<!-- DOES NOT WORK : targetPath>./WEB-INF/.</targetPath -->
<!-- DOES NOT WORK : targetPath>WEB-INF</targetPath -->

<!-- Make sure the value INSIDE targetPath below is IDENTICAL to
${build.finalName} specified above -->


why would ./Fldr and ../Fldr for targetPath, behave in different ways?

I am hoping that someone will point me towards a simple and
maven-upgrade-safe way to include struts DTDs and TLDs.
This stable approach is important for us, because that approach is ALSO
DESPERATELY NEEDED for the other DTDs and XSDs that are required under
/WEB-INF by the 3rd-party JARs we use.

Also, there was mention in a web site about a POM capability like :
Does this exist, and if so, how to use it, and how to create/get the
appropriate JAR to support this?

Summary of Issue:
Copy files from a fixed external path, into specific paths rooted at
/WEB-INF inside the WAR file.
The Path within WAR starting at /WEB-INF/classes is no good. Not in our
Re: struts, we think its easy to keep the <dependency> version of struts
in pom.xml to match the FIXED read-only external folder containing the
DTDs and TLDs.

Maven version: 2.0.4
debian Testing Etch

In case, there are people like me, I like a long-lasting solution,
especially as I am getting older and cannot afford the luxury of
revisiting the same problems for each new upgrade.


To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupusers @
postedFeb 26, '07 at 6:24p
activeFeb 26, '07 at 6:51p



site design / logo © 2018 Grokbase