File tree 2 files changed +6
-4
lines changed
it/projects/effective-pom-verbose
main/java/org/apache/maven/plugins/help
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 20
20
String content = new File ( basedir, " build.log" ). text
21
21
22
22
// comments in the same line
23
- assert content. contains( " <groupId>org.apache.maven.its.help</groupId> <!-- " )
23
+ assert content. contains( " <groupId>org.apache.maven.its.help</groupId> <!-- org.apache.maven.its.help:test:1.0-SNAPSHOT," )
24
+ assert content. contains( " <url>https://maven.apache.org/plugins/test/</url> <!-- org.apache.maven.plugins:maven-plugins:33, line 37 -->" )
Original file line number Diff line number Diff line change @@ -208,10 +208,11 @@ private static class InputLocationStringFormatter extends InputLocation.StringFo
208
208
public String toString (InputLocation location ) {
209
209
InputSource source = location .getSource ();
210
210
211
- String s = source .getLocation (); // by default, display the path
211
+ String s = source .getModelId (); // by default, display modelId
212
212
213
- if (s == null || s .trim ().isEmpty ()) {
214
- s = source .getModelId ();
213
+ if (StringUtils .isBlank (s ) || s .contains ("[unknown-version]" )) {
214
+ // unless it is blank or does not provide version information
215
+ s = source .toString ();
215
216
}
216
217
217
218
return '}' + s + ((location .getLineNumber () >= 0 ) ? ", line " + location .getLineNumber () : "" ) + ' ' ;
You can’t perform that action at this time.
0 commit comments