Check if pom is in the correct format.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@171311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-05-22 13:15:15 +00:00
parent f226508aeb
commit e52be1da9a
2 changed files with 5 additions and 2 deletions

View File

@ -187,6 +187,11 @@ public abstract class AbstractPomTransformer
public void transformNodes()
throws Exception
{
if ( getSelectedNodes().isEmpty() )
{
throw new Exception( "Your pom doesn't respect the standard format." );
}
for ( Iterator i = getSelectedNodes().iterator(); i.hasNext(); )
{
Object o = i.next();

View File

@ -30,8 +30,6 @@ import org.dom4j.Node;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
* @version $Id: VersionTransformer.java 115421 2004-06-01 02:20:18Z dion $
* @todo check to make sure the basic structure of the document is good. just ran into a bug
* with the first version of the converter and the root element was <model> not <project>.
*/
public class VersionTransformer
extends AbstractPomTransformer