PR: MNG-1162

better error handling for invalid pom reference


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@312809 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-11 04:38:44 +00:00
parent b3bdc1a78f
commit d3f5c3d755
2 changed files with 10 additions and 0 deletions

View File

@ -196,5 +196,11 @@
<pom refid="maven.project"/>
</artifact:deploy>
</target>
<target name="test-invalid-pom-ref" depends="initTaskDefs">
<artifact:dependencies>
<pom refid="invalid-ref" />
</artifact:dependencies>
</target>
</project>

View File

@ -86,6 +86,10 @@ public class Pom
if ( refid != null )
{
instance = (Pom) getProject().getReference( refid );
if ( instance == null )
{
throw new BuildException( "Invalid reference: '" + refid + "'" );
}
}
return instance;
}