From 9e4c766edf539d0bb700433cc829d9ef3d8fc24c Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 21 Mar 2022 11:36:42 -0700 Subject: [PATCH 1/4] Improve Maven instructions. Fixes #5086. --- docs/manual/external-tools.tex | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/manual/external-tools.tex b/docs/manual/external-tools.tex index 9fa859534e4..e3674e8a0c6 100644 --- a/docs/manual/external-tools.tex +++ b/docs/manual/external-tools.tex @@ -973,8 +973,10 @@ \end{alltt} -Java 11 and later do not need the \ +Java 11 and later do not need the \ dependency. If you will never use Java 8, you can omit it. +The need for the \ artifact when running under +JDK 8 is explained in Section~\ref{javac-jdk8}. Periodically update to the most recent version, to obtain the latest bug fixes and new features: @@ -982,9 +984,6 @@ mvn versions:use-latest-versions -Dincludes="org.checkerframework:*" \end{Verbatim} -The need for the \ artifact when running under -JDK 8 is explained in Section~\ref{javac-jdk8}. - \end{enumerate} \item If using JDK 8, use a Maven property to hold the location of the @@ -1022,7 +1021,7 @@ creating three new profiles as shown below (the example uses the Nullness Checker). If your POM file does not already use the \code{maven-compiler-plugin} plugin, you are done. If your POM file - already uses the plugin, copy edit the first profile to incorporate the + already uses the plugin, copy and edit the first profile to incorporate the existing configuration. %% TODO: Is this comment still accurate? @@ -1145,7 +1144,7 @@ \end{mysmall} Now, building with Maven will run the checkers during every compilation -that uses JDK 8 or JDK 11. +that uses JDK 8 or higher. If you wish to run checkers while compiling your source code but not your tests, wrap the \code{...} within @@ -1160,8 +1159,10 @@ \end{Verbatim} To compile without using the Checker Framework, pass -\<-P '!checkerframework-java11'> (or \<-P '!checkerframework-java8'>) +\<-P '!checkerframework> on the Maven command line. +It should also work to pass +\<-P '!checkerframework-jdk9orlater' or \<-P '!checkerframework-java8'>. % TODO: Figure out why, and then remove this paragraph. Warning: adding From 6b826e77e7c29aebe8acd6aafdbc8bfbe2dbb8ca Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 21 Mar 2022 11:39:22 -0700 Subject: [PATCH 2/4] Comment out wrong instructions --- docs/manual/external-tools.tex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/manual/external-tools.tex b/docs/manual/external-tools.tex index e3674e8a0c6..60fec430482 100644 --- a/docs/manual/external-tools.tex +++ b/docs/manual/external-tools.tex @@ -1161,8 +1161,11 @@ To compile without using the Checker Framework, pass \<-P '!checkerframework> on the Maven command line. -It should also work to pass -\<-P '!checkerframework-jdk9orlater' or \<-P '!checkerframework-java8'>. +%% Per GitHub user danibs in +%% https://github.com/typetools/checker-framework/issues/5086, +%% this does not seem to work. +% It should also work to pass +% \<-P '!checkerframework-jdk9orlater' or \<-P '!checkerframework-java8'>. % TODO: Figure out why, and then remove this paragraph. Warning: adding From decc419d243c9a566dcf1ae246e36f2268af9cee Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 21 Mar 2022 11:48:06 -0700 Subject: [PATCH 3/4] Tweak --- docs/manual/external-tools.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/manual/external-tools.tex b/docs/manual/external-tools.tex index 60fec430482..0ffdb7c3044 100644 --- a/docs/manual/external-tools.tex +++ b/docs/manual/external-tools.tex @@ -1020,7 +1020,8 @@ \item Direct the Maven compiler plugin to use the desired checkers by creating three new profiles as shown below (the example uses the Nullness Checker). If your POM file does not already use the - \code{maven-compiler-plugin} plugin, you are done. If your POM file + \code{maven-compiler-plugin} plugin, you can use the text below as is. + If your POM file already uses the plugin, copy and edit the first profile to incorporate the existing configuration. From dd6c2f76467cd6ed591e6b7c887f4faf968a7c24 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 21 Mar 2022 12:44:01 -0700 Subject: [PATCH 4/4] Remove unbalanced quote mark --- docs/manual/external-tools.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/external-tools.tex b/docs/manual/external-tools.tex index 0ffdb7c3044..fc8b2a3d24b 100644 --- a/docs/manual/external-tools.tex +++ b/docs/manual/external-tools.tex @@ -1160,13 +1160,13 @@ \end{Verbatim} To compile without using the Checker Framework, pass -\<-P '!checkerframework> +\<-P !checkerframework> on the Maven command line. %% Per GitHub user danibs in %% https://github.com/typetools/checker-framework/issues/5086, %% this does not seem to work. % It should also work to pass -% \<-P '!checkerframework-jdk9orlater' or \<-P '!checkerframework-java8'>. +% \<-P !checkerframework-jdk9orlater> or \<-P !checkerframework-java8>. % TODO: Figure out why, and then remove this paragraph. Warning: adding