On 7/19/05, Kenney Westerhof <[EMAIL PROTECTED]> wrote:
> On Tue, 19 Jul 2005, Brett Porter wrote:
>
> Filtering is indeed off by default.
>
> My 2 cents:
>
> I've been pondering how to exclude resources from filtering. All that I
> could think of was to apply some includes/excludes mechanism (that would
> apply to all <resources/> defined), or to add the <filtering/> tag to a
> <resource> tag to allow resources to be split up into filtering/non
> filtering ones. This would require a POM change..
>
> But the src/filtered-resources solution seems really great to me!
> Cons: you lose oversight (no more single directory structure for all
> resources)
Agreed.
To some degree, however, this has already happened as a result of
splitting Java source from JAR resources. For example, if there is
Java code in src/java/.../MyObject.java of the form:
MyObject.class.getResource("resource.txt");
then we have to ensure that resource.txt resides at the correct
location in src/resources, rather than just storing it next to
MyObject.java.
What was the original rationale for splitting these into separate
directories, rather than having a standard ".java" exclusion filter
for resources in the src/java/ directory?
Presumably, the same rationale applies here to the splitting of
resources and filtered resources.
> Pros: file location specifies filtering rather than complex
> include/exclude mechanisms in the pom.
Yes - although the name could use some work. :-)
perhaps src/resources-filtered to make it slightly more discoverable?
Kind Regards,
John Fallows.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]