diff --git a/maven-artifact-ant/sample.build.xml b/maven-artifact-ant/sample.build.xml index 5d4e319d29..2b062fdf44 100644 --- a/maven-artifact-ant/sample.build.xml +++ b/maven-artifact-ant/sample.build.xml @@ -196,5 +196,11 @@ + + + + + + diff --git a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Pom.java b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Pom.java index 379e15cbb5..e12d509548 100755 --- a/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Pom.java +++ b/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Pom.java @@ -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; }