commit | 8b99be1d02444a7f76a2c065459761e0fff9b0b0 | [log] [tgz] |
---|---|---|
author | Jason van Zyl <jason@tesla.io> | Thu Nov 21 12:10:39 2013 -0500 |
committer | Jason van Zyl <jason@tesla.io> | Thu Nov 21 12:10:39 2013 -0500 |
tree | 2ac7ef3d6b16e30e09ab8b718fd9532dda459f59 | |
parent | e5d700dc47b3c949d7575e3dcdf7cba9dca466c6 [diff] |
Provide a better error message when the mojo descriptor is null.
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java index 08cd9aa..a1c7a66 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java
@@ -409,7 +409,7 @@ protected MojoExecution newMojoExecution( String goal ) { MojoDescriptor mojoDescriptor = mojoDescriptors.get( goal ); - assertNotNull( mojoDescriptor ); + assertNotNull(String.format("The MojoDescriptor for the goal %s cannot be null.", goal), mojoDescriptor ); MojoExecution execution = new MojoExecution( mojoDescriptor ); finalizeMojoConfiguration( execution ); return execution;