private void validateRequiredFields() throws BuildException {
//
// Check at least one of the binding file properties is set.
//
if (m_bindingFileSet.isEmpty() && m_bindingFile == null) {
throw new BuildException("Either the binding attribute or at "
+ "least one bindingset nested element "
+ "must be defined.");
}
//
// Make sure that the "binding" attribute has not been used with the
// <bindingset> nested element.
//
if (!m_bindingFileSet.isEmpty() && m_bindingFile != null) {
throw new BuildException("You cannot specify both a binding attribute and a "
+ "bindingset nested element.");
}
//
// Check either <classpath> or <classpathset> has been set.
//
if(m_classpath == null && m_fileSet.isEmpty()) {
throw new BuildException("You must specify either a classpath "
+ "or at least one nested classpathset element.");
}
//
// Make sure that only one of the above is specified.
//
if (m_classpath != null && !m_fileSet.isEmpty()) {
throw new BuildException("You cannot specify both a classpath and a "
+ "classpathset nested element.");
}
}