Thanks!
Alexandre Poitras wrote:
First read this to understand resources filtering :
http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20filter%20resource%20files?
Then just add an exclude element under resources to be able to filter
the files themselves.
See this document for a reference on the resource syntax in the pom.xml file :
http://maven.apache.org/maven-model/maven.html#class_resource
Finally, to run your java process, use the exec plugin from mojo codehaus :
http://mojo.codehaus.org/maven-execute-plugin/
You'll need to check it out from svn first and install it in your
local repository via maven, ie using the command "mvn install". You
could also use the ant plugin if you prefer but this solution is
cleaner in my opinion and more simple.
Then add the exec plugin declaration in your project pom.xml file. You
should tie the plugin execution to the generate-resources phase. Here
is a guide on plugin configuration if you don't know how to do that
(looks into the "plugins" section) :
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Here, hope this help! Enjoy your reading :)
On 1/2/06, Steven Coco <[EMAIL PROTECTED]> wrote:
Hello.
Who can help me with a couple of basics while I'm moving from Ant into
Maven?
I want to figure out how I can specify file names that Maven will
exclude from copying while it copies resources from src/main/resources
into target/classes.
Then I want to have Maven execute a Java process when it is done copying
the resource files -- this I guess would be part of the
process-resources phase.
Specifically, I prefer to author property resources in the Properties
XML format; but ResourceBundle doesn't automatically locate bundles in
the XML format. So I have a process that runs during builds and loads
the xml files into a Properties bundle and writes it out into the target
directory in the ".properties" format. Thankfully, Mustang will have a
feature to allow ResourceBundle to load the XML files directly from the
Java code, but until then I'm using this.
Now I have to figure out how to have Maven exclude the xml properties
files and then run my process on the resources.
If anyone wants a copy of the program I use, you're welcome to it: it is
not very smart: it's not written as a Maven plugin, and it always copies
files -- it does not check to see if the file already exists to save
time; it just loads all applicable files and converts them. But it
works, and it is not terribly time-consuming. I'd consider turning it
into a plugin... but Mustang's feature will actually serve me better
when that becomes available.
Thanks for the help!
Steven.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]