Correct - I want to have an option of getting many files at once. 

In my case, it's the Spring configuration - I have many
applicationContext*.xml files that I just need aggregated, but there are
many other cases - Hibernate mappings, different kinds of property files,
etc. The main motivation is: I want to name all my files prefixSuffix.ext
and load all of them with prefix*.ext. That way if I decide later to, say,
split an applicationContext.xml into 10 pieces (since it became too large),
I don't go and change all the places I load it from. 

Again, in this case it's not that it's that hard - I need to change two
things - the main loader and the test loader classes. However, in general,
there might be many resources and/or resources out of your control. 

To give you an example - say you are building a template engine (like
Velocity) or a wiki engine. Simple - you have an input file, some rules to
translate to output and the output file. Rules are not something the user
needs to specify - they are the internal thing. (Say we don't want the user
to be able to say "ok, now I want my Wiki engine to translate "h3." into
header level 3 instead of "==="). Since they are internal, they seem to be
resources that should be built in directly to the resulting jar, for
example.

Now, I am just starting my wiki engine and I am adding things one by one.
With a file-system approach, I could load, say, some defaults used by these
rules from property files dynamically. I don't want to say: load defaults
for lists, then I add headers and I want to load defaults for headers, then
load defaults for code blocks, then load defaults for paragraphs, then...
Unfortunately, isn't it true that what I need to do now exactly that?

I suppose there are more examples of this. In general, it's - I want to load
many files and not have to specify what in two places - as files themselves
(which already contain a name) and as a list of resources (which just
duplicate the file names).

To summarize - I'm just whining too much about portability here. :) Thanks
James!

-- 
View this message in context: 
http://n2.nabble.com/Getting-Maven-project-resources-Eclipse-tp3568731p3569012.html
Sent from the maven users mailing list archive at Nabble.com.

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

Reply via email to