mirror of https://github.com/apache/maven.git
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:
parent
b3bdc1a78f
commit
d3f5c3d755
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue