Skip to content

Commit a39f340

Browse files
committed
Add Maven tip on how to add -parameters
1 parent 4f66547 commit a39f340

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/main/java/com/google/testing/junit/testparameterinjector/TestParametersMethodProcessor.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,18 @@ private static ImmutableList<TestParametersValues> toParameterValuesList(
290290
parametersList.stream().allMatch(Parameter::isNamePresent),
291291
""
292292
+ "Parameter name is not present for method or constructor: %s. Please ensure that"
293-
+ " this test was built with the -parameters compiler option",
293+
+ " this test was built with the -parameters compiler option.\n"
294+
+ "\n"
295+
+ "In Maven, you do this by adding <parameters>true</parameters> to the"
296+
+ " maven-compiler-plugin's configuration. For example:\n"
297+
+ "\n"
298+
+ "<plugin>\n"
299+
+ " <artifactId>maven-compiler-plugin</artifactId>\n"
300+
+ " <version>3.8.1</version>\n"
301+
+ " <configuration>\n"
302+
+ " <parameters>true</parameters>\n"
303+
+ " </configuration>\n"
304+
+ "</plugin>",
294305
methodOrConstructor);
295306
if (valueIsSet) {
296307
return stream(annotation.value())

0 commit comments

Comments
 (0)