Closed rnveach closed 2 years ago
Runs with output of properties before and after condition for just first (second has same logic just no displays):
<echo level="info">${checkstyle.ant.skip}</echo>
<echo level="info">${run}</echo>
mvn -e --no-transfer-progress verify -DskipTests
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] ${checkstyle.ant.skip}
[INFO] [echo] ${run}
[INFO] [echo] ${checkstyle.ant.skip}
[INFO] [echo] true
[INFO] [echo] Checkstyle started (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml): 23/10/2022 11:27:23 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml) : 23/10/2022 11:27:26 AM
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify-sevntu) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] Checkstyle started (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml): 23/10/2022 11:27:26 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml) : 23/10/2022 11:27:30 AM
[INFO] Executed tasks
mvn -e --no-transfer-progress verify -DskipTests -D"checkstyle.ant.skip=true"
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] true
[INFO] [echo] ${run}
[INFO] [echo] true
[INFO] [echo] ${run}
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify-sevntu) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] Executed tasks
mvn -e --no-transfer-progress verify -DskipTests -D"checkstyle.ant.skip=false"
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] false
[INFO] [echo] ${run}
[INFO] [echo] false
[INFO] [echo] true
[INFO] [echo] Checkstyle started (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml): 23/10/2022 11:29:19 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml) : 23/10/2022 11:29:22 AM
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify-sevntu) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] Checkstyle started (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml): 23/10/2022 11:29:22 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml) : 23/10/2022 11:29:26 AM
[INFO] Executed tasks
mvn -e --no-transfer-progress -Pno-validations verify -D"checkstyle.ant.skip=false" (command from checkstyle at https://github.com/checkstyle/checkstyle/pull/12339/files )
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] false
[INFO] [echo] ${run}
[INFO] [echo] false
[INFO] [echo] true
[INFO] [echo] Checkstyle started (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml): 23/10/2022 11:31:11 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.3.4/config/checkstyle_checks.xml) : 23/10/2022 11:31:14 AM
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify-sevntu) @ sevntu-checks ---
[INFO] Executing tasks
[INFO] [echo] Checkstyle started (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml): 23/10/2022 11:31:14 AM
[INFO] [checkstyle] Running Checkstyle 10.3.4 on 141 files
[INFO] [echo] Checkstyle finished (M:\checkstyleWorkspaceEclipse\sevntu\sevntu-checks\sevntu-checks.xml) : 23/10/2022 11:31:17 AM
[INFO] Executed tasks
The Ant manual Property Task states:
I created a intermediator variable to handle to make the conditions easier and make handling same as original.