|
[
Permlink
| « Hide
]
Nicolas Chalumeau added a comment - 20/Jul/04 06:32 PM
Add a patch.
Cool. Thanks Nicolas. Could you please also add the associated changes for properties.xml, changes.xml and plugin.properties? (and also mabye for project.xml to add you as a contributor :-))?
Here is a sample application that use strutstestcase. This example shows how to test a jar who contains struts action and need some file in the webapp classpath.
I will attach other files toonight done.
The changes.xml patch fix a </action> without opening tag <action> Here is a condensed patch with all the changes, plus a test case and additional check if the directory exists.
I haven't commit it though, for a reason: once this new properties gets through, users will expect a mechanismo to include/exclude files, probably using wildcards (like * and **). So, I change the property to cactus.resources.dirs, in a way that would allow us to add new properties in the future (like cactus.resources.includes and cactus.resources.excludes). Note that this is not as straightfoward as having this info in the POM, as we cannot have individual includes/excludes for each directory. Anyway, I will commit (or not) the changes once I get some feedback on this comment. -- Felipe PS: another improvement that could be made would be not relying on maven.build.dest and including the resources directly from inside the <cactifywar> tag. But I'm not sure if that would work (besides I haven't the spare cycles to check it right now :-) Polished some documentation and updated with CVS (because of
Add the global patch.
The following properties are add : # (optional). List of resources label to include in the war classpath cactus.resources.dirs= # (optional). Label directory to include in the war classpath #cactus.resources.X.dir=src/main/resources # (optional). Regular expression for the label X that file have to match to be include in the war classpath. by default **/* #cactus.resources.X.includes=**.xml,**.dtd # (optional). Regular expression for the label X that file have to match to be exclude in the war classpath. by default none #cactus.resources.X.excludes= The includes/excludes regexp work and allow "recursive" includes by default. test follow I can't include this in the global patch so this is the zip of the test case.
I find something strange : - when i am in the test06 dir and i launch cactus:test, the test are okay - but when i am in maven dir and launch plugin:test, the test fail In fact i see this before. The reactor seem to use for relative path it use as base path maven. ie : When the copy of resource it looks for .../integration/maven/target/classes/test.properties and not for .../integration/maven/src/plugin-test/test06/target/classes/test.properties for the target dir That's why plugin:test fail. Can't the pluginTest use the maven:maven tag could solve it ? Nicolas, Applied patch with minor documentation changes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||