Mike Bowler wrote:
Using a build of maven pulled from cvs yesterday.
I'm trying to figure out how to validate my project.xml file. There
is a maven-project.xsd schema file in the maven sources so I'm
assuming it's just a matter of figuring out how to get maven to use
this schema.
Looking at the goals in maven, I see the following possibilities
[codeswitcher] ( NO DEFAULT GOAL )
init ....................... Validate the Maven XML project descriptor
[pom] : Validate the Maven XML project descriptor
validate ................... Validate the Maven XML project descriptor
[validate-pom-for-release] : null
I deliberately put a mistake in my project.xml file to see if schema
validation is actually being done. The codeswitcher and
valide-pom-for-release goals just return without doing anything. The
pom:validate target dumps this one line to the console:
java.lang.reflect.InvocationTargetException
I couldn't find a stack trace for this in either maven.log or
velocity.log (the two logs created during the maven run)
So my questions are:
1) How are you supposed to trigger schema validation of project.xml?
This may not be as simple as it may appear, since in fact project.xml
(and maven.xml) are jelly scripts, and essentially anything goes as long
as the final output structure is ok (I guess you could validate that).
While I don't think general scripting is encouraged in project.xml, it's
certainly possible... On this basis, validating maven.xml would probably
be completely out of the question.
2) Where would you expect to find the stack trace when the console
says there was an exception?
You can use -e to to have maven print stack traces...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]